/* Agderpesten. Newsprint by default; nipeb.no's theme takes over via theme.js. */
@font-face {
  font-family: "Fraktur";
  src: url("fraktur.woff2") format("woff2");
  font-display: swap;
}
:root {
  --paper: #f3eee2;
  --paper-2: #ebe4d3;
  --ink: #1d1b17;
  --muted: #6b6558;
  --accent: #a3261d;
  --link: #1d1b17;
  --rule: #c9bfa8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "DejaVu Serif", serif;
  --sans: "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0 auto;
  max-width: 1080px;
  padding: 36px 16px 48px;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--serif);
}
a { color: var(--link); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; }

/* ---------- masthead ---------- */
.masthead { text-align: center; border-bottom: 3px double var(--ink); padding-bottom: 10px; margin-bottom: 24px; }
.masthead .ears {
  display: flex; justify-content: space-between; gap: 12px;
  font: 12px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  border-bottom: 1px solid var(--rule); padding-bottom: 6px;
}
.masthead .title {
  display: block; margin: 10px 0 2px;
  font: 400 clamp(52px, 13vw, 124px)/1 "Fraktur", var(--serif); letter-spacing: 0;
  color: var(--ink); text-decoration: none;
}
.masthead .motto { margin: 0; font-style: italic; color: var(--muted); }
.masthead .weather {
  margin: 12px auto 0; max-width: 680px; padding: 6px 10px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font: 14px/1.4 var(--sans);
}
.masthead nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 10px;
  font: 700 13px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .06em;
}
.masthead nav a { text-decoration: none; }
.masthead nav a:hover { color: var(--accent); }
.masthead.compact { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; text-align: left; }
.masthead.compact .title { font-size: 40px; margin: 0; }
.masthead.compact nav { margin: 0; justify-content: flex-start; }

/* ---------- front page ---------- */
.kicker {
  margin: 0 0 6px; font: 700 12px/1.3 var(--sans);
  text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
}
.lead { padding-bottom: 22px; border-bottom: 1px solid var(--ink); margin-bottom: 20px; }
.lead h2 { font-size: clamp(30px, 5.4vw, 54px); font-weight: 800; }
.lead .lede { font-size: 20px; max-width: 760px; }
.teaser h2 { font-size: 22px; font-weight: 700; }
.teaser h2 a, .lead h2 a { color: var(--ink); text-decoration: none; }
.teaser h2 a:hover, .lead h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.lede { margin: 8px 0 0; color: var(--ink); }
.teaser .lede { font-size: 15px; color: var(--muted); }
.section { margin-top: 28px; }
.section-head { font-size: 40px; margin-bottom: 18px; }
.section-title {
  font: 800 14px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em;
  border-top: 3px solid var(--ink); padding-top: 6px; margin-bottom: 14px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px 28px; }
.grid .teaser { border-top: 1px solid var(--rule); padding-top: 12px; }
.empty { text-align: center; font-style: italic; color: var(--muted); padding: 60px 0; }

/* ---------- front page tiles ---------- */
.tile h2, .tile h3 { font-weight: 800; letter-spacing: -.005em; }
.tile h2 a, .tile h3 a { color: var(--ink); text-decoration: none; }
.tile a:hover h2, .tile h2 a:hover, .tile h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.tile .pic { display: block; margin-bottom: 10px; overflow: hidden; }
.tile img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  filter: grayscale(1) sepia(.18) contrast(1.05); transition: transform .4s ease; }
.tile a:hover img { transform: scale(1.03); }
.tile .lede { font-size: 15px; line-height: 1.5; color: var(--muted); }

.front-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px;
  padding-bottom: 24px; border-bottom: 3px double var(--ink); }
.t-lead h2 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.05; }
.t-lead .lede { font-size: 19px; color: var(--ink); max-width: 680px; }
.t-lead .pic { margin-bottom: 14px; }
.side { border-left: 1px solid var(--rule); padding-left: 24px; }
.side .section-title { margin-top: 0; }
.t-compact { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: start;
  padding: 12px 0; border-bottom: 1px solid var(--rule); }
.t-compact .pic { order: 2; margin: 0; }
.t-compact h3 { font-size: 17px; line-height: 1.25; }
.t-compact .kicker { margin-bottom: 4px; }

.row { display: grid; gap: 26px 28px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.row-1 { grid-template-columns: 1fr; }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.t-overlay a { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; }
.t-overlay img { aspect-ratio: 16 / 10; }
.t-overlay .cap { position: absolute; inset: auto 0 0 0; padding: 60px 18px 16px;
  background: linear-gradient(transparent, rgba(12, 10, 8, .88)); }
.t-overlay .kicker { color: #f3d9a4; }
.t-overlay h2 { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.15; color: #fff; }

.t-standard h3 { font-size: 21px; line-height: 1.2; }
.t-wide { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.t-wide .pic { margin: 0; }
.t-wide h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.12; }
.t-mini h3 { font-size: 16px; line-height: 1.25; }
.t-mini .pic { margin-bottom: 8px; }

.t-text h3 { font-size: 22px; line-height: 1.2; }
.t-text.opinion { background: var(--paper-2); padding: 16px 18px; border-top: 3px solid var(--accent); align-self: start; }
.t-text.opinion h3 { font-style: italic; }
.t-text.opinion h3::before { content: "«"; color: var(--accent); }
.t-text.opinion h3::after { content: "»"; color: var(--accent); }
.t-text .by { margin: 8px 0 0; font: 700 13px/1.3 var(--sans); color: var(--ink); }

@media (max-width: 860px) {
  .front-top, .row-wide, .row-3 { grid-template-columns: minmax(0, 1fr); }
  .side { border-left: 0; padding-left: 0; }
  .row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .row-2, .t-wide { grid-template-columns: minmax(0, 1fr); }
  .t-wide .pic { margin-bottom: 10px; }
  .t-standard { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 14px; }
  .t-standard .pic { grid-row: 1 / span 3; margin: 0; }
  .t-standard .lede { display: none; }
  .t-standard h3 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .tile img { transition: none; } .tile a:hover img { transform: none; } }

/* ---------- article ---------- */
.story { max-width: 700px; margin: 0 auto; }
.story h1 { font-size: clamp(30px, 6vw, 48px); font-weight: 800; }
.story .lede { font-size: 21px; font-weight: 600; margin-top: 14px; }
.satire {
  display: inline-block; margin-right: 8px; padding: 1px 6px;
  background: var(--accent); color: var(--paper); border-radius: 2px;
}
.byline { font: 14px/1.4 var(--sans); color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.text p { margin: 0 0 1em; }
.text p:first-child::first-letter { float: left; font: 400 3.8em/.9 "Fraktur", var(--serif); padding: 4px 8px 0 0; color: var(--accent); }
.skull {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 16px;
  font: 700 15px/1 var(--sans); color: var(--ink); background: transparent;
  border: 2px solid var(--ink); border-radius: 999px; cursor: pointer;
}
.skull .icon { font-size: 24px; line-height: 1; filter: grayscale(1); transition: filter .2s, transform .2s; }
.skull:hover .icon { transform: rotate(-12deg); }
.skull[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.skull[aria-pressed="true"] .icon { filter: none; }
.skull.pop .icon { animation: pop .45s ease-out; }
@keyframes pop { 40% { transform: scale(1.6) rotate(-15deg); } }
.skull .count:empty { display: none; }
.skulls { color: var(--muted); font-weight: 400; letter-spacing: 0; }
.inspired {
  margin-top: 28px; padding: 12px 14px; background: var(--paper-2);
  border-left: 3px solid var(--accent); font: 14px/1.5 var(--sans); color: var(--muted);
}
.inspired p { margin: 0; }
.back { font: 14px/1.4 var(--sans); margin-top: 24px; }
/* ---------- illustrations ---------- */
.illustration { margin: 18px 0 22px; }
.illustration img, .pic img {
  display: block; width: 100%; height: auto; background: var(--paper-2);
  filter: grayscale(1) sepia(.18) contrast(1.05); border: 1px solid var(--rule);
}
.illustration figcaption {
  margin-top: 6px; font: italic 14px/1.45 var(--serif); color: var(--muted);
  border-bottom: 1px solid var(--rule); padding-bottom: 8px;
}
.illustration .credit { display: block; font: 11px/1.4 var(--sans); font-style: normal; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.pic { display: block; margin-bottom: 10px; }
.lead.has-pic { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
.lead.has-pic .pic { grid-row: 1 / span 3; grid-column: 2; margin: 0; }
.lead.has-pic > :not(.pic) { grid-column: 1; }
@media (max-width: 760px) {
  .lead.has-pic { display: block; }
  .lead.has-pic .pic { margin-bottom: 12px; }
}

.read-more { margin-top: 32px; border-top: 3px solid var(--ink); padding-top: 8px; }
.read-more h2 { font: 800 14px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.read-more ul { list-style: none; margin: 0; padding: 0; }
.read-more li { border-bottom: 1px solid var(--rule); }
.read-more a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; line-height: 1.3; }
.read-more a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.read-more .kicker { display: block; margin-bottom: 2px; }

/* ---------- plain pages ---------- */
.plain { max-width: 700px; margin: 0 auto; }
.plain h1 { font-size: 40px; margin-bottom: 16px; }
.archive { list-style: none; padding: 0; }
.archive li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.archive .date { font: 13px var(--sans); color: var(--muted); margin-right: 8px; }
.staff dt { font-weight: 700; margin-top: 14px; }
.staff dd { margin: 2px 0 0; color: var(--muted); }

.colophon {
  margin-top: 48px; padding-top: 14px; border-top: 3px double var(--ink);
  font: 13px/1.5 var(--sans); color: var(--muted); text-align: center;
}
.colophon p { margin: 0 0 6px; }
.colophon .owner { margin-top: 12px; font-size: 12px; font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .skull .icon { transition: none; }
  .skull.pop .icon { animation: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; padding-top: 40px; }
  .masthead .ears { font-size: 11px; }
}
