/* --- SAOL clone: minimal editorial style --- */

:root {
  --ink: #111111;
  --ink-soft: #333333;
  --ink-muted: #7a7a7a;
  --rule: #e6e6e6;
  --paper: #ffffff;
  --accent: #111111;
  --max-w: 1200px;
  --content-w: 900px;
  --gutter: 64px;
}

html,
body {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans",
    "Nimbus Sans", sans-serif;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.005em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}
a:hover {
  color: var(--ink-muted);
}

/* --- Layout shell --- */

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  min-width: 0;
}

.header-inner .brand {
  font-weight: 600;
  letter-spacing: -0.005em;
}

.header-inner .divider {
  color: var(--ink-muted);
  padding: 0 4px;
}

.header-inner .tagline {
  color: var(--ink);
  font-style: normal;
}

.site-main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 72px var(--gutter) 96px;
  box-sizing: border-box;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px var(--gutter);
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
}

/* --- Home page --- */

.hero {
  padding: 24px 0 56px;
}

.kicker {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 22px;
  letter-spacing: 0.005em;
}

.hero-title {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.section-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.section {
  padding: 64px 0 8px;
}

.section-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0 0 28px;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.item-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1.1fr) minmax(0, 1.6fr) 140px;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 200ms ease;
}

.item-row:hover {
  background: #fafafa;
}

.item-row .kind {
  color: var(--ink-soft);
  font-size: 15px;
}

.item-row .title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.item-row .description {
  color: var(--ink-soft);
  font-size: 15px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.item-row .cta {
  text-align: right;
  color: var(--ink);
  font-size: 15px;
  white-space: nowrap;
}

.item-row .cta .arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform 220ms ease;
}

.item-row:hover .cta .arrow {
  transform: translateX(4px);
}

.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.tips-list li {
  border-bottom: 1px solid var(--rule);
}

.tips-list a {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  font-size: 18px;
  font-weight: 400;
  transition: background 200ms ease, padding 200ms ease;
}

.tips-list a:hover {
  background: #fafafa;
  padding-left: 8px;
  padding-right: 8px;
}

.tips-list .arrow {
  color: var(--ink);
  transition: transform 220ms ease;
}

.tips-list a:hover .arrow {
  transform: translateX(4px);
}

/* --- Subpage (text list / bild) header --- */

.page-head {
  padding: 24px 0 40px;
}

.page-eyebrow {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 22px;
}

.page-title {
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --- Text list --- */

.text-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

.text-list li {
  border-bottom: 1px solid var(--rule);
}

.text-list a {
  display: block;
  padding: 24px 0;
  transition: background 200ms ease, padding 200ms ease;
}

.text-list a:hover {
  background: #fafafa;
  padding-left: 10px;
  padding-right: 10px;
}

.text-list .t-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
}

.text-list .t-sub {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 8px;
}

.text-list .t-meta {
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* --- Bild page --- */

.bild-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  align-items: end;
}

.bild-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bild-card .image-wrap {
  overflow: hidden;
  background: #f4f4f4;
  aspect-ratio: 3 / 4;
}

.bild-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.bild-card:hover img {
  transform: scale(1.03);
}

.bild-card .caption {
  font-size: 15px;
  color: var(--ink);
}

/* --- Article (markdown) --- */

.article {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 8px 0 40px;
}

.article .article-meta {
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.article h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.article h2 {
  font-size: 26px;
  font-weight: 500;
  margin: 48px 0 16px;
  letter-spacing: -0.005em;
}

.article h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 36px 0 12px;
}

.article p {
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 22px;
  color: var(--ink);
}

.article p em {
  color: var(--ink-soft);
}

.article blockquote {
  margin: 32px 0;
  padding: 8px 0 8px 24px;
  border-left: 2px solid var(--ink);
  font-size: 20px;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
}

.article a {
  border-bottom: 1px solid var(--ink);
}

.article a:hover {
  border-bottom-color: var(--ink-muted);
}

.article hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 40px 0;
}

.article ul,
.article ol {
  padding-left: 22px;
  margin: 0 0 22px;
}

.article li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.article .footnotes {
  border-top: 1px solid var(--rule);
  margin-top: 48px;
  padding-top: 20px;
  font-size: 15px;
  color: var(--ink-soft);
}

.article-nav {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}

.article-nav a {
  border-bottom: none;
  color: var(--ink);
}

.article-nav a:hover {
  color: var(--ink-muted);
}

/* --- Simple loader / states --- */

.state-msg {
  padding: 40px 0;
  color: var(--ink-muted);
  font-size: 16px;
}

/* --- Responsive --- */

@media (max-width: 900px) {
  .item-row {
    grid-template-columns: 90px minmax(0, 1fr) 110px;
  }
  .item-row .description {
    display: none;
  }
  .bild-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  }

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }
  .site-main {
    padding: 40px var(--gutter) 60px;
  }
  .header-inner {
    padding: 14px 0;
    font-size: 14px;
  }
  .item-row {
    grid-template-columns: 70px minmax(0, 1fr) 88px;
    gap: 12px;
    padding: 18px 0;
  }
  .item-row .title {
    font-size: 17px;
  }
  .item-row .kind,
  .item-row .cta {
    font-size: 13px;
  }
  .tips-list a {
    font-size: 15px;
    padding: 16px 0;
  }
  .bild-grid {
    grid-template-columns: 1fr;
  }
  .article p {
    font-size: 17px;
  }
}

/* --- selection --- */
::selection {
  background: #111;
  color: #fff;
}


/* Clean v4 custom defaults */
main p,
main li { font-size: 16px; }
.site-footer p,
.site-footer li { font-size: inherit; }
.image-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; color: inherit; text-align: inherit; }
.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.96); display: grid; place-items: center; padding: 48px var(--gutter); cursor: zoom-out; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: grid; gap: 14px; }
.lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; display: block; }
.lightbox-close { position: fixed; top: 24px; right: 28px; border: 0; background: transparent; font-size: 40px; line-height: 1; cursor: pointer; }

/*
  Custom CSS
  ----------
  Put your own design changes in this file. It loads last, so it can override
  the base/layout/typography/gallery styles without changing the core files.

  Example:
  main p,
  main li {
    font-size: 16px;
  }
*/
.item-row .title {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.005em;
}

.tips-list a {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: baseline;
    padding: 20px 0;
    font-size: 16px;
    font-weight: 400;
    transition: background 200ms ease, padding 200ms ease;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
}

.article blockquote {
    border-left: 0px solid var(--ink);
    font-style: normal;
}
/* --- Automatisk hamburgermeny --- */
/* Menyknappen ligger ovanpå det befintliga sidhuvudet och påverkar därför
   varken dess höjd, bredd eller placeringen av namn/tagline. */
.site-header {
  position: sticky;
}

.header-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.menu-toggle {
  position: absolute;
  top: 50%;
  right: max(var(--gutter), calc((100vw - var(--max-w)) / 2));
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  transform: translateY(-50%);
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 1.5px;
  background: currentColor;
  transform-origin: center;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.menu-toggle:focus-visible,
.site-menu a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.site-menu {
  position: absolute;
  top: 100%;
  right: max(var(--gutter), calc((100vw - var(--max-w)) / 2));
  width: min(430px, calc(100vw - (2 * var(--gutter))));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 0;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-menu[hidden] {
  display: none;
}

.site-menu.is-open {
  opacity: 1;
  transform: translateY(0);
}

.menu-inner {
  padding: 34px 40px 42px;
}

.menu-main-link {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.menu-group {
  border-bottom: 1px solid var(--rule);
}

.menu-group > .menu-main-link {
  border-bottom: 0;
}

.menu-submenu {
  list-style: none;
  margin: 0;
  padding: 2px 0 18px 18px;
}

.menu-submenu li + li {
  margin-top: 9px;
}

.menu-submenu a {
  display: block;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.4;
}

.menu-submenu a:hover {
  color: var(--ink-muted);
}

@media (max-width: 720px) {
  .header-inner .tagline,
  .header-inner .divider {
    display: none;
  }

  .menu-toggle {
    right: 22px;
  }

  .site-menu {
    right: 0;
    width: 100%;
    border-left: 0;
    border-right: 0;
  }

  .menu-inner {
    padding: 26px 22px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle span,
  .site-menu {
    transition: none;
  }
}

/* Inbäddningar på startsidan */
.embedded-item { padding: 12px 0 26px; max-width: 900px; }
.embedded-item iframe { display:block; width:100%; min-height:300px; border:0; background:#f3f3f3; }

/* Grav adaptations */
body{margin:0}.site-main{display:block}.item-row{display:grid;grid-template-columns:110px minmax(140px,1fr) minmax(180px,2fr) auto;gap:18px}.embedded-item iframe{width:100%;min-height:340px;border:0}.article{max-width:900px;margin:auto}.bild-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:32px}.bild-card img{width:100%;height:auto}.bild-card{margin:0}.item-list,.tips-list,.menu-submenu{list-style:none;padding:0}.item-list li{border-bottom:1px solid #e6e6e6;padding:12px 0}.site-menu[hidden]{display:none!important}@media(max-width:720px){.item-row{grid-template-columns:1fr;gap:4px}.site-main{padding:38px 20px}.header-inner{padding:18px 20px}.site-footer{padding:20px}.site-menu{padding:16px 20px}}

/* Bildsidor med flera lokala bilder */
.image-article figure { margin: 1.5rem 0; }
.image-article figure img { max-width: 100%; height: auto; display: block; }
.image-article figcaption { margin-top: .5rem; }
