/* SATE — Sanningarnas Telegrambyrå
   Old daily newspaper look: black on paper, serif text, thin/thick rules. */

:root {
  --paper: #f6f3ea;
  --ink: #1a1a18;
  --ink-soft: #4a4740;
  --rule: #1a1a18;
  --box-bg: #ece8db;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --max: 880px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

hr.rule {
  border: none;
  border-top: 4px double var(--rule);
  margin: 28px auto;
  max-width: var(--max);
}
hr.rule--tight {
  border-top: 1px solid var(--rule);
  margin: 14px 0 22px;
  max-width: none;
}

/* Masthead */

.masthead-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 14px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
}

.masthead-main {
  text-align: center;
  padding: 18px 20px 10px;
  border-top: 3px solid var(--rule);
  border-bottom: 3px solid var(--rule);
  margin-top: 6px;
}

.wordmark-link { display: inline-block; }
.wordmark-link:hover { text-decoration: none; }

.wordmark {
  display: block;
  width: 460px;
  max-width: 100%;
  height: auto;
}

.masthead-nav {
  border-bottom: 1px solid var(--rule);
}
.masthead-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 10px 0;
  flex-wrap: wrap;
}
.masthead-nav li {
  padding: 0 14px;
  border-right: 1px solid var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.masthead-nav li:last-child { border-right: none; }
.masthead-nav a.active { text-decoration: underline; }

.masthead-categories {
  padding: 7px 0;
  border-bottom: 1px solid #ccc6b3;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.masthead-categories-list {
  order: 1;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
}
.masthead-categories-list li {
  white-space: nowrap;
}
.masthead-categories-list li:not(:first-child)::before {
  content: "\2022";
  margin-right: 12px;
  color: var(--ink-soft);
}
.masthead-categories-list a {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.masthead-categories-list a:hover { color: var(--ink); }

/* Desktop: show up to 6 categories inline, no toggle needed. */
.masthead-categories-list li:nth-child(n+7) { display: none; }
.masthead-categories-toggle { order: 2; display: none; }
.masthead-categories-toggle summary {
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 4px;
}
.masthead-categories-toggle summary::-webkit-details-marker { display: none; }
.masthead-categories-toggle summary::marker { content: ""; }
.masthead-categories-toggle summary::after { content: "\25be"; margin-left: 4px; }
.masthead-categories-toggle[open] summary::after { content: "\25b4"; }
.masthead-categories-toggle .label-fewer { display: none; }
.masthead-categories-toggle[open] .label-more { display: none; }
.masthead-categories-toggle[open] .label-fewer { display: inline; }

/* Main content */

main.wrap { padding-top: 28px; padding-bottom: 40px; }

.kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.kicker a { color: var(--ink-soft); }
.kicker a:hover { color: var(--ink); }

.read-more {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.back-link {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}
.back-link a { color: var(--ink-soft); }
.back-link a:hover { color: var(--ink); }

#continue-reading { scroll-margin-top: 16px; }

.story-headline a { color: var(--ink); }
.story-headline { margin: 0 0 6px; font-size: 22px; line-height: 1.2; }

.dek {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 8px;
  font-size: 16px;
}

.byline {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

/* Lead story */

.story--lead .story-headline {
  font-size: 40px;
  line-height: 1.08;
}
.story--lead .dek { font-size: 19px; }
.story--lead .story-body { font-size: 18px; }
.story--lead .story-body > p:first-of-type::first-letter {
  float: left;
  font-size: 64px;
  line-height: 52px;
  padding: 4px 8px 0 0;
  font-weight: 700;
}

/* Story grid */

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 28px;
}
.story-grid .story {
  padding-bottom: 18px;
  border-bottom: 1px solid #ccc6b3;
  margin-bottom: 18px;
}

@media (max-width: 720px) {
  .story-grid { grid-template-columns: 1fr; }
  .wordmark { width: 320px; }
  .story--lead .story-headline { font-size: 30px; }
  .masthead-top {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 14px;
    text-align: center;
  }
  .masthead-nav ul { gap: 4px 0; }
  .masthead-categories-toggle { display: block; }
  .masthead-categories-list li:nth-child(n+3) { display: none; }
  .masthead-categories-toggle[open] ~ .masthead-categories-list li:nth-child(n+3) { display: block; }
}

/* Single story */

.single-headline { font-size: 38px; line-height: 1.1; margin: 0 0 8px; }
.single-story .dek { font-size: 19px; }
.story-body p { margin: 0 0 16px; }
.story-body > p:first-of-type::first-letter {
  float: left;
  font-size: 60px;
  line-height: 48px;
  padding: 4px 8px 0 0;
  font-weight: 700;
}
.story-body.plain-body > p:first-of-type::first-letter {
  all: unset;
}

/* Bakgrund / behind-the-news box */

.bakgrund {
  background: var(--box-bg);
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 15px;
  clear: both;
}
.bakgrund-titel {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.bakgrund-innehall p:last-child { margin-bottom: 0; }

/* Vote widget */

.vote-stat { text-transform: none; letter-spacing: normal; }

.vote-box {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  margin: 24px 0;
}
.vote-question {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.vote-buttons { display: flex; gap: 10px; }
.vote-buttons[hidden] { display: none; }
.vote-btn {
  font-family: var(--serif);
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 6px 16px;
  cursor: pointer;
}
.vote-btn:hover:not(:disabled) { background: var(--box-bg); }
.vote-btn:disabled { opacity: 0.5; cursor: default; }
.vote-result {
  margin: 10px 0 0;
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
}

/* Section pages */

.section-title { font-size: 32px; margin: 0 0 6px; }
.section-title--small { font-size: 22px; }
.section-intro { color: var(--ink-soft); font-style: italic; margin-bottom: 10px; }

/* Pagination */

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  list-style: none;
  margin: 30px 0 10px;
  padding: 16px 0 0;
  border-top: 1px solid var(--ink-soft);
  font-size: 14px;
}
.pagination .page-link {
  display: inline-block;
  min-width: 28px;
  padding: 4px 6px;
  text-align: center;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--ink-soft);
}
.pagination .page-link:hover { background: var(--box-bg); }
.pagination .page-item.active .page-link {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.pagination .page-item.disabled .page-link {
  color: var(--ink-soft);
  opacity: 0.4;
  cursor: default;
}

/* Footer */

.site-footer {
  border-top: 3px solid var(--rule);
  padding: 18px 0 30px;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}
.colophon { max-width: 560px; margin: 0 auto 6px; }
.fineprint { margin: 0; }
