/* Layout idea: black masthead, a type-first lead story beside a time-stamped
   Latest rail, then ruled section bands. Colour is spent only on the accent. */
:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #585858;
  --line: #d4d4d4;
  --wash: #f2f2ef;
  --accent: #1c3fd6;
  --accent-ink: var(--accent);
  --soft: #262626;
  --bar-bg: #000000;
  --bar-fg: #ffffff;
  --hot: #c8102e;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

/* Dark mode: same layout, tokens swapped. The top bar and footer stay black in both. */
:root[data-theme="dark"] {
  --ink: #f2f2f0;
  --paper: #101011;
  --mute: #a8a8a4;
  --line: #36363b;
  --wash: #1c1c1e;
  --soft: #d8d8d4;
  --accent-ink: color-mix(in srgb, var(--accent) 45%, #ffffff);
  --hot: #e0344f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.14em; text-decoration-thickness: 0.07em; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--paper); padding: 8px 12px; }

/* ---------- masthead ---------- */
.mast-bar { background: var(--bar-bg); color: var(--bar-fg); }
.mast-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { font-size: 30px; font-weight: 900; letter-spacing: -0.045em; line-height: 1; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { max-height: 40px; width: auto; }
.mast-date { color: #b9b9b9; font-size: 13px; margin-left: auto; }
.mast-search { display: flex; }
.mast-search input {
  width: 220px; background: transparent; color: var(--bar-fg); font: inherit; font-size: 14px;
  border: 0; border-bottom: 1px solid #7a7a7a; border-radius: 0; padding: 7px 2px; outline-offset: 4px;
}
.mast-search input::placeholder { color: #a9a9a9; }
.mast-search button {
  background: transparent; color: var(--bar-fg); border: 0; border-bottom: 1px solid #7a7a7a;
  font: inherit; font-size: 14px; font-weight: 700; padding: 7px 4px 7px 10px; cursor: pointer;
}
.mast-find { display: none; font-size: 14px; font-weight: 700; margin-left: auto; }
.mast-theme { background: none; border: 0; padding: 0; color: #d0d0d0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: underline; text-underline-offset: 0.2em; }
.mast-theme:hover { color: #ffffff; }

.sections { border-bottom: 1px solid var(--ink); }
.sections ul {
  list-style: none; padding: 0; display: flex; gap: 26px; overflow-x: auto;
  white-space: nowrap; scrollbar-width: none;
}
.sections ul::-webkit-scrollbar { display: none; }
.sections a { display: block; padding: 13px 0 10px; font-size: 15px; font-weight: 700; border-bottom: 3px solid transparent; }
.sections a:hover { text-decoration: none; border-bottom-color: var(--ink); }
.sections a[aria-current="page"] { border-bottom-color: var(--accent-ink); }

/* ---------- shared story parts ---------- */
.kicker { display: inline-block; color: var(--accent-ink); font-size: 13px; font-weight: 800; letter-spacing: 0.005em; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--mute); font-size: 13px; }
.meta .src { font-weight: 700; color: var(--ink); }
.media { display: block; background: var(--wash); aspect-ratio: 16 / 9; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- home: lead + latest ---------- */
.top { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 44px; margin-top: 30px; }
.lead { display: flex; flex-direction: column; gap: 14px; }
.lead h1 { font-size: clamp(2.1rem, 4.9vw, 4.1rem); font-weight: 800; line-height: 1.01; letter-spacing: -0.035em; }
.lead .dek { font-family: var(--text); font-size: 1.32rem; line-height: 1.38; max-width: 46ch; }
.lead .media { margin-top: 8px; }

.rail { border-top: 4px solid var(--ink); }
.rail-head { font-size: 15px; font-weight: 800; padding: 10px 0 12px; }
.stamps { list-style: none; padding: 0; }
.stamps li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.stamps time { color: var(--accent-ink); font-size: 13px; font-weight: 700; padding-top: 2px; }
.stamps a { font-size: 16px; font-weight: 600; line-height: 1.24; letter-spacing: -0.008em; }
.stamps .src { display: block; color: var(--mute); font-size: 12.5px; font-weight: 500; margin-top: 3px; }

/* ---------- cards ---------- */
.card, .card-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-title { font-size: 1.22rem; font-weight: 700; line-height: 1.16; letter-spacing: -0.018em; }
.card-dek { font-family: var(--text); font-size: 1.05rem; line-height: 1.4; color: var(--soft); }
.card .media { margin-bottom: 4px; }

.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--ink); }

/* ---------- section bands ---------- */
.sec { margin-top: 58px; border-top: 3px solid var(--ink); padding-top: 12px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sec-head h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.sec-more { font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: 0.2em; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 44px; }
.feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.feature.no-media { grid-template-columns: minmax(0, 1fr); }
.feature .card-title { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.028em; }
.feature .card-dek { font-size: 1.12rem; }
.stack { display: flex; flex-direction: column; }
.stack .card { padding: 14px 0; border-top: 1px solid var(--line); }
.stack .card:first-child { padding-top: 0; border-top: 0; }
.stack .card-title { font-size: 1.08rem; }

/* ---------- wire headlines ---------- */
.wire { margin-top: 58px; background: var(--wash); padding: 22px 26px 28px; }
.wire .sec-head { margin-bottom: 8px; }
.wire-note { color: var(--mute); font-size: 13px; }
.wire-list { list-style: none; padding: 0; columns: 3; column-gap: 36px; }
.wire-list li { break-inside: avoid; padding: 13px 0; border-top: 1px solid var(--line); }
.wire-list a { display: block; font-size: 1.02rem; font-weight: 650; line-height: 1.24; }
.wire-list .meta { margin-bottom: 4px; }

/* ---------- listing pages ---------- */
.page-head { margin-top: 34px; padding-bottom: 18px; border-bottom: 3px solid var(--ink); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.page-head p { color: var(--mute); margin-top: 10px; font-size: 15px; }
.listing-lead { margin-top: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--ink); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 30px; margin-top: 30px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--ink); font-weight: 700; }
.empty { margin-top: 44px; max-width: 54ch; }
.empty h1, .empty h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.empty p { margin-top: 10px; font-family: var(--text); font-size: 1.15rem; }

.search-form { display: flex; gap: 0; margin-top: 22px; max-width: 640px; }
.search-form input { flex: 1; min-width: 0; font: inherit; font-size: 18px; padding: 12px 14px; border: 2px solid var(--ink); border-right: 0; border-radius: 0; background: var(--paper); color: var(--ink); }
.btn { display: inline-block; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); font: inherit; font-size: 15px; font-weight: 700; padding: 11px 18px; border-radius: 0; cursor: pointer; }
.btn:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.results { margin-top: 12px; max-width: 820px; }
.results .card { padding: 20px 0; border-bottom: 1px solid var(--line); }
.results .card-title { font-size: 1.4rem; }

/* ---------- article ---------- */
.story { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 60px; margin-top: 36px; }
.story-head { display: flex; flex-direction: column; gap: 16px; }
.story-head h1 { font-size: clamp(2.1rem, 4.5vw, 3.6rem); font-weight: 800; line-height: 1.03; letter-spacing: -0.035em; }
.story-head .dek { font-family: var(--text); font-size: 1.42rem; line-height: 1.36; max-width: 52ch; }
.byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); font-size: 14px; }
.byline strong { font-weight: 700; }
.byline time, .byline span { color: var(--mute); }
.byline .edit { margin-left: auto; font-weight: 700; text-decoration: underline; }
.story-figure { margin-top: 26px; }
.story-figure img { width: 100%; height: auto; }
.story-figure figcaption { color: var(--mute); font-size: 13px; padding-top: 8px; }

.prose { font-family: var(--text); font-size: 1.24rem; line-height: 1.62; max-width: 680px; margin-top: 30px; overflow-wrap: break-word; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure { margin: 0 0 1.12em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--display); font-weight: 800; letter-spacing: -0.022em; line-height: 1.15; margin: 1.7em 0 0.55em; }
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.12rem; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 0.15em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { border-left: 4px solid var(--ink); padding: 2px 0 2px 22px; font-size: 1.5rem; line-height: 1.36; font-style: italic; }
.prose img { height: auto; margin: 1.6em 0 0.6em; }
.prose figcaption { font-family: var(--display); color: var(--mute); font-size: 13px; }
.prose hr { border: 0; border-top: 1px solid var(--ink); margin: 2em 0; }

.source-box { margin-top: 30px; max-width: 680px; border: 1px solid var(--ink); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.source-box p { font-family: var(--text); font-size: 1.15rem; line-height: 1.45; }

.story-rail { display: flex; flex-direction: column; gap: 40px; }
.story-rail .rail .stamps li { grid-template-columns: minmax(0, 1fr); }
.story-rail .rail .stamps time { padding: 0; }

/* ---------- footer ---------- */
.foot { background: var(--bar-bg); color: var(--bar-fg); margin-top: 80px; padding: 44px 0 30px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 60px; }
.foot .brand { font-size: 26px; }
.foot-tag { color: #b9b9b9; font-size: 14px; margin-top: 10px; max-width: 34ch; }
.foot ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 9px 44px; font-size: 14px; font-weight: 600; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 40px; padding-top: 18px; border-top: 1px solid #3d3d3d; color: #b9b9b9; font-size: 13px; }
.foot-base nav { display: flex; gap: 20px; }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .top, .sec-grid, .story { grid-template-columns: minmax(0, 1fr); }
  .story { gap: 48px; }
  .row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wire-list { columns: 2; }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mast-row { min-height: 58px; gap: 14px; }
  .brand { font-size: 25px; }
  .mast-date, .mast-search, .mast-theme { display: none; }
  .mast-find { display: block; }
  .sections ul { gap: 20px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wire { padding: 18px 18px 22px; margin-left: -20px; margin-right: -20px; }
  .wire-list { columns: 1; }
  .prose { font-size: 1.16rem; }
  .prose blockquote { font-size: 1.3rem; }
  .lead .dek, .story-head .dek { font-size: 1.2rem; }
}
@media (max-width: 520px) {
  .row4, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .foot ul { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .sections a, .btn { transition: border-color 0.12s, background-color 0.12s, color 0.12s; }
}

/* ---------- breaking bar ---------- */
.breaking { display: block; background: var(--hot); color: #ffffff; font-size: 15px; font-weight: 600; line-height: 1.3; }
.breaking .wrap { display: block; padding-top: 9px; padding-bottom: 9px; }
.breaking strong { font-weight: 900; margin-right: 8px; }

/* ---------- front page rail ---------- */
.rail-col { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.ranked { list-style: none; padding: 0; counter-reset: rank; }
.ranked li { counter-increment: rank; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.ranked li::before { content: counter(rank); font-size: 1.5rem; font-weight: 900; line-height: 1; color: var(--accent-ink); letter-spacing: -0.03em; }
.ranked a { font-size: 16px; font-weight: 600; line-height: 1.24; letter-spacing: -0.008em; }

/* ---------- article extras ---------- */
.kicker.is-paid { color: var(--ink); border: 1.5px solid var(--ink); padding: 1px 7px; font-size: 12px; align-self: flex-start; }
.paid-note { margin-top: 22px; padding: 12px 16px; background: var(--wash); border-left: 4px solid var(--ink); font-size: 14.5px; font-weight: 600; max-width: 680px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.share-label { font-weight: 700; margin-right: 4px; }
.share a, .share button { font: inherit; font-weight: 600; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 0; padding: 5px 12px; cursor: pointer; }
.share a:hover, .share button:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.prose-rest { margin-top: 0; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; max-width: 680px; }
.tags a { display: block; font-size: 14px; font-weight: 600; padding: 5px 12px; background: var(--wash); }
.tags a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--ink); max-width: 680px; }
.author-box img { width: 72px; height: 72px; object-fit: cover; flex: none; background: var(--wash); }
.author-name { font-weight: 800; font-size: 1.05rem; }
.author-name span { display: block; font-weight: 500; font-size: 14px; color: var(--mute); margin-top: 1px; }
.author-bio { font-family: var(--text); font-size: 1.05rem; line-height: 1.45; margin-top: 8px; }
.byline strong a { text-decoration: underline; text-underline-offset: 0.16em; text-decoration-thickness: 0.06em; }
.story-newsletter { margin-top: 36px; max-width: 680px; padding: 20px 22px 18px; background: var(--wash); }
.next { margin-top: 44px; border-top: 4px solid var(--ink); }
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 6px; }
.next-grid .card-title { font-size: 1.08rem; }

/* ---------- newsletter ---------- */
.newsletter { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.newsletter label { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.015em; }
.newsletter-row { display: flex; }
.newsletter input[type="email"] { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid var(--ink); border-right: 0; border-radius: 0; background: var(--paper); color: var(--ink); }
.newsletter-note { font-size: 13px; color: var(--mute); }
.newsletter-note a { text-decoration: underline; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.empty .newsletter { margin-top: 18px; }
.foot-news { margin-top: 36px; padding-top: 26px; border-top: 1px solid #3d3d3d; }
.foot .newsletter input[type="email"] { background: #000; color: #fff; border-color: #fff; }
.foot .newsletter .btn { background: #fff; color: #000; border-color: #fff; }
.foot .newsletter .btn:hover { background: #000; color: #fff; }
.foot .newsletter-note { color: #b9b9b9; }
.foot-base nav { flex-wrap: wrap; row-gap: 8px; }
.foot-base button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.foot-base button:hover { text-decoration: underline; }

/* ---------- author and tag pages ---------- */
.page-head.is-person { display: flex; gap: 24px; align-items: flex-start; }
.page-head .face { width: 112px; height: 112px; object-fit: cover; flex: none; background: var(--wash); }
.page-head .role { color: var(--ink); font-weight: 700; margin-top: 8px; }
.page-head .intro { font-family: var(--text); font-size: 1.15rem; line-height: 1.45; color: var(--ink); max-width: 62ch; }

/* ---------- advertising ---------- */
.ad { margin: 26px 0 0; text-align: center; min-height: 90px; }
.ad-label { font-size: 11.5px; color: var(--mute); margin-bottom: 4px; text-align: left; }
.ad-article { margin: 6px 0 28px; max-width: 680px; }
.ad-side { margin: 0; min-height: 250px; }

/* ---------- cookie notice ---------- */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--bar-bg); color: var(--bar-fg); border-top: 3px solid var(--accent); }
.cookie-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.cookie p { font-size: 14.5px; max-width: 70ch; }
.cookie a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.cookie button { font: inherit; font-weight: 700; padding: 9px 18px; border: 2px solid #fff; border-radius: 0; cursor: pointer; background: #000; color: #fff; }
.cookie button[data-yes] { background: #fff; color: #000; }

@media (max-width: 980px) {
  .next-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .page-head.is-person { gap: 16px; }
  .page-head .face { width: 76px; height: 76px; }
  .story-newsletter { padding: 16px; }
}
@media (max-width: 520px) {
  .next-grid { grid-template-columns: minmax(0, 1fr); }
  .newsletter-row { flex-direction: column; gap: 8px; }
  .newsletter input[type="email"] { border-right: 2px solid var(--ink); }
  .foot .newsletter input[type="email"] { border-right-color: #fff; }
}
