/* Aftonkuriren – huvudstilmall. Tätt och rubrikdrivet. Inga tankestreck i texter. */
:root {
  --red: #d0021b;
  --red-dark: #a80016;
  --ink: #111;
  --ink-2: #333;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --bg: #fff;
  --bg-soft: #f5f5f3;
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: inherit; text-decoration: none; }
a:hover .h, a.h:hover { color: var(--red); }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ── Sidhuvud ─────────────────────────────────────────── */
.top { border-bottom: 3px solid var(--red); background: var(--bg); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 58px; }
.logo { font: 800 36px/1 var(--head); letter-spacing: -0.5px; color: var(--red); text-transform: uppercase; white-space: nowrap; }
.nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; white-space: nowrap; padding: 6px 0; font: 600 17px var(--head); text-transform: uppercase; letter-spacing: .3px; }
.nav a:hover, .nav .current-menu-item > a { color: var(--red); }
.top-right { display: flex; align-items: center; gap: 14px; }
.date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.search { position: relative; }
.search summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 34px; height: 34px; }
.search summary::-webkit-details-marker { display: none; }
.search[open] .search-form { position: absolute; right: 0; top: 40px; width: 300px; z-index: 20; background: var(--bg); padding: 8px; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.search-form { display: flex; gap: 6px; }
.search-form input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #ccc; font: inherit; }
.search-form button { padding: 8px 12px; border: 0; background: var(--red); color: #fff; font: 700 14px var(--head); text-transform: uppercase; cursor: pointer; }

/* ── Senaste-raden ────────────────────────────────────── */
.ticker { background: var(--ink); color: #fff; font-size: 13px; }
.ticker .wrap { display: flex; gap: 14px; align-items: center; height: 34px; overflow: hidden; }
.ticker b { flex: none; background: var(--red); padding: 3px 8px; font: 700 13px var(--head); letter-spacing: .5px; text-transform: uppercase; }
.ticker-items { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 94%, transparent); }
.ticker-track { display: inline-flex; animation: ak-ticker 45s linear infinite; will-change: transform; }
.ticker-items:hover .ticker-track, .ticker-items:focus-within .ticker-track { animation-play-state: paused; }
.ticker-set { display: inline-flex; }
.ticker-items a { opacity: .9; }
.ticker-items a:hover { opacity: 1; text-decoration: underline; }
.ticker-items a::after { content: "•"; margin: 0 14px; opacity: .5; }
.ticker-upd { color: #ffb3b3; font-weight: 600; }
@keyframes ak-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-set[aria-hidden] { display: none; }
}

/* ── Byggstenar ───────────────────────────────────────── */
.kick { font: 700 13px var(--head); text-transform: uppercase; letter-spacing: .7px; color: var(--red); }
.kick--ad { display: inline-block; background: #fff3c4; color: #6b5200; padding: 1px 6px; }
.h { display: block; font-family: var(--head); font-weight: 700; line-height: 1.15; letter-spacing: 0; margin: 4px 0 0; }
.meta { font-size: 13px; color: var(--muted); font-family: var(--body); font-weight: 400; text-transform: none; letter-spacing: 0; }
.noimg { display: block; background: linear-gradient(135deg, #eee, #f7f7f7); }
.lead img, .card img, .row img, .lead .noimg, .card .noimg, .row .noimg { width: 100%; object-fit: cover; background: var(--bg-soft); }

/* ── Startsida och arkiv ──────────────────────────────── */
.front { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding-top: 16px; }
.lead { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.lead img, .lead .noimg { aspect-ratio: 16/10; }
.lead .h { font-size: 44px; line-height: 1.08; }
.lead p { margin: 10px 0 0; color: var(--ink-2); font-size: 17px; }
.lead .meta { margin-top: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.card img, .card .noimg { aspect-ratio: 16/9; margin-bottom: 8px; }
.grid3 .h { font-size: 24px; }
.list { padding: 4px 0; }
.row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row img, .row .noimg { aspect-ratio: 4/3; }
.row .h { font-size: 22px; }
.row p { margin: 4px 0 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 20px 0 0; padding-top: 8px; border-top: 3px solid var(--ink); font: 800 23px var(--head); text-transform: uppercase; }
.sec-title a { font: 600 13px var(--body); text-transform: none; color: var(--muted); }
.sec-title a:hover { color: var(--red); }
.sec4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 12px 0; }
.sec4 .h { font-size: 20px; }
.archive-head { padding-bottom: 8px; border-bottom: 3px solid var(--ink); margin-bottom: 4px; }
.archive-head h1 { font: 800 38px/1.05 var(--head); margin: 0; text-transform: uppercase; }
.archive-desc { color: var(--ink-2); margin: 6px 0 0; max-width: 720px; }
.archive-head .search-form { margin-top: 10px; max-width: 480px; }
.empty { color: var(--muted); padding: 20px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0; }
.page-numbers { padding: 6px 11px; border: 1px solid var(--line); font: 700 15px var(--head); }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
a.page-numbers:hover { border-color: var(--red); color: var(--red); }

/* ── Sidokolumn ───────────────────────────────────────── */
.side .box { margin-bottom: 20px; }
.box-title { font: 800 19px var(--head); text-transform: uppercase; border-top: 3px solid var(--red); padding-top: 6px; margin: 0 0 4px; }
.latest a { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.latest a:hover span { color: var(--red); }
.latest time { color: var(--red); font: 700 14px var(--head); }
.most { counter-reset: n; }
.most a { display: grid; grid-template-columns: 30px 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.most a::before { counter-increment: n; content: counter(n); font: 800 26px/1 var(--head); color: var(--red); }
.most .h { font-size: 19px; margin: 0; }
.cases a { display: block; padding: 9px 10px; margin-bottom: 6px; background: var(--bg-soft); border-left: 3px solid var(--red); }
.cases .h { font-size: 19px; margin: 0; }
.cases .meta { display: block; margin-top: 2px; }

/* ── Artikel ──────────────────────────────────────────── */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding-top: 16px; }
.article-main { max-width: 720px; min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--red); font-weight: 700; text-transform: uppercase; font-family: var(--head); font-size: 14px; letter-spacing: .5px; }
.article-main h1, .article-title { font: 800 46px/1.08 var(--head); letter-spacing: -0.2px; margin: 4px 0 10px; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.byline b { color: var(--ink); }
.byline a:hover b { color: var(--red); }
.hero { margin: 0 0 16px; }
.hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero figcaption, .wp-caption-text, figcaption { font-size: 12px; color: var(--muted); padding-top: 5px; }
.article-body { font-size: 18px; line-height: 1.65; overflow-wrap: break-word; }
.article-body h2 { font: 800 28px/1.15 var(--head); margin: 28px 0 8px; }
.article-body h3 { font: 700 22px/1.2 var(--head); margin: 18px 0 4px; }
.article-body p { margin: 0 0 14px; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 14px; }
/* Listor bredvid flytande bilder: egen ruta så punkterna hamnar bredvid bilden, inte ovanpå den */
.article-body ul, .article-body ol { display: flow-root; }
/* Delningsknappar (Spice Social Share) ligger som en <ul> i artikeltexten: undanta från listreglerna, en rad under allt */
.article-body .spice_share_wrapper { clear: both; margin-top: 18px; }
.article-body ul.spice_social_share_list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 6px 0 0; list-style: none; }
.article-body .spice_social_share_list li { margin: 0; padding: 0; float: none; }
.article-body .spice_social_share_list li::marker { content: none; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; }
.article-body img { height: auto; }
.article-body figure { margin: 16px 0; }
.article-body blockquote { margin: 16px 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--red); font-size: 19px; font-weight: 500; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 16px; display: block; overflow-x: auto; }
.article-body th { text-align: left; font: 700 13px var(--head); text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border-bottom: 2px solid var(--ink); padding: 6px 12px 6px 0; }
.article-body td { border-bottom: 1px solid var(--line); padding: 7px 12px 7px 0; vertical-align: top; }
.alignleft { float: left; margin: 4px 16px 10px 0; }
.alignright { float: right; margin: 4px 0 10px 16px; }
.aligncenter { margin-left: auto; margin-right: auto; }
/* Flytande bilder i gamla artiklar: max 40 % bredd, staplas i stället för att hamna sida vid sida,
   rubriker och listor börjar under bilden (annars pressas texten till ett par bokstäver per rad). */
.article-body img, .article-body .wp-caption { max-width: 100%; }
.article-body .alignleft, .article-body .alignright { max-width: 40%; }
.article-body .alignleft { clear: left; }
.article-body .alignright { clear: right; }
.article-body img.alignleft, .article-body img.alignright { height: auto; }
.article-body .wp-caption.alignleft img, .article-body .wp-caption.alignright img { width: 100%; height: auto; }
.article-body h2, .article-body h3, .article-body table, .article-body .ak-kallor { clear: both; }
.article-body .aligncenter { display: block; }
/* Mindre bilder i listartiklar (TMDB-BILD-markörer): flyter till höger bredvid texten */
.article-body .ak-inline-bild { float: right; clear: right; width: 40%; margin: 4px 0 10px 16px; }
.article-body .ak-inline-bild img { width: 100%; height: auto; display: block; }
.article-body .ak-inline-bild figcaption { font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; }
.tags a { font-size: 12px; padding: 3px 9px; background: var(--bg-soft); color: var(--ink-2); }
.tags a:hover { color: var(--red); }
.related { margin-top: 12px; }

/* Ärendesidor ("allt vi vet"), se aftonkuriren/templates/arendesida.md */
.ak-meta { display: none; } /* datum och byline visas i temats byline-rad */
.ak-ingress { font-size: 19px; font-weight: 500; line-height: 1.45; }
.ak-kortsagt { background: #fff6f6; border: 1px solid #f3c9cd; border-left: 4px solid var(--red); padding: 12px 16px; margin: 0 0 18px; font-size: 16px; }
.article-body .ak-kortsagt__rubrik { font: 800 15px var(--head); text-transform: uppercase; letter-spacing: .6px; color: var(--red); margin: 0 0 6px; }
.ak-kortsagt ul { margin: 0; }
.ak-oklart li::marker { content: "? "; color: var(--red); font-weight: 700; }
.ak-tidslinje td:first-child { white-space: nowrap; font-weight: 600; color: var(--red-dark); width: 110px; }
.ak-kallor { font-size: 14px; color: var(--ink-2); }
.ak-andringslogg { font-size: 13px; color: var(--muted); background: var(--bg-soft); padding: 10px 14px; margin-top: 24px; }
.ak-andringslogg p { margin: 0; }
.ak-andringslogg ul { margin: 4px 0 0; }

/* ── Sidfot ───────────────────────────────────────────── */
.foot { margin-top: 32px; background: var(--ink); color: #bbb; font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 18px 16px; }
.foot .logo { font-size: 22px; margin-right: 12px; }
.foot-nav ul { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.foot a:hover { color: #fff; }
.foot-note { width: 100%; margin: 6px 0 0; font-size: 12px; color: #888; }
.foot-note a { text-decoration: underline; }

/* ── Mobil ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .front, .article { grid-template-columns: 1fr; }
  .lead { grid-template-columns: 1fr; }
  .lead .h { font-size: 32px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .sec4 { grid-template-columns: 1fr 1fr; }
  .date { display: none; }
  .article-main { max-width: none; }
}
@media (max-width: 560px) {
  .article-body .alignleft, .article-body .alignright { float: none; max-width: 100%; margin: 12px auto; display: block; }
  .article-body .ak-inline-bild { float: none; width: 100%; margin: 12px 0; }
  .top .wrap { flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; padding-bottom: 4px; }
  .logo { font-size: 28px; }
  .top-right { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; }
  .search[open] .search-form { width: calc(100vw - 32px); }
  .grid3 { grid-template-columns: 1fr; }
  .grid3 .card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
  .grid3 .card img, .grid3 .card .noimg { margin: 0; aspect-ratio: 4/3; }
  .grid3 .h { font-size: 20px; }
  .row { grid-template-columns: 110px 1fr; gap: 12px; }
  .row .h { font-size: 19px; }
  .sec4 .h { font-size: 18px; }
  .article-main h1, .article-title { font-size: 34px; }
  .article-body { font-size: 17px; }
  .archive-head h1 { font-size: 30px; }
}

/* ── Nästa artikel (scroll) ───────────────────────────── */
.article-stream { min-width: 0; }
.article-title a:hover { color: var(--red); }
.next-article { margin-top: 40px; }
.next-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font: 800 15px var(--head); text-transform: uppercase; letter-spacing: .8px; color: var(--red); }
.next-divider::before, .next-divider::after { content: ""; flex: 1; height: 3px; background: var(--ink); }
.next-sentinel { height: 1px; }
