/* ==========================================================================
   Kirkenesinfo – review theme
   Alt innhold inne i <article class="review"> styles automatisk:
   h1–h4, p, a, ul, ol, table, blockquote, img, figure, hr, strong, code.
   Du trenger ikke klasser eller id-er i selve innholdet.
   ========================================================================== */

:root {
  --ink: #1d2330;
  --ink-soft: #3a4152;
  --muted: #6d675c;
  --paper: #fbf8f3;
  --card: #ffffff;
  --line: #e7dfd1;
  --line-soft: #f1ebe1;
  --accent: #9a7334;
  --accent-soft: #f5ecdc;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  color: #f3eee5;
}
.site-header__inner,
.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: .02em;
  color: #f3eee5;
  text-decoration: none;
}
.brand span { color: #d4b47a; }
.site-nav a {
  color: #f3eee5;
  text-decoration: none;
  font-size: .9rem;
  letter-spacing: .04em;
  border-bottom: 1px solid rgba(212, 180, 122, .6);
  padding-bottom: 2px;
}

/* ---------- Page layout ---------- */
.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 56px 24px 72px;
}

/* ---------- Review section ---------- */
.review { color: var(--ink); }

.review h1,
.review h2,
.review h3,
.review h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -.005em;
}

.review h1 {
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  margin: 0 0 18px;
}

.review h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin: 64px 0 18px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  position: relative;
}
.review h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 56px;
  height: 2px;
  background: var(--accent);
}

.review h3 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
}

.review h4 {
  font-size: 1.1rem;
  margin: 28px 0 8px;
}

.review p { margin: 0 0 1.15em; color: var(--ink-soft); }

/* Ingress: første avsnitt etter metadata */
.review .review-meta + p {
  font-size: 1.15em;
  color: var(--ink);
  line-height: 1.65;
}

.review a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  word-break: break-word;
}

.review strong, .review b { color: var(--ink); font-weight: 600; }

/* Lister */
.review ul,
.review ol {
  margin: 0 0 1.4em;
  padding: 0;
  list-style: none;
}
.review li {
  position: relative;
  padding-left: 30px;
  margin: 0 0 .6em;
  color: var(--ink-soft);
}
.review ul > li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: .72em;
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
}
.review ol { counter-reset: item; }
.review ol > li { counter-increment: item; }
.review ol > li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: .15em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif);
  font-size: .8rem;
  line-height: 20px;
  text-align: center;
}
.review li ul, .review li ol { margin: .5em 0 0; }

/* Tabeller */
.review table {
  width: 100%;
  margin: 8px 0 1.8em;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: .92rem;
  line-height: 1.5;
}
.review thead th {
  background: var(--ink);
  color: #f3eee5;
  font-weight: 600;
  text-align: left;
  letter-spacing: .02em;
}
.review th,
.review td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.review tbody tr:nth-child(even) { background: var(--line-soft); }
.review tbody tr:last-child td { border-bottom: 0; }
.review td:first-child { font-weight: 600; color: var(--ink); }

/* Sitat, bilder, linjer */
.review blockquote {
  margin: 1.6em 0;
  padding: 18px 24px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.1em;
  color: var(--ink);
}
.review blockquote p:last-child { margin-bottom: 0; }

.review img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.6em auto;
  border-radius: 4px;
}
.review figure { margin: 1.8em 0; }
.review figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }

.review hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 3em 0;
}

.review code {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: .88em;
  background: var(--line-soft);
  padding: 2px 6px;
  border-radius: 3px;
}

/* FAQ-spørsmål (h3 etter siste h2) får et rolig kort-preg */
.review h2 ~ h3 + p { margin-bottom: 1.3em; }

/* ---------- Metadata: sist oppdatert ---------- */
.review .review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0 0 28px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: .85rem;
  color: var(--muted);
  letter-spacing: .02em;
}
.review .review-meta strong { color: var(--ink); font-weight: 600; }

/* ---------- Innholdsfortegnelse ---------- */
.review .toc {
  margin: 36px 0 8px;
  padding: 24px 28px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
}
.review .toc[hidden] { display: none; }
.review .toc__title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}
.review .toc ol {
  margin: 0;
  columns: 2;
  column-gap: 36px;
  font-size: .95rem;
  line-height: 1.45;
}
.review .toc li {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 .7em;
}
.review .toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c9c3b8;
  font-size: .85rem;
  line-height: 1.6;
}
.site-footer__inner { padding-top: 32px; padding-bottom: 32px; align-items: flex-start; }
.site-footer p { margin: 6px 0 0; max-width: 560px; }
.site-footer a { color: #e7d3ab; }
.site-footer .footer-links { display: flex; flex-direction: column; gap: 6px; }
.age {
  display: inline-block;
  border: 1px solid #d4b47a;
  color: #d4b47a;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  line-height: 32px;
  text-align: center;
  font-weight: 600;
  font-size: .8rem;
  margin-right: 10px;
  vertical-align: middle;
}

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .page { padding: 36px 18px 56px; }
  .review h2 { margin-top: 48px; }
  .review .toc { padding: 20px 20px 12px; }
  .review .toc ol { columns: 1; }
  .review table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .review td, .review th { white-space: normal; min-width: 140px; }
}

@media print {
  .site-header, .site-footer, .review .toc { display: none; }
  body { background: #fff; }
}
