/* ---------- Press review page (press-review.html): the daily edition, newspaper layout ----------
 * The layout of a newspaper (a masthead, a front page, section pages in columns, "Röviden", the
 * colophon) built from the Modern Signal blocks: HUD panels, panel headings with icons, category
 * tags, story photos (media-fit) and source marks. Builds on story.css (flags) and metrics.css.
 * The texts are the published snapshot (PressReview.content), written by the AI from the article
 * analyses; the selection follows rules. */

.np { display: grid; gap: 18px; padding-top: 24px; padding-bottom: 48px; }
.np > * { min-width: 0; }
.np p { margin: 0; }

/* ---- Masthead ---- */
.np-masthead { display: grid; gap: 12px; padding: 14px 22px 12px; }
.np-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.np-topline strong { color: var(--text); font-weight: 600; }
.np-topline .accent { color: var(--color-primary); }
.np-editions { display: inline-flex; gap: 6px; }
.np-editions a, .np-editions span { display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border: 1px solid var(--line); color: var(--muted); }
.np-editions a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.np-editions span { opacity: .45; }
.np-name { display: grid; justify-items: center; gap: 6px; padding: 10px 0 6px; text-align: center; }
.np-name small { color: var(--cyan); font-family: var(--font-mono); font-size: 10px; letter-spacing: .3em; }
.np-name h1 { margin: 0; font-size: clamp(34px, 5.4vw, 64px); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.np-motto { color: var(--muted); font-size: 13px; }
.np-dateline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .06em; }
.np-dateline > span:first-child { color: var(--muted); }
.np-dateline strong { color: var(--text); font-weight: 600; }
.np-dateline > span:nth-child(2) { font-family: var(--font-heading); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.np-dateline > span:last-child { color: var(--muted); text-align: right; }

/* Section index: chips with the section icons */
.np-index { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.np-index a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); color: var(--text); font-size: 10px; letter-spacing: .06em; }
.np-index a .icon { color: var(--color-primary); font-size: 13px; }
.np-index a span { color: var(--muted); }
.np-index a:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ---- Story parts, shared by every size ---- */
.np-story { display: grid; gap: 10px; min-width: 0; align-content: start; scroll-margin-top: 16px; }
.np-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 9px; letter-spacing: .05em; }
.np-kicker .category-tag { padding: 3px 6px; background: var(--accent); color: var(--accent-ink); }
.np-kicker .np-flag { padding: 2px 5px; border: 1px solid var(--line); }
.np-kicker a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.np-kicker a:hover { color: var(--color-primary); }
.np-headline { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.np-headline a { color: var(--text); }
.np-headline a:hover { color: var(--color-primary); }
.np-summary { color: var(--muted); font-size: 14px; line-height: 1.65; }
.np-angle { display: grid; gap: 6px; padding: 10px 12px; border-left: 2px solid var(--hud-transmission); background: color-mix(in srgb, var(--panel-hover) 60%, transparent); font-size: 13px; line-height: 1.55; }
.np-angle b { color: var(--hud-transmission); font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: .08em; }
.np-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.np-sources { display: flex; align-items: center; gap: 3px; min-width: 0; }
.np-sources .more { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.np-sources .mono { margin-left: 6px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.np-sources .mono strong { color: var(--text); }
.np-more { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--color-primary); font-size: 11px; font-weight: 700; white-space: nowrap; }
.np-more:hover { color: var(--color-primary-hover); }

/* Story photo: the cover image of the story (ADR 0018), none when the story has no image */
.np-photo { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--panel); }
.np-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, var(--media-overlay-mid), transparent 45%); }

/* The articles at the sources, folded */
.np-articles summary { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .05em; cursor: pointer; list-style: none; }
.np-articles summary::-webkit-details-marker { display: none; }
.np-articles summary .icon { transition: transform .15s; }
.np-articles[open] summary .icon { transform: rotate(90deg); }
.np-articles summary:hover { color: var(--color-primary); }
.np-articles ol { display: grid; margin: 6px 0 0; padding: 0; list-style: none; }
.np-articles li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; }
.np-articles li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.np-articles li a { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.np-articles li a:hover { color: var(--color-primary); }
.np-articles li small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.np-articles li.is-copy a { color: var(--muted); }
.np-articles li.is-copy .source-avatar { border-style: dashed; }
.np-articles .st-flag { padding: 0 4px; }

/* ---- Front page: the main lead story, its kicker and headline over its 16:9 photo, the rest beside it.
 * The photo box grows past 16:9 only when a long headline needs it. ---- */
.np-lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; overflow: hidden; }
.np-lead .np-photo { display: flex; flex-direction: column; justify-content: flex-end; border: 0; border-right: 1px solid var(--line); }
.np-lead .np-photo::before { background: linear-gradient(0deg, var(--media-overlay-strong), var(--media-overlay-mid) 45%, transparent 85%); }
.np-lead-over { position: relative; z-index: 2; display: grid; gap: 10px; padding: 48px 22px 18px; color: var(--media-overlay-text); }
.np-lead-over .np-headline a { color: inherit; }
.np-lead-over .np-headline a:hover { color: var(--color-primary-hover); }
.np-lead-text { display: grid; gap: 12px; align-content: start; min-width: 0; padding: 20px 22px 18px; }
.np-lead .np-kicker { font-size: 10px; }
.np-lead .np-headline { font-size: clamp(26px, 2.8vw, 38px); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; }
.np-lead .np-summary { color: var(--text); font-size: 15px; }
.np-lead .np-summary::first-letter { float: left; margin: 4px 8px 0 0; color: var(--color-primary); font-family: var(--font-heading); font-size: 54px; font-weight: 700; line-height: .82; }

/* ---- The flow: columns filled one after the other, the text runs on to the next column ----
 * Photos, headlines, source lines and the boxes stay whole; a headline stays with what follows. */
.np-flow { columns: 3 250px; column-gap: 40px; column-rule: 1px solid var(--line); padding: 20px 22px 8px; }
.np-flow > * { margin: 0 0 22px; }
.np-flow .np-story { display: block; }
.np-flow .np-story > * + * { margin-top: 10px; }
.np-flow .np-story + .np-story, .np-flow .np-ref + .np-story { padding-top: 18px; border-top: 1px solid var(--line); }
.np-flow .np-photo, .np-flow .np-kicker, .np-flow .np-credit, .np-flow .np-angle, .np-flow .np-box, .np-flow .np-flow-head, .np-flow .np-ref { break-inside: avoid; }
.np-flow .np-photo, .np-flow .np-kicker, .np-flow .np-headline, .np-flow .np-flow-head, .np-flow .np-ref { break-after: avoid; }
.np-flow .np-headline { break-inside: avoid; }
.np-flow .is-front-story .np-headline { font-size: 22px; line-height: 1.2; }

/* "A nap": the intro, the contents and the status, a box at the top of the front page flow */
.np-box { display: grid; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel-hover) 55%, transparent); }
.np-box-head { display: flex; align-items: center; gap: 10px; }
.np-box-head h2 { margin: 0 auto 0 0; font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.np-box-head .mono { color: var(--muted); font-size: 9px; }
.np-intro { font-size: 15px; line-height: 1.65; }
.np-contents { display: grid; margin: 0; padding: 0; list-style: none; }
.np-contents a { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; }
.np-contents li:last-child a { border-bottom: 0; }
.np-contents a .icon { color: var(--color-primary); font-size: 14px; }
.np-contents a:hover { color: var(--color-primary); }
.np-contents .mono { margin-left: auto; color: var(--muted); font-size: 10px; }
.np-label { margin-bottom: 4px !important; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.np-status { padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; letter-spacing: .05em; line-height: 1.8; }
.np-status .is-published { color: var(--color-success); }

/* A section head inside the flow: icon, name, count, an accent rule */
.np-flow-head { display: flex; align-items: center; gap: 10px; padding: 10px 0 8px; border-top: 2px solid var(--text); border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.np-flow-head h2 { margin: 0 auto 0 0; font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.np-flow-head .panel-icon { width: 24px; height: 24px; }
.np-flow-head .mono { color: var(--muted); font-size: 9px; }
.np-flow > .np-flow-head { margin-bottom: 14px; }
.np-flow > .np-flow-head:not(:first-child) { margin-top: 8px; }
.np .np-ref { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.np-ref .mono { flex: none; color: var(--color-primary); font-size: 9px; letter-spacing: .06em; }
.np-ref a { overflow: hidden; min-width: 0; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.np-ref a:hover { color: var(--color-primary); }
.np-flow .is-brief .np-headline { font-size: 16px; }
.np-flow .is-brief .np-summary { font-size: 13px; }

/* ---- Colophon ---- */
.np-colophon { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; padding: 16px 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.np-colophon > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.np-colophon b { display: flex; align-items: center; gap: 6px; color: var(--text); font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: .08em; }
.np-colophon b .icon { color: var(--color-primary); font-size: 13px; }
.np-archive { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
.np-archive a { display: flex; gap: 8px; min-width: 0; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 12px; }
.np-archive li:last-child a { border-bottom: 0; }
.np-archive a:hover { color: var(--color-primary); }
.np-archive small { flex: none; padding-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.np-archive span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 980px) {
  .np-colophon { grid-template-columns: minmax(0, 1fr); }
  .np-lead { grid-template-columns: minmax(0, 1fr); }
  .np-lead .np-photo { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 700px) {
  .np-masthead { padding: 12px 14px; }
  .np-dateline { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 4px; text-align: center; }
  .np-dateline > span:last-child { text-align: center; }
  .np-lead-text { padding: 16px 14px; }
  .np-flow { padding: 16px 14px 4px; }
}
