/* The reports site (brief.html, js/brief.js): loaded after app.css. It re-colours the shared components with its own
   tokens — warm paper, ink and a newspaper red — and adds the start page, the masthead and the front page ("Today").
   The day edition (light) is the default; the night edition (dark) is the reader's choice — brief.js sets
   data-theme on <html> either way, so the device's setting doesn't decide.
   The report pages themselves (rp-* in app.css) are shared with Aktiekartan and pick the colours up from the tokens. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --surface-2: #f1ece1;
  --surface-3: #e7e0d2;
  --border: #e4ddcf;
  --border-strong: #cfc6b4;
  --text: #1d1b17;
  --text-2: #4d483f;
  --text-3: #857e71;
  --accent: #b5482f;
  --accent-soft: #f6e5dd;
  --accent-ink: #ffffff;
  --pos: #2f7a47;
  --neg: #b5362f;
  --pos-soft: #e4f1e6;
  --neg-soft: #f8e3e0;
  --shadow: 0 1px 2px rgba(40, 30, 10, 0.05), 0 6px 20px rgba(40, 30, 10, 0.05);
  --shadow-lg: 0 14px 44px rgba(40, 30, 10, 0.18);
  --radius: 10px;
  --radius-sm: 7px;
  --serif: 'Iowan Old Style', 'Charter', 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
  --ink: #1d1b17;
  --paper: #fbf8f1;
  --band: #ebe3d3; /* the sign-in panel and the one-off band: a darker paper by day */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #141311;
    --surface: #1c1b18;
    --surface-2: #24221e;
    --surface-3: #2f2c27;
    --border: #2e2b26;
    --border-strong: #433f37;
    --text: #eee8dc;
    --text-2: #bdb5a6;
    --text-3: #8b8375;
    --accent: #e27a5c;
    --accent-soft: #3a241c;
    --accent-ink: #1a0f0b;
    --pos: #6cc58a;
    --neg: #ff7d6e;
    --pos-soft: #17271c;
    --neg-soft: #2e1916;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.55);
    --paper: #201e1a;
    --band: #0e0d0c;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #141311;
  --surface: #1c1b18;
  --surface-2: #24221e;
  --surface-3: #2f2c27;
  --border: #2e2b26;
  --border-strong: #433f37;
  --text: #eee8dc;
  --text-2: #bdb5a6;
  --text-3: #8b8375;
  --accent: #e27a5c;
  --accent-soft: #3a241c;
  --accent-ink: #1a0f0b;
  --pos: #6cc58a;
  --neg: #ff7d6e;
  --pos-soft: #17271c;
  --neg-soft: #2e1916;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.55);
  --paper: #201e1a;
  --band: #0e0d0c;
}

body.brief {
  font-size: 15px;
}
.brief a {
  color: inherit;
}

/* The static start page in brief.html shows only if the app hasn't started after a few seconds. */
#seo {
  animation: bf-seo 0.3s ease-out 3s both;
}
@keyframes bf-seo {
  from {
    visibility: hidden;
    opacity: 0;
  }
  to {
    visibility: visible;
    opacity: 1;
  }
}

/* ---------- brand ---------- */
.bf-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.bf-brand svg,
.bf-brand img {
  width: 28px;
  height: 28px;
  flex: none;
}

/* ---------- masthead (logged in) ---------- */
.bf-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--border);
}
.bf-top-in {
  max-width: 1120px;
  margin: 0 auto;
  height: 62px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.bf-nav {
  display: flex;
  gap: 4px;
  margin-left: 18px;
}
.bf-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.bf-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.bf-nav a[aria-current='page'] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}
.bf-top .user-chip {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

/* ---------- pages ---------- */
.bf-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}
.bf-page > * + * {
  margin-top: 16px;
}
.brief .dash-card h2,
.brief .rp-card h2,
.brief .rp-head h2,
.brief .rp-mast-name,
.brief .modal-head h2 {
  font-family: var(--serif);
  letter-spacing: -0.01em;
}
.brief .rp-edition {
  background: var(--paper);
}
.brief .rp-report .rp-story h4,
.brief .rp-top li b {
  font-family: var(--serif);
}
.brief .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Today: the front page ---------- */
.td-hello {
  padding: 6px 0 4px;
}
.td-date {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.td-hello h1 {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 6px 0 6px;
}
.td-line {
  margin: 0;
  color: var(--text-2);
}

.td-ask {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px 14px;
  box-shadow: var(--shadow);
}
.td-ask-q {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}
.td-ask-row {
  display: flex;
  gap: 10px;
}
.td-ask-row .input {
  flex: 1;
  height: 46px;
  font-size: 16px;
  padding: 0 14px;
}
.td-ask-row .btn {
  height: 46px;
  padding: 0 18px;
  white-space: nowrap;
}
.td-ask .hint {
  margin: 10px 0 0;
}
.td-ask .link-btn {
  font-size: inherit;
}

.td-front {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.td-ed {
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--text);
  border-radius: 4px 4px var(--radius) var(--radius);
  padding: 16px 20px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.td-ed.unread {
  border-top-color: var(--accent);
}
.td-ed.paused {
  opacity: 0.7;
}
.td-lead {
  grid-column: 1 / -1;
  padding: 22px 26px 18px;
}
.td-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.td-kicker a {
  color: var(--accent);
  text-decoration: none;
}
.td-kicker a:hover {
  text-decoration: underline;
}
.td-new {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: 0.04em;
}
.td-ed h2 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 8px 0 6px;
}
.td-lead h2 {
  font-size: 32px;
  line-height: 1.13;
  max-width: 30ch;
}
.td-ed h2 a,
.td-list a {
  text-decoration: none;
}
.td-ed h2 a:hover,
.td-list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.td-ed p {
  margin: 0 0 8px;
  color: var(--text-2);
  line-height: 1.55;
}
.td-standfirst {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text) !important;
  max-width: 62ch;
}
.td-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.td-list li {
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.35;
}
.td-lead .td-list {
  columns: 2;
  column-gap: 28px;
}
.td-lead .td-list li {
  break-inside: avoid;
}
.td-label {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}
.td-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.td-foot a {
  text-decoration: none;
  font-weight: 650;
}
.td-foot a:first-child,
.td-foot .link-btn {
  color: var(--accent);
}
.td-foot a.muted {
  font-weight: 500;
}

.td-sec {
  font-family: var(--serif);
  font-size: 20px;
  margin: 8px 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--text);
}
.td-once ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.td-once li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.td-once li a {
  text-decoration: none;
  min-width: 0;
}
.td-once li a b {
  font-family: var(--serif);
  font-size: 16px;
  margin-right: 8px;
}
.td-once li a span {
  color: var(--text-2);
}
.td-once li > span {
  white-space: nowrap;
  font-size: 13px;
}
.td-start h2 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 18px 0 4px;
}

/* ---------- the start page (logged out) ---------- */
.bf-land {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.bf-land main {
  flex: 1;
}
.bf-land-top {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bf-land section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}
.bf-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  padding-top: 48px !important;
  padding-bottom: 64px !important;
}
.bf-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.bf-hero h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.bf-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 56ch;
  margin: 0 0 26px;
}
.bf-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bf-cta .btn.lg {
  height: 48px;
  padding: 0 22px;
  font-size: 15.5px;
}

/* The example report: a small newspaper page. */
.bf-sample {
  position: relative;
  background: #fbf8f1;
  color: #1d1b17;
  border-radius: 6px;
  padding: 22px 24px 20px;
  box-shadow: 0 1px 0 #e4ddcf, 0 22px 60px rgba(40, 30, 10, 0.2);
  transform: rotate(1.2deg);
  font-family: var(--serif);
}
.bf-s-tag {
  position: absolute;
  top: -11px;
  right: 18px;
  background: #b5482f;
  color: #fff;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
}
.bf-s-mast {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  border-bottom: 3px double #1d1b17;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.bf-s-mast b {
  font-size: 24px;
  letter-spacing: -0.01em;
}
.bf-s-mast span {
  font-family: var(--font);
  font-size: 11.5px;
  color: #6f685b;
}
.bf-s-kicker {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b5482f;
  margin-bottom: 3px;
}
.bf-s-lead h3 {
  font-size: 25px;
  line-height: 1.15;
  margin: 0 0 8px;
}
.bf-s-lead p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #3f3a32;
}
.bf-s-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #ddd5c5;
}
.bf-s-cols b {
  font-size: 15.5px;
  line-height: 1.3;
}
.bf-s-brief {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #ddd5c5;
  font-size: 14px;
}
.bf-s-brief b {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bf-s-brief ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.bf-s-brief li {
  margin: 3px 0;
}
.bf-sample.compact {
  transform: none;
  margin-top: 30px;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.bf-sample.compact .bf-s-lead h3 {
  font-size: 21px;
}

/* How it works */
.bf-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 40px !important;
  padding-bottom: 40px !important;
  border-top: 1px solid var(--border);
}
.bf-num {
  display: block;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}
.bf-step h2 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 8px;
}
.bf-step p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.6;
}

.bf-sec {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 10px;
}
.bf-sec-sub {
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 64ch;
  margin: 0 0 22px;
}

/* Watch anything */
.bf-band {
  padding-top: 56px !important;
  padding-bottom: 56px !important;
}
.bf-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bf-chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px 8px 14px;
  font-family: var(--serif);
  font-size: 17px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.bf-chips small {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Four formats */
.bf-formats-sec {
  padding-top: 16px !important;
  padding-bottom: 56px !important;
}
.bf-formats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.bf-format {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.bf-format h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 14px 0 4px;
}
.bf-format p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}
.bf-fmt-pic {
  height: 96px;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 10px;
  box-sizing: border-box;
  display: grid;
  gap: 6px;
}
.bf-fmt-pic i {
  display: block;
  border-radius: 3px;
  background: var(--surface-3);
}
.fmt-report {
  grid-template-rows: 10px repeat(5, 6px);
  align-content: start;
}
.fmt-report i:first-child {
  background: var(--text);
  width: 70%;
}
.fmt-report i:nth-child(3) {
  width: 85%;
}
.fmt-report i:nth-child(4) {
  background: var(--accent);
  width: 35%;
  margin-top: 4px;
}
.fmt-report i:nth-child(6) {
  width: 60%;
}
.fmt-five {
  grid-template-rows: repeat(5, 1fr);
}
.fmt-five i {
  background: linear-gradient(90deg, var(--accent) 0 9px, transparent 9px 16px, var(--surface-3) 16px);
}
.fmt-five i:nth-child(6) {
  display: none;
}
.fmt-paper {
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 8px 1fr 1fr;
}
.fmt-paper i:first-child {
  grid-column: 1 / -1;
  background: var(--text);
}
.fmt-paper i:nth-child(2) {
  grid-row: 2 / 4;
  background: var(--surface-3);
  box-shadow: inset 0 10px 0 var(--accent);
}
.fmt-paper i:nth-child(n + 5) {
  display: none;
}
.fmt-360 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
}
.fmt-360 i {
  box-shadow: inset 0 3px 0 var(--pos);
}
.fmt-360 i:nth-child(2),
.fmt-360 i:nth-child(6) {
  box-shadow: inset 0 3px 0 var(--neg);
}
.fmt-360 i:nth-child(4) {
  box-shadow: inset 0 3px 0 var(--text-3);
}

/* One-off reports */
.bf-now {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  background: var(--band);
  color: var(--text);
  border-radius: 18px;
  padding: 44px 48px !important;
  max-width: 1112px !important;
}
.bf-now h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.12;
  margin: 0 0 12px;
}
.bf-now p {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
}
.bf-now-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 10px 10px 10px 16px;
}
.bf-now-box span {
  flex: 1;
  color: #857e71;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bf-now-box b {
  background: #b5482f;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  white-space: nowrap;
}

.bf-trust {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 56px !important;
  padding-bottom: 24px !important;
}
.bf-trust h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 6px;
}
.bf-trust p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.6;
}
.bf-final {
  text-align: center;
  padding-top: 40px !important;
  padding-bottom: 72px !important;
}
.bf-final h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 18px;
}
.bf-final .bf-cta {
  justify-content: center;
}
.bf-foot {
  border-top: 1px solid var(--border);
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px 24px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.bf-foot .bf-brand {
  font-size: 17px;
}
.bf-foot .bf-brand svg {
  width: 22px;
  height: 22px;
}

/* ---------- sign in ---------- */
.bf-auth-art {
  background: var(--band);
  color: var(--text);
}
.bf-auth-art .bf-brand {
  color: var(--text);
}
.bf-auth-art h1 {
  font-family: var(--serif);
  letter-spacing: -0.02em;
}
.bf-auth-art p {
  color: var(--text-2);
}

/* The day / night edition switch */
.bf-edition {
  gap: 6px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.bf-edition svg {
  width: 16px;
  height: 16px;
}

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .bf-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .bf-hero .bf-sample {
    max-width: 520px;
  }
  .bf-formats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bf-now {
    grid-template-columns: minmax(0, 1fr);
    margin: 0 16px !important;
    padding: 32px 26px !important;
  }
}
@media (max-width: 760px) {
  .bf-top-in {
    height: 54px;
    padding: 0 16px;
  }
  .bf-nav,
  .bf-top .bf-new,
  .bf-top .header-extras {
    display: none;
  }
  .bf-top .user-chip .uname {
    display: none;
  }
  .bf-page {
    padding: 18px 16px calc(90px + env(safe-area-inset-bottom));
  }
  .bf-bottom button.bn-item {
    background: none;
    border: 0;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
  }
  .td-hello h1 {
    font-size: 30px;
  }
  .td-ask {
    padding: 14px 14px 12px;
  }
  .td-ask-row {
    flex-direction: column;
  }
  .td-front {
    grid-template-columns: minmax(0, 1fr);
  }
  .td-lead {
    padding: 16px 18px 14px;
  }
  .td-lead h2 {
    font-size: 26px;
  }
  .td-lead .td-list {
    columns: 1;
  }
  .td-once li {
    flex-direction: column;
    gap: 2px;
  }
  .bf-land-top {
    padding: 14px 16px;
  }
  .bf-land-top .lang-btn,
  .bf-edition span {
    display: none;
  }
  .bf-land section {
    padding: 0 16px;
  }
  .bf-hero {
    padding-top: 20px !important;
  }
  .bf-lede {
    font-size: 16.5px;
  }
  .bf-sample {
    transform: none;
    padding: 18px 16px;
  }
  .bf-s-cols {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .bf-steps,
  .bf-trust {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .bf-formats {
    grid-template-columns: minmax(0, 1fr);
  }
  .bf-now-box span {
    white-space: normal;
  }
}
@media (max-width: 420px) {
  .bf-land-top .btn.primary {
    display: none;
  }
}

/* ---------- the news in numbers (js/stats.js, #/stats) ---------- */
/* Each topic's colour: the bars, the mix chart, the labels. Mid tones that read on paper and at night. */
.tp-politics { --tp: #5b6ee1; }
.tp-economy { --tp: #2f9a62; }
.tp-business { --tp: #c48a1a; }
.tp-technology { --tp: #3f8fd1; }
.tp-energy { --tp: #7aa63c; }
.tp-conflict { --tp: #c2412f; }
.tp-crime { --tp: #8e5aa8; }
.tp-health { --tp: #d4567f; }
.tp-science { --tp: #1f9fb0; }
.tp-culture { --tp: #e0803a; }
.tp-sport { --tp: #4ba596; }
.tp-accidents { --tp: #9a6a3e; }
.tp-other { --tp: #a39d91; }

.bf-land .bf-stats section {
  max-width: none;
  margin: 0;
  padding: 0;
}
.bf-land-link {
  font-size: 14px;
  font-weight: 650;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 7px;
}
.bf-land-link:hover,
.bf-land-link.on {
  color: var(--text);
  background: var(--surface-2);
}
.bf-foot a {
  color: var(--text-2);
}
.bf-pulse {
  max-width: 1112px;
  margin: -34px auto 30px;
  padding: 10px 16px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-2);
}
.bf-pulse b {
  color: var(--text);
}
.bf-pulse a {
  color: var(--accent);
  font-weight: 650;
  white-space: nowrap;
}
.bf-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
  animation: ns-pulse 2.4s ease-in-out infinite;
}
@keyframes ns-pulse {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bf-pulse-dot {
    animation: none;
  }
}

.ns {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* wide content (tables, charts) scrolls or shrinks instead of widening the page */
  gap: 26px;
}
.ns-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
}
.ns-loading .rp-spin {
  width: 18px;
  height: 18px;
  border-width: 2px;
}
.ns-head h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.ns-head .bf-eyebrow {
  margin-bottom: 8px;
}
.ns-lede {
  margin: 0 0 6px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 62ch;
}
.ns-fresh {
  margin: 0;
  font-size: 13.5px;
}
.ns-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.ns-card {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--tp, var(--accent));
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.ns-card-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ns-card-title {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
}
.ns-card-fig {
  font-size: 18px;
  font-weight: 750;
  color: var(--tp, var(--text));
}
.ns-card-note {
  font-size: 13px;
}
.ns-sec {
  padding: 20px 22px !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.ns-sec > h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.ns-sub {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 72ch;
}
.ns-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}
.ns-follow {
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 650;
}
.ns-stories {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 24px;
}
.ns-stories > li::marker {
  font-weight: 800;
  color: var(--text-3);
}
.ns-story-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.ns-story-head b {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.3;
}
.ns-topic {
  font-size: 11.5px;
  font-weight: 750;
  padding: 1px 7px;
  border-radius: 99px;
  color: var(--tp);
  background: color-mix(in srgb, var(--tp) 14%, transparent);
}
.ns-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 2px;
  font-size: 13px;
  color: var(--text-2);
}
.ns-meter-bar {
  flex: 0 1 220px;
  height: 7px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}
.ns-meter-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.ns-stories details summary {
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.ns-stories details ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.5;
}
.ns-bars {
  display: grid;
  gap: 7px;
}
.ns-bar {
  display: grid;
  grid-template-columns: minmax(110px, 190px) minmax(0, 1fr) 70px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.ns-bar-track {
  position: relative;
  height: 12px;
  border-radius: 4px;
  background: var(--surface-2);
}
.ns-bar-track i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--tp);
}
.ns-bar-track b {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 18px;
  margin-left: -1px;
  background: var(--text);
  opacity: 0.55;
}
.ns-bar-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.ns-bar-val .up {
  color: var(--neg);
}
.ns-bar-val .down {
  color: var(--text-3);
}
.ns-minis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 14px;
}
.ns-mini {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}
.ns-mini b {
  font-size: 17px;
}
.ns-mix {
  margin: 20px 0 0;
}
.ns-mix figcaption {
  margin-bottom: 8px;
  font-size: 14px;
}
.ns-mix-svg {
  display: block;
  width: 100%;
  height: auto;
}
.ns-mix-svg rect {
  fill: var(--tp);
}
.ns-mix-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 12px;
}
.ns-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.ns-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ns-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--tp);
}
.ns-rising {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ns-rising li {
  display: grid;
  grid-template-columns: minmax(90px, 160px) 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.ns-rising .ns-follow {
  margin: 0;
}
.ns-spark {
  display: block;
  width: 90px;
  height: 22px;
  color: var(--accent);
}
.ns-spark .sparkline {
  width: 100%;
  height: 100%;
}
.ns-top h3 {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.ns-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.ns-chips span {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 13.5px;
  background: var(--surface-2);
}
.ns-chips small {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.ns-table-wrap {
  overflow-x: auto;
}
.ns-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ns-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.ns-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ns-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ns-table .pos {
  color: var(--pos);
}
.ns-table .neg {
  color: var(--neg);
}
.ns-table .ns-follow {
  margin: 0;
  white-space: nowrap;
}
.ns-langs {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
}
.ns-langs-bar {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-3);
}
.ns-langs-bar i {
  display: block;
  height: 100%;
}
.ns-langs-bar .l-sv {
  background: var(--accent);
}
.ns-langs-bar .l-en {
  background: #3f8fd1;
}
.ns-langs-bar .l-other {
  background: var(--text-3);
}
.ns-all {
  margin-top: 12px;
}
.ns-all summary,
.ns-method summary {
  cursor: pointer;
  font-size: 14px;
}
.ns-all ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}
.ns-method ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}
.ns-cta {
  margin: 18px 0 0;
}
.ns-trends .rp-tcards {
  margin-top: 16px;
}
@media (max-width: 640px) {
  .bf-land-link {
    display: none;
  }
  .bf-pulse {
    margin: -20px 16px 24px;
  }
  .ns-sec {
    padding: 16px 14px !important;
  }
  .ns-bar {
    grid-template-columns: minmax(0, 1fr) 62px;
  }
  .ns-bar-name {
    grid-column: 1 / -1;
    margin-bottom: -4px;
    font-size: 13px;
  }
  .ns-rising li {
    grid-template-columns: minmax(0, 1fr) 70px;
    gap: 2px 10px;
  }
  .ns-rising li > .muted {
    grid-column: 1;
    font-size: 12.5px;
  }
  .ns-rising .ns-follow {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
  .ns-spark {
    width: 70px;
  }
  .ns-c-spark {
    display: none;
  }
}

/* The masthead between the phone layout and a wide window: three menu items since Nyhetsläget (2026-11-17), so it
   tightens as the window narrows — the edition's name, then the new-report button's words, give way first. */
@media (min-width: 761px) and (max-width: 1040px) {
  .bf-top-in {
    gap: 10px;
  }
  .bf-nav {
    margin-left: 6px;
  }
  .bf-nav a {
    padding: 8px 9px;
  }
  .bf-top .bf-edition span,
  .bf-top .user-chip .uname {
    display: none;
  }
}
@media (min-width: 761px) and (max-width: 880px) {
  .bf-top .bf-new {
    gap: 0;
    padding: 0 10px;
    font-size: 0;
  }
  .bf-top .bf-new svg {
    width: 17px;
    height: 17px;
  }
  .bf-top .lang-btn svg {
    display: none;
  }
}

/* ---------- a shared report (share.html, js/share.js) ---------- */
.rp-shared .bf-page {
  max-width: 900px;
}
.rp-shared-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-2);
}
.rp-shared-note > svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.rp-shared-tools {
  justify-content: center;
}
.rp-shared-hl {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 4px;
  animation: rp-shared-hl 2.4s ease-out 1;
}
@keyframes rp-shared-hl {
  from {
    background: var(--accent-soft);
  }
}
.rp-shared-cta {
  max-width: 860px;
  margin: 28px auto 0 !important;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.rp-shared-cta h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 22px;
}
.rp-shared-cta p {
  max-width: 56ch;
  margin: 0 auto 14px;
  color: var(--text-2);
  line-height: 1.55;
}
.rp-shared-gone {
  max-width: 560px;
  padding-top: 80px !important;
  text-align: center;
}
.rp-shared-gone h1 {
  font-family: var(--serif);
}
@media (max-width: 640px) {
  .rp-shared-top .btn.ghost {
    display: none;
  }
  .rp-shared-tools .seg {
    flex-wrap: wrap;
  }
}
