/* Journal Club Psykiatri Malmö — v2 (riktning "Salvia") */
:root {
  --bg: #EEF2EE;
  --surface: #FFFFFF;
  --ink: #16302B;
  --muted: #3E5953;
  --primary: #1E5B4F;
  --primary-soft: #DCE7E2;
  --coral: #C8553D;
  --coral-soft: #FBE3DA;
  --coral-ink: #8E3420;
  --peach: #F2B8A2;
  --radius-lg: 28px;
  --radius: 22px;
  --shadow: 0 24px 48px -24px rgba(22, 48, 43, 0.25);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--primary); }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }

/* ---------- Header ---------- */
.site-header {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface);
  padding: 6px;
  border-radius: 999px;
}
.nav a {
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
.nav a:hover { background: var(--primary-soft); }
.nav a[aria-current="page"] { background: var(--primary); color: #fff; font-weight: 600; }

main.wrap { padding-top: 48px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 64px; }

/* ---------- Buttons & chips ---------- */
.btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #174a40; color: #fff; }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: #ad4632; color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); }
.btn-soft { background: var(--bg); color: var(--ink); }
.btn-soft:hover, .btn-light:hover { background: var(--primary-soft); color: var(--ink); }
.btn-peach { background: var(--peach); color: #3A140A; font-weight: 700; }
.btn-sm { min-height: 44px; padding: 0 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  align-self: flex-start;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  background: var(--coral-soft);
  color: var(--coral-ink);
}
.chip-green { background: var(--primary-soft); color: var(--primary); font-size: 13px; padding: 4px 12px; }

.avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; background: var(--primary-soft); color: var(--primary); }

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-weight: 800; font-size: clamp(44px, 7vw, 64px); line-height: 1.02; letter-spacing: -0.02em; }
.lede { margin: 0; font-size: 18px; color: var(--muted); max-width: 470px; }

.next-card {
  flex: 1 1 440px;
  min-width: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.next-top {
  background: var(--primary);
  color: #fff;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.eyebrow { font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: #CFE3DC; }
.countdown { padding: 6px 12px; border-radius: 999px; background: var(--peach); color: #5A1F10; font-weight: 700; font-size: 13px; }
.next-body { padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.next-main { display: flex; gap: 20px; align-items: center; }
.date-tile {
  flex: 0 0 auto;
  width: 84px;
  height: 92px;
  border-radius: 18px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 2px;
}
.date-tile small { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.date-tile strong { font-family: var(--font-display); font-weight: 800; font-size: 38px; }
.next-title { font-weight: 700; font-size: 22px; line-height: 1.25; }
.next-title.pending { color: var(--muted); font-weight: 600; }
.meta { font-size: 14px; color: var(--muted); }
.person { display: flex; align-items: center; gap: 12px; }
.person-text { display: flex; flex-direction: column; line-height: 1.3; }
.person-text strong { font-weight: 600; }

/* ---------- Sections ---------- */
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.section-head h2 { font-weight: 700; font-size: 32px; }
.section-head a { font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-cards.wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card.open { background: var(--coral-soft); }
.card.empty { background: transparent; border: 2px dashed #C3D3CC; color: var(--muted); }
.card-date { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.card-title { font-weight: 600; line-height: 1.35; }
.card-title.big { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.25; }
.card-links { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 600; font-size: 15px; margin-top: auto; }
.ref { font-size: 14px; font-style: italic; color: var(--muted); }
.person-sm { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }

.banner {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  justify-content: space-between;
  align-items: center;
}
.banner h2 { font-weight: 700; font-size: 28px; }
.banner p { margin: 8px 0 0; color: #C3D6CF; }
.banner > div { flex: 1 1 360px; }

.skeleton { background: linear-gradient(90deg, #e3eae6 0%, #f1f5f2 50%, #e3eae6 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; color: transparent !important; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.notice { color: var(--muted); }

/* ---------- Archive ---------- */
.page-head { display: flex; flex-direction: column; gap: 10px; }
.page-head h1 { font-weight: 800; font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.02em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 999px;
  padding: 0 18px;
  min-height: 52px;
}
.search input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; font: inherit; color: var(--ink); background: transparent; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
}
.filter[aria-pressed="true"] { background: var(--primary); color: #fff; font-weight: 600; }
.archive-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.archive-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}
.archive-date { flex: 0 0 110px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.archive-main { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.archive-main .card-title { font-size: 17px; }
.archive-links { display: flex; gap: 18px; font-weight: 600; font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Content pages ---------- */
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.content-card { background: var(--surface); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.content-card h2 { font-size: 22px; font-weight: 700; }
.content-card h3 { font-size: 17px; font-weight: 700; margin-top: 6px; }
.content-card ul, .content-card ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.content-card ul ul { margin-top: 6px; }
.content-card.span-2 { grid-column: 1 / -1; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step { background: var(--surface); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.step strong { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--primary); }
.tip-meta { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 24px 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.site-footer a { color: var(--muted); }

@media (max-width: 600px) {
  main.wrap { padding-top: 32px; gap: 48px; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { padding: 10px 12px; }
  .next-body, .banner { padding: 24px; }
  .section-head h2 { font-size: 26px; }
  .archive-date { flex-basis: 100%; }
}
