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

:root {
  --sand:        #F5F3EE;
  --coal:        #1A1A18;
  --teal:        #2e6f7e;
  --terracotta:  #C4501A;
  --muted:       #666;
  --faint:       #aaa;
  --line:        rgba(26,26,24,0.10);
  --line-soft:   rgba(26,26,24,0.07);
  /* functional aliases kept for flashcard/modal CSS */
  --orange:      #C4501A;
  --orange-h:    #a83e12;
  --panel-bg:    #fff;
  --panel-white: var(--sand);
  --panel-border: rgba(26,26,24,0.12);
  --panel-text:  #1A1A18;
  --panel-muted: #666;
  --red:         #c02020;
  --red-faint:   rgba(192,32,32,0.06);
  --red-border:  rgba(192,32,32,0.22);
}

html, body { height: 100%; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--sand);
  color: var(--coal);
  height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
a, button { cursor: none; }

/* ── CURSOR ── */
#cursor {
  position: fixed;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--terracotta);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s;
  mix-blend-mode: multiply;
}
#cursor.hover { width: 40px; height: 40px; opacity: 0.3; }

/* ── NAV ── */
nav {
  flex-shrink: 0;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  padding: 0 48px;
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  animation: fadeDown 0.5s ease both;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.02em;
  color: var(--coal); text-decoration: none;
}
.logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%; background: var(--terracotta);
  animation: pulse 3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: 0.7; }
}
.admin-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 500;
  padding: 6px 16px; border-radius: 40px;
  border: 1px solid var(--teal);
  background: transparent; color: var(--teal);
  text-decoration: none; letter-spacing: 0.01em;
  transition: all 0.2s ease; margin-left: 8px;
}
.admin-link:hover { background: var(--teal); color: #fff; }
.nav-roles { display: flex; gap: 4px; }
.role-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 400;
  padding: 6px 16px; border-radius: 40px;
  border: 1px solid rgba(26,26,24,0.18);
  background: transparent; color: var(--coal);
  letter-spacing: 0.01em; transition: all 0.2s ease;
}
.role-btn:hover { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.role-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.login-btn {
  font-size: 13px; color: var(--faint);
  background: none; border: none;
  font-family: 'DM Sans', sans-serif; transition: color 0.2s;
}
.login-btn:hover { color: var(--coal); }
.contact-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; padding: 9px 20px;
  border-radius: 40px; background: var(--teal);
  color: var(--sand); border: none;
  transition: all 0.2s ease; letter-spacing: -0.01em;
}
.contact-btn:hover { background: var(--terracotta); }

/* ── HERO ── */
.hero {
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 48px 12px;
  animation: fadeUp 0.6s 0.1s ease both;
  height: 165px;
  overflow: hidden;
  position: relative;
}

/* ── STICKY NOTE ── */
.sticky-note {
  position: absolute;
  right: 48px;
  top: 8px;
  width: 120px;
  height: 115px;
  background: linear-gradient(135deg, #FFFEA6 0%, #FFF48A 40%, #F5E97A 100%);
  box-shadow:
    2px 3px 8px rgba(0,0,0,0.15),
    inset 0 -2px 6px rgba(0,0,0,0.04);
  transform: rotate(3deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
  cursor: pointer;
  padding: 18px 12px 12px;
}
.sticky-note:hover {
  transform: rotate(1deg) scale(1.04);
  box-shadow: 3px 5px 14px rgba(0,0,0,0.2), inset 0 -2px 6px rgba(0,0,0,0.04);
}
.sticky-note::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 40% 35%, #6BB8D4 0%, #3A8BA8 50%, #2E6F7E 100%);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  z-index: 11;
}
.sticky-note::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: rgba(0,0,0,0.12);
  border-radius: 1px;
}
.sticky-note-icon {
  font-size: 22px;
  margin-bottom: 6px;
}
.sticky-note-title {
  font-family: 'DM Serif Display', serif;
  font-size: 14px;
  color: #1A1A18;
  text-align: center;
  line-height: 1.2;
  font-weight: 400;
}
.sticky-note-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  color: #7A7560;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 5px;
  font-weight: 500;
}
.eyebrow {
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--terracotta);
  margin-bottom: 8px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: '';
  display: inline-block; width: 20px; height: 1px;
  background: var(--terracotta);
}
.hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: 36px; line-height: 1.05;
  letter-spacing: -0.025em; color: var(--coal);
  margin: 0 0 10px 0; white-space: nowrap;
}
.hero-title em { font-style: italic; color: var(--terracotta); }
.hero-subtitle {
  font-size: 14.5px; line-height: 1.7;
  font-weight: 300; max-width: 820px;
}
.hero-subtitle .s-muted  { color: #999; }
.hero-subtitle .s-bold   { color: var(--coal); font-weight: 500; }
.hero-subtitle .s-accent { color: var(--terracotta); font-weight: 400; }

/* ── MAIN LAYOUT ── */
.main {
  flex: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  overflow: hidden;
  min-height: 0;
}

/* ── SIDEBAR ── */
.sidebar {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  animation: fadeUp 0.6s 0.3s ease both;
}
.section-label {
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #c8c5be;
  margin-bottom: 10px; font-weight: 500;
  padding-left: 14px;
}
.sidebar-divider {
  margin: 20px 0; border: none;
  border-top: 1px solid var(--line-soft);
}
.nav-btn {
  display: flex; align-items: center;
  width: 100%; text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 400;
  padding: 10px 14px 10px 26px; border-radius: 8px;
  border: none; background: transparent;
  color: #555; margin-bottom: 2px;
  letter-spacing: -0.01em;
  transition: all 0.15s ease;
}
.nav-btn:hover:not(.active) { background: rgba(26,26,24,0.05); color: var(--coal); }
.nav-btn.active { background: var(--teal); color: var(--sand); }
.section-toggle {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left;
  font-size: 11px; letter-spacing: 0.13em;
  text-transform: uppercase; color: #111;
  font-weight: 700; padding: 10px 6px 10px 14px;
  border: none; background: transparent;
  transition: color 0.15s;
}
.section-toggle:hover { color: var(--terracotta); }
.toggle-arrow { font-size: 13px; display: inline-block; transition: transform 0.2s ease; }
.section-toggle.collapsed .toggle-arrow { transform: rotate(-90deg); }
.section-toggle.collapsed { color: #111; }
.section-toggle.active-section { color: var(--terracotta); }
.section-content.collapsed { display: none; }
.nav-btn.section-direct-unused {
  font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase;
  font-weight: 700; padding: 10px 6px 10px 14px;
  text-align: left; width: 100%; color: #111;
}
.nav-btn.section-direct:hover { color: var(--terracotta); background: transparent; }
.nav-btn.section-direct.active { color: var(--terracotta); background: transparent;
  border-left: 3px solid var(--terracotta); padding-left: 11px; }


/* ── INSIKT ── */
.insikt-heading {
  font-size: 13px; color: var(--muted); line-height: 1.45;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--line-soft);
}
.insikt-heading strong { color: var(--coal); font-weight: 500; }
.insikt-list { display: flex; flex-direction: column; padding: 8px 0; }
.insikt-item {
  display: flex; gap: 16px; padding: 16px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.insikt-item:last-child { border-bottom: none; }
.insikt-rank {
  font-size: 26px; font-weight: 300; color: var(--faint);
  font-family: 'DM Serif Display', serif;
  min-width: 32px; line-height: 1; padding-top: 2px;
}
.insikt-content { flex: 1; }
.insikt-title { font-size: 14px; font-weight: 500; color: var(--coal); margin-bottom: 5px; line-height: 1.35; }
.insikt-body  { font-size: 13px; color: var(--muted); line-height: 1.55; }
/* Insikt-kort: siffra till vänster, ingen hover-färg */
.news-card.insikt-card { grid-template-columns: 52px 1fr; cursor: default; }
.news-card.insikt-card,
.news-card.insikt-card:hover { background: #fff !important; }
.news-card.insikt-card .news-title,
.news-card.insikt-card:hover .news-title { color: var(--coal) !important; }
.news-card.insikt-card .news-desc,
.news-card.insikt-card:hover .news-desc { color: #888 !important; }
.news-card.insikt-card .news-num,
.news-card.insikt-card:hover .news-num { color: rgba(26,26,24,0.07) !important; }

/* ── ATT GÖRA ── */
.attgora-intro { font-size: 13px; color: var(--muted); line-height: 1.6; padding: 14px 18px 10px; border-bottom: 1px solid var(--panel-border); margin-bottom: 4px; }
.ag-banner-img-wrap { padding: 16px 18px 14px; border-bottom: 1px solid var(--panel-border); }
.ag-banner-img { display: block; width: 100%; max-width: 100%; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.10); margin-bottom: 12px; cursor: pointer; transition: opacity .15s; }
.ag-banner-img-wrap a:hover .ag-banner-img { opacity: .88; }
.ag-banner-docs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-banner-docs-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.ag-download-primary { background: var(--accent, #2a7f6f); color: #fff; border: none; border-radius: 5px; padding: 6px 13px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: opacity .15s; }
.ag-download-primary:hover { opacity: .85; }
.ag-download-primary svg { width: 13px; height: 13px; fill: #fff; flex-shrink: 0; }
.attgora-list { display: flex; flex-direction: column; padding: 8px 0; }
/* Delar insikt-card-utseende */
.news-card.attgora-card { grid-template-columns: 60px 1fr; cursor: default; }
.news-card.attgora-card,
.news-card.attgora-card:hover { background: #fff !important; }
.news-card.attgora-card .news-title,
.news-card.attgora-card:hover .news-title { color: var(--coal) !important; }
.news-card.attgora-card .news-desc,
.news-card.attgora-card:hover .news-desc { color: #888 !important; }
.news-card.attgora-card .news-num,
.news-card.attgora-card:hover .news-num { color: rgba(26,26,24,0.07) !important; }
.attgora-left { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 2px; }
.attgora-trend { font-size: 13px; font-weight: 700; line-height: 1; }
.attgora-trend.up   { color: #267a45; }
.attgora-trend.down { color: var(--terracotta); }
.ag-new-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  background: var(--terracotta); color: #fff;
  padding: 2px 5px; border-radius: 4px; text-transform: uppercase;
}
.attgora-meta  { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.attgora-body  { font-size: 13px; color: #888; line-height: 1.55; }
.ag-badge {
  font-size: 11px; font-weight: 500; padding: 2px 8px;
  border-radius: 20px; letter-spacing: 0.02em;
}
.ag-value-high  { background: rgba(185,74,50,0.12); color: var(--terracotta); }
.ag-value-mid   { background: rgba(180,130,40,0.12); color: #a07820; }
.ag-value-low   { background: rgba(100,100,100,0.1); color: var(--muted); }
.ag-effort-low  { background: rgba(40,140,80,0.12); color: #267a45; }
.ag-effort-mid  { background: rgba(180,130,40,0.12); color: #a07820; }
.ag-effort-high { background: rgba(185,74,50,0.12); color: var(--terracotta); }
.ag-mandatory-lag          { background: rgba(185,74,50,0.10); color: #b03a2e; border: 1px solid rgba(185,74,50,0.25); }
.ag-mandatory-eu-forordning{ background: rgba(52,90,180,0.10); color: #2c55a0; border: 1px solid rgba(52,90,180,0.25); }
.ag-mandatory-direktiv     { background: rgba(80,50,160,0.10); color: #5030a0; border: 1px solid rgba(80,50,160,0.25); }
.ag-mandatory-foreskrift   { background: rgba(180,130,40,0.10); color: #8a6010; border: 1px solid rgba(180,130,40,0.25); }
.ag-mandatory-generic      { background: rgba(185,74,50,0.10); color: #b03a2e; border: 1px solid rgba(185,74,50,0.25); }
.ag-normative-skall { background: rgba(46,111,126,0.10); color: #1d5b68; border: 1px solid rgba(46,111,126,0.28); }
.ag-normative-bor   { background: rgba(138,96,16,0.10);  color: #7a5510; border: 1px solid rgba(138,96,16,0.28); }
.ag-deadline        { background: rgba(80,80,80,0.08); color: #555; border: 1px solid rgba(80,80,80,0.20); font-variant-numeric: tabular-nums; }
.ag-deadline-soon   { background: rgba(196,80,26,0.10); color: #a04010; border: 1px solid rgba(196,80,26,0.30); }
.ag-deadline-passed { background: rgba(180,40,40,0.12); color: #a02020; border: 1px solid rgba(180,40,40,0.30); }
.ag-sanction        { background: rgba(180,40,40,0.10); color: #a02020; border: 1px solid rgba(180,40,40,0.25); }
.ag-law             { background: rgba(46,111,126,0.08); color: var(--teal); border: 1px solid rgba(46,111,126,0.28); }

/* Consequence badges */
.ag-consequence { border: 1px solid; font-weight: 600; }
.ag-consequence-kritisk   { background: rgba(180,40,40,0.10); color: #a02020; border-color: rgba(180,40,40,0.30); }
.ag-consequence-allvarlig { background: rgba(185,74,50,0.10); color: #b03a2e; border-color: rgba(185,74,50,0.25); }
.ag-consequence-mattlig   { background: rgba(180,130,40,0.10); color: #8a6010; border-color: rgba(180,130,40,0.25); }
.ag-consequence-begransad { background: rgba(100,100,100,0.08); color: #666; border-color: rgba(100,100,100,0.20); }
.ag-consequence-forsumbar { background: rgba(100,100,100,0.05); color: #999; border-color: rgba(100,100,100,0.12); }

/* Expand/collapse kravkort */
.attgora-card[data-krav-expand] { cursor: pointer; }
.attgora-expand-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--teal);
  background: rgba(46,111,126,0.06); border: 1px solid rgba(46,111,126,0.18);
  border-radius: 4px; padding: 2px 10px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  user-select: none; white-space: nowrap;
}
.attgora-expand-btn:hover { background: rgba(46,111,126,0.12); border-color: rgba(46,111,126,0.30); }
.attgora-expand-icon { font-size: 10px; transition: transform 0.2s; }
.attgora-card.expanded .attgora-expand-icon { transform: rotate(180deg); }
.attgora-detail { display: none; margin-top: 10px; }
.attgora-card.expanded .attgora-detail { display: block; }
.attgora-detail-risks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.attgora-risk-item { padding: 8px 12px; background: rgba(0,0,0,0.02); border-radius: 6px; border-left: 3px solid var(--muted); }
.attgora-risk-item:has(.ag-consequence-kritisk)   { border-left-color: #a02020; }
.attgora-risk-item:has(.ag-consequence-allvarlig)  { border-left-color: #b03a2e; }
.attgora-risk-item:has(.ag-consequence-mattlig)    { border-left-color: #8a6010; }
.attgora-risk-item:has(.ag-consequence-begransad)  { border-left-color: #666; }
.attgora-risk-label { font-size: 12px; font-weight: 600; display: inline-block; margin-bottom: 4px; cursor: help; }

/* Konsekvens-tooltip */
.ct-wrapper { position: relative; display: block; }
.consequence-tooltip {
  display: none; position: absolute; left: 0; bottom: 100%; z-index: 100;
  margin-bottom: 6px; padding: 10px 14px;
  background: #fff; border: 1px solid rgba(26,26,24,0.12);
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  width: max-content; max-width: 480px;
}
.ct-wrapper:hover .consequence-tooltip { display: block; }
.ct-row { font-size: 11px; color: var(--muted); line-height: 1.6; white-space: normal; }
.ct-row.ct-active { color: var(--coal); font-weight: 700; }
.ct-label { display: inline; }
.ct-sep { margin: 0 2px; }
.ct-desc { display: inline; }
.attgora-risk-label.ag-consequence-kritisk   { color: #a02020; }
.attgora-risk-label.ag-consequence-allvarlig { color: #b03a2e; }
.attgora-risk-label.ag-consequence-mattlig   { color: #8a6010; }
.attgora-risk-label.ag-consequence-begransad { color: #666; }
.attgora-risk-label.ag-consequence-forsumbar { color: #999; }
.attgora-risk-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
.attgora-source { font-size: 12px; color: var(--muted); font-style: italic; margin: 8px 0 4px; }

.ag-source {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; border: 1px solid rgba(26,26,24,0.15);
  color: var(--coal); text-decoration: none; letter-spacing: 0.03em;
}
.ag-source:hover { border-color: var(--teal); color: var(--teal); }

/* Källänkar (alltid synliga) */
.krav-sources { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.krav-source-link {
  font-size: 11px; color: var(--teal); text-decoration: none;
}
.krav-source-link:hover { text-decoration: underline; }
.krav-source-text { font-size: 11px; color: var(--muted); font-style: italic; }
.ag-filter-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 18px 12px; border-bottom: 1px solid var(--panel-border);
}
.ag-filter-btn {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; border: 1px solid rgba(26,26,24,0.18);
  background: transparent; color: var(--muted); cursor: pointer;
  letter-spacing: 0.03em; transition: all 0.15s;
}
.ag-filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.ag-filter-btn.active { background: var(--coal); border-color: var(--coal); color: #fff; }
.ag-filter-btn.all-btn.active { background: var(--teal); border-color: var(--teal); }
.attgora-items-wrap { display: flex; flex-direction: column; }
.attgora-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.ag-readmore {
  font-size: 12px; color: var(--teal); text-decoration: none;
  font-weight: 500; letter-spacing: 0.01em;
}
.ag-readmore:hover { text-decoration: underline; }
.ag-download {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 6px;
  background: var(--teal); color: var(--sand);
  text-decoration: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; letter-spacing: 0.01em;
  transition: opacity 0.15s;
}
.ag-download:hover { opacity: 0.85; }
.ag-download.pdf { background: var(--coal); }
.ag-download svg { width: 13px; height: 13px; fill: currentColor; }
.ag-download-secondary { background: transparent; color: #2E6F7E; border: 1.5px solid #2E6F7E; border-radius: 5px; padding: 5px 13px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: background .15s; }
.ag-download-secondary:hover { background: #E8F2F4; opacity: 1; }
.ag-download-secondary svg { width: 13px; height: 13px; fill: #2E6F7E; flex-shrink: 0; }
.ag-doc-planned {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 6px;
  background: transparent; color: #bbb;
  border: 1.5px dashed #ddd; cursor: default;
  font-family: 'DM Sans', sans-serif; letter-spacing: 0.01em;
}
.ag-role-badge { background: rgba(90,90,90,0.08); color: #555; border: 1px solid rgba(90,90,90,0.20); font-size: 11px; padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.ag-role-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ag-role-btn { font-size: 11px; padding: 4px 10px; border-radius: 14px; border: 1px solid #ccc; background: #fff; color: #555; cursor: pointer; transition: all .15s; }
.ag-role-btn.active { background: #444; color: #fff; border-color: #444; }
.ag-role-btn:hover { border-color: #888; }
.ag-doc-sep { color: #ccc; font-size: 13px; padding: 0 2px; user-select: none; }
.attgora-docs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ag-tag-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.ag-tag-btn { font-size: 11px; padding: 4px 11px; border-radius: 14px; border: 1px solid #ccc; background: #fff; color: #555; cursor: pointer; transition: all .15s; }
.ag-tag-btn:hover { border-color: var(--teal); color: var(--teal); }
.ag-tag-btn.active { background: var(--coal); border-color: var(--coal); color: #fff; }
.ag-tag-btn.all-tag-btn.active { background: var(--teal); border-color: var(--teal); }
.ag-tag-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: #f0ede8; color: #555; border: 1px solid #ddd; white-space: nowrap; }
.ag-tag-link { text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.ag-tag-link:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ── KRAV FILTER DROPDOWNS (IT-arkitekt) ── */
.krav-filters {
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  padding: 16px 20px 18px;
  background: #fff;
  border-bottom: 1px solid var(--panel-border);
}
.krav-filter-col { display: flex; flex-direction: column; gap: 7px; }
.krav-filter-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
  color: var(--coal);
}
/* Dropdown wrapper */
.krav-dropdown { position: relative; }
/* Trigger button — pill style, no border */
.krav-dd-btn {
  display: flex; align-items: center;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 400;
  color: var(--coal); background: #EBF0F1;
  border: none; border-radius: 10px;
  padding: 10px 14px; cursor: pointer; min-width: 180px;
  text-align: left; transition: background .15s;
}
.krav-dd-btn:hover { background: #DDE6E8; }
.krav-dd-btn.open  { background: #DDE6E8; }
/* Dropdown menu panel */
.krav-dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 200;
  background: #fff;
  border-radius: 14px; box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  padding: 8px; min-width: 220px; max-height: 300px; overflow-y: auto;
}
/* "Alla" row at top */
.krav-dd-alla-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--coal); font-weight: 500;
  transition: background .1s;
}
.krav-dd-alla-item:hover { background: #f5f3ee; }
/* Separator */
.krav-dd-sep { height: 1px; background: #E8EAEB; margin: 6px 0; }
/* Regular item row */
.krav-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--coal); user-select: none;
  transition: background .1s;
}
.krav-dd-item:hover { background: #f5f3ee; }
/* Circle indicator */
.krav-dd-circ {
  width: 18px; height: 18px; min-width: 18px; border-radius: 50%;
  border: 2px solid #BFC8CB; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: border-color .15s, background .15s;
}
/* "Alla" circle — ring style (teal outline, filled center) */
.krav-dd-alla-circ { border-color: #BFC8CB; }
.krav-dd-alla-circ.all-active { border-color: var(--teal); }
.krav-dd-alla-circ.all-active::after {
  content: ''; display: block;
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
}
/* Selected item circle — dark fill + white checkmark */
.krav-dd-circ.circ-checked {
  background: var(--coal); border-color: var(--coal);
}
.krav-dd-circ.circ-checked::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(42deg) translateY(-1px);
  display: block;
}
/* Active filter banner */
.krav-active-filter {
  font-size: 12px; color: var(--muted);
  padding: 7px 20px 9px; background: #f7f5f0;
  border-bottom: 1px solid var(--panel-border);
}
.krav-active-filter strong { color: var(--coal); }
.krav-clear-filter { color: var(--teal); text-decoration: none; font-weight: 500; }
.krav-clear-filter:hover { text-decoration: underline; }
/* Tag badges on krav cards */
.krav-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.krav-card-tag {
  font-size: 11px; font-weight: 500; padding: 3px 10px;
  border-radius: 20px; border: 1.5px solid rgba(46,111,126,0.35);
  color: var(--teal); text-decoration: none; background: rgba(46,111,126,0.06);
  white-space: nowrap; transition: background .15s, color .15s;
}
.krav-card-tag:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ── NEWS FEED ── */
.news-feed {
  display: flex; flex-direction: column; overflow: hidden;
}

/* ── NEWS TOOLBAR ── */
.news-toolbar {
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: var(--sand);
}
.toolbar-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 32px; flex-wrap: wrap;
}
.filter-label {
  font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
  font-weight: 500; margin-right: 4px; white-space: nowrap;
}
.time-filter-group { display: flex; gap: 4px; }
.time-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; padding: 5px 14px;
  border-radius: 40px;
  border: 1px solid rgba(26,26,24,0.15);
  background: transparent; color: var(--muted);
  letter-spacing: 0.01em;
  transition: all 0.2s ease; white-space: nowrap;
}
.time-btn:hover { border-color: rgba(26,26,24,0.35); color: var(--coal); }
.time-btn.active {
  background: var(--teal); color: var(--sand);
  border-color: var(--teal);
}
.search-wrap {
  position: relative; display: flex; align-items: center;
}
.search-icon {
  position: absolute; left: 10px; color: var(--faint);
  pointer-events: none;
}
.search-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; padding: 5px 28px 5px 30px;
  border-radius: 40px;
  border: 1px solid rgba(26,26,24,0.15);
  background: transparent; color: var(--coal);
  width: 160px;
  transition: all 0.2s ease;
  outline: none;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus {
  border-color: var(--teal); width: 220px;
}
.search-input.has-value {
  border-color: var(--teal); background: rgba(46,111,126,0.06);
}
.search-clear {
  position: absolute; right: 6px;
  background: none; border: none;
  font-size: 11px; color: var(--muted);
  cursor: pointer; padding: 2px 4px;
  line-height: 1;
}
.search-clear:hover { color: var(--coal); }

.visa-alla {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; padding: 5px 14px;
  border-radius: 40px;
  border: 1px solid rgba(196,80,26,0.35);
  background: transparent; color: var(--terracotta);
  transition: all 0.2s ease; white-space: nowrap;
}
.visa-alla:hover { background: var(--terracotta); color: #fff; }
.toolbar-spacer { margin-left: auto; }
.count-line {
  font-size: 11px; color: var(--faint);
  font-weight: 300; white-space: nowrap;
}
.count-line strong { font-weight: 500; color: var(--coal); }

/* ── PANEL BODY ── */
.panel-body { flex: 1; overflow-y: auto; min-height: 0; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26,26,24,0.15); border-radius: 2px; }
.panel { display: none; }
.panel.active { display: block; }
.p-empty {
  text-align: center; padding: 48px 20px;
  color: var(--muted); font-size: 0.84rem;
}

/* ── NEWS CARDS ── */
.news-card {
  display: grid; grid-template-columns: 1fr 72px;
  gap: 20px; padding: 28px 48px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
  position: relative;
  transition: background 0.25s ease;
  animation: fadeUp 0.45s ease both;
}
/* Dark state: featured (first card) or hovered */
.news-card.featured,
.news-card:hover { background: var(--teal); }
/* When hovering a non-featured card, reset the featured card to white */
.panel:has(.news-card:not(.featured):hover) .news-card.featured { background: #fff; }

.news-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.cat-tag {
  font-size: 10px; letter-spacing: 0.10em;
  text-transform: uppercase; padding: 3px 11px;
  border-radius: 40px; border: 1px solid rgba(26,26,24,0.18);
  color: #666; font-weight: 500;
  transition: border-color 0.25s, color 0.25s;
}
.news-card.featured .cat-tag,
.news-card:hover .cat-tag { border-color: rgba(245,243,238,0.18); color: rgba(245,243,238,0.5); }
.panel:has(.news-card:not(.featured):hover) .news-card.featured .cat-tag { border-color: rgba(26,26,24,0.18); color: #666; }

.big-tag {
  font-size: 10px; letter-spacing: 0.10em;
  text-transform: uppercase; padding: 3px 11px;
  border-radius: 40px; background: var(--terracotta);
  color: #fff; font-weight: 500;
}
.news-date {
  font-size: 11px; color: var(--faint);
  margin-left: auto; font-weight: 300;
  transition: color 0.25s;
}
.news-card.featured .news-date,
.news-card:hover .news-date { color: rgba(245,243,238,0.35); }
.panel:has(.news-card:not(.featured):hover) .news-card.featured .news-date { color: var(--faint); }

.news-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px; line-height: 1.2;
  letter-spacing: -0.02em; color: var(--coal);
  margin: 0 0 10px 0; transition: color 0.25s;
}
.news-card.featured .news-title,
.news-card:hover .news-title { color: var(--sand); }
.panel:has(.news-card:not(.featured):hover) .news-card.featured .news-title { color: var(--coal); }

.news-desc {
  font-size: 13px; line-height: 1.7;
  color: #888; font-weight: 300;
  transition: color 0.25s;
}
.news-card.featured .news-desc,
.news-card:hover .news-desc { color: rgba(245,243,238,0.45); }
.panel:has(.news-card:not(.featured):hover) .news-card.featured .news-desc { color: #888; }

.news-right {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: space-between;
}
.news-num {
  font-family: 'DM Serif Display', serif;
  font-size: 42px; color: rgba(26,26,24,0.07);
  line-height: 1; letter-spacing: -0.03em;
  user-select: none; transition: color 0.25s;
}
.news-card.featured .news-num,
.news-card:hover .news-num { color: rgba(245,243,238,0.07); }
.panel:has(.news-card:not(.featured):hover) .news-card.featured .news-num { color: rgba(26,26,24,0.07); }

.arrow-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(26,26,24,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--faint);
  background: transparent; flex-shrink: 0;
  transition: all 0.25s ease;
}
.news-card.featured .arrow-btn,
.news-card:hover .arrow-btn { background: #fff; border-color: #fff; color: var(--teal); transform: rotate(45deg); }
.panel:has(.news-card:not(.featured):hover) .news-card.featured .arrow-btn { background: transparent; border-color: rgba(245,243,238,0.25); color: rgba(245,243,238,0.4); transform: none; }

/* Last-read state: kortet man senast öppnade förblir grönt tills ett annat hovras */
.news-card.last-read { background: var(--teal); }
.news-card.last-read .cat-tag { border-color: rgba(245,243,238,0.18); color: rgba(245,243,238,0.5); }
.news-card.last-read .news-date { color: rgba(245,243,238,0.35); }
.news-card.last-read .news-title { color: var(--sand); }
.news-card.last-read .news-desc { color: rgba(245,243,238,0.45); }
.news-card.last-read .news-num { color: rgba(245,243,238,0.07); }
.news-card.last-read .arrow-btn { background: #fff; border-color: #fff; color: var(--teal); transform: rotate(45deg); }
/* Återställ last-read-kortet när ett annat kort hovras (ett grönt kort i taget) */
.panel:has(.news-card:hover) .news-card.last-read:not(:hover) { background: #fff; }
.panel:has(.news-card:hover) .news-card.last-read:not(:hover) .cat-tag { border-color: rgba(26,26,24,0.18); color: #666; }
.panel:has(.news-card:hover) .news-card.last-read:not(:hover) .news-date { color: var(--faint); }
.panel:has(.news-card:hover) .news-card.last-read:not(:hover) .news-title { color: var(--coal); }
.panel:has(.news-card:hover) .news-card.last-read:not(:hover) .news-desc { color: #888; }
.panel:has(.news-card:hover) .news-card.last-read:not(:hover) .news-num { color: rgba(26,26,24,0.07); }
.panel:has(.news-card:hover) .news-card.last-read:not(:hover) .arrow-btn { background: transparent; border-color: rgba(26,26,24,0.15); color: var(--faint); transform: none; }

/* ── FLASHCARD ── */
.fc-wrap { padding: 28px 48px 40px; display: flex; flex-direction: column; gap: 0; background: var(--teal); min-height: 100%; }
.fc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fc-deck-name { font-size: 10px; font-weight: 500; color: rgba(245,243,238,0.5); text-transform: uppercase; letter-spacing: 0.14em; }
.fc-pos { font-size: 0.75rem; color: rgba(245,243,238,0.4); font-weight: 300; }
.fc-pos strong { color: #fff; font-weight: 500; }
.fc-progress-bar { height: 3px; background: rgba(245,243,238,0.15); border-radius: 2px; margin-bottom: 20px; overflow: hidden; }
.fc-progress-fill { height: 100%; background: #fff; border-radius: 2px; transition: width 0.3s ease; }
.fc-scene { perspective: 900px; height: 220px; margin-bottom: 18px; }
.fc-card {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform 0.45s ease;
}
.fc-card.flipped { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 28px; text-align: center;
  border-radius: 11px; border: 1px solid var(--line);
}
.fc-front { background: #fff; }
.fc-back  { background: #fff; border-color: var(--line); transform: rotateY(180deg); }
.fc-front-label {
  position: absolute; top: 12px; left: 16px;
  font-size: 0.6rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.10em; color: var(--faint);
}
.fc-back-label {
  position: absolute; top: 12px; left: 16px;
  font-size: 0.6rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.10em; color: var(--terracotta);
}
.fc-text { font-family: 'DM Serif Display', serif; font-size: 1.1rem; font-weight: 400; color: var(--coal); line-height: 1.45; }
.fc-back .fc-text { font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 400; color: var(--coal); line-height: 1.65; }
.fc-hint { display: none; }
.fc-actions { display: flex; gap: 10px; justify-content: center; }
.fc-flip-btn {
  background: rgba(245,243,238,0.10); color: var(--sand);
  border: 1px solid rgba(245,243,238,0.18); border-radius: 8px; padding: 11px 28px;
  font-size: 0.82rem; font-weight: 400; cursor: pointer;
  transition: all 0.15s; font-family: 'DM Sans', sans-serif;
}
.fc-flip-btn:hover { background: rgba(245,243,238,0.18); border-color: rgba(245,243,238,0.28); }
.fc-rating { display: none; gap: 10px; width: 100%; justify-content: center; }
.fc-again {
  flex: 1; max-width: 180px;
  background: rgba(245,243,238,0.10); color: var(--sand);
  border: 1px solid rgba(245,243,238,0.18);
  border-radius: 8px; padding: 10px 14px; font-size: 0.82rem;
  font-weight: 400; transition: all 0.15s; font-family: 'DM Sans', sans-serif;
}
.fc-again:hover { background: rgba(245,243,238,0.18); border-color: rgba(245,243,238,0.28); }
.fc-good {
  flex: 1; max-width: 180px;
  background: rgba(245,243,238,0.10); color: var(--sand);
  border: 1px solid rgba(245,243,238,0.18);
  border-radius: 8px; padding: 10px 14px; font-size: 0.82rem;
  font-weight: 400; transition: all 0.15s; font-family: 'DM Sans', sans-serif;
}
.fc-good:hover { background: rgba(245,243,238,0.18); border-color: rgba(245,243,238,0.28); }
.fc-done {
  display: none; text-align: center;
  padding: 32px 20px; flex-direction: column; align-items: center; gap: 12px;
}
.fc-done-icon { font-size: 2.8rem; }
.fc-done h3 { font-size: 1.1rem; font-weight: 700; color: #fff; }
.fc-done-stats { font-size: 0.82rem; color: rgba(245,243,238,0.6); line-height: 1.6; }
.fc-done-stats strong { color: #fff; }
.fc-restart {
  background: var(--terracotta); color: white; border: none;
  border-radius: 8px; padding: 10px 24px;
  font-size: 0.875rem; font-weight: 600;
  transition: background 0.15s; margin-top: 4px;
  font-family: 'DM Sans', sans-serif;
}
.fc-restart:hover { background: var(--orange-h); }

/* ── WORD CLOUD ── */
.wordcloud {
  display: none; flex-wrap: wrap; gap: 2px 10px;
  align-items: baseline; width: 100%; padding: 2px 0;
}
.wordcloud.active { display: flex; }
.wc-word {
  font-weight: 600; border-radius: 6px;
  padding: 1px 8px; line-height: 1.15; transition: all 0.18s;
  border: none; background: transparent;
}
.wc-word:hover { background: rgba(26,26,24,0.08); transform: translateY(-1px); }
.wc-word[data-w="5"] { font-size: 1.25rem; color: rgba(26,26,24,0.95); }
.wc-word[data-w="4"] { font-size: 1.0rem;  color: rgba(26,26,24,0.75); }
.wc-word[data-w="3"] { font-size: 0.85rem; color: rgba(26,26,24,0.55); }
.wc-word[data-w="2"] { font-size: 0.75rem; color: rgba(26,26,24,0.38); }
.wc-word[data-w="1"] { font-size: 0.65rem; color: rgba(26,26,24,0.23); }

/* Word popover */
.wc-pop {
  position: fixed; z-index: 120;
  background: var(--coal); border: 1px solid rgba(245,243,238,0.10);
  border-radius: 11px; padding: 14px 18px; max-width: 290px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  pointer-events: none; opacity: 0; transition: opacity 0.15s;
}
.wc-pop.visible { opacity: 1; pointer-events: auto; }
.wc-pop-term {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--terracotta); margin-bottom: 6px;
}
.wc-pop-info { font-size: 0.83rem; line-height: 1.55; color: rgba(245,243,238,0.82); }
.wc-pop-close {
  position: absolute; top: 9px; right: 10px;
  background: none; border: none; color: rgba(245,243,238,0.4);
  font-size: 0.8rem; line-height: 1;
}
.wc-pop-close:hover { color: rgba(245,243,238,0.9); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,26,24,0.55); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--teal); border: 1px solid rgba(245,243,238,0.12);
  border-radius: 14px; max-width: 580px; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 30px;
  position: relative; color: var(--sand);
  transform: translateY(14px) scale(0.98); transition: transform 0.2s ease;
  scrollbar-width: thin;
}
.modal-overlay.open .modal { transform: none; }
.modal.major-modal { border-left: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px;
  border-radius: 50%; background: #fff; border: none;
  color: var(--teal); font-size: 0.8rem; cursor: pointer;
  display: grid; place-items: center; transition: all 0.15s;
}
.modal-close:hover { background: var(--sand); }
.modal-badge-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.modal-cat {
  font-size: 0.6rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em;
  background: rgba(245,243,238,0.12); color: rgba(245,243,238,0.55);
  border-radius: 999px; padding: 3px 9px; border: 1px solid rgba(245,243,238,0.18);
}
.modal-date { font-size: 0.72rem; color: rgba(245,243,238,0.45); font-weight: 300; }
.modal-major-badge { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.10em; background: rgba(196,80,26,0.20); color: #ffb89a; border: 1px solid rgba(196,80,26,0.35); border-radius: 999px; padding: 3px 9px; }
.modal h2 { font-family: 'DM Serif Display', serif; font-size: 1.35rem; font-weight: 400; line-height: 1.3; margin-bottom: 12px; color: #fff; }
.modal.major-modal h2 { color: #fff; }
.modal-details { font-size: 0.86rem; line-height: 1.72; color: rgba(255,255,255,0.75); margin-bottom: 24px; font-weight: 300; }
.modal-links-heading {
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(245,243,238,0.4); margin-bottom: 10px;
}
.modal-links { display: flex; flex-direction: column; gap: 6px; }
.modal-link { display: flex; align-items: center; gap: 10px; background: rgba(245,243,238,0.08); border: 1px solid rgba(245,243,238,0.12); border-radius: 8px; padding: 10px 13px; text-decoration: none; color: var(--sand); font-size: 0.82rem; font-weight: 400; transition: all 0.15s; }
.modal-link:hover { background: rgba(245,243,238,0.15); border-color: rgba(245,243,238,0.25); transform: translateX(3px); }
.modal-link span { flex: 1; }
.modal-link-arr { color: rgba(245,243,238,0.4); flex-shrink: 0; font-size: 0.8rem; }

/* ── DELA-KNAPP (modal) ── */
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; padding: 10px 18px;
  background: rgba(245,243,238,0.08); border: 1px solid rgba(245,243,238,0.15);
  border-radius: 8px; color: var(--sand); font-size: 0.82rem; font-weight: 400;
  font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.15s;
  outline: none; -webkit-appearance: none; appearance: none;
}
.share-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.share-btn:hover { background: rgba(245,243,238,0.15); border-color: rgba(245,243,238,0.25); }

/* ── FOOTER ── */
.footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 14px 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-note { font-size: 11px; color: var(--faint); font-weight: 300; }
.footer-year {
  font-family: 'DM Serif Display', serif;
  font-size: 11px; color: rgba(26,26,24,0.20); letter-spacing: 0.05em;
}

/* ── GRAIN OVERLAY ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9000; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 200px;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PIN BUTTON (på nyhetskortet) ── */
.pin-btn {
  width: 52px; height: 52px;
  border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; padding: 0; flex-shrink: 0;
  color: rgba(26,26,24,0.28);
  transition: color 0.18s, background 0.18s;
  cursor: pointer;
}
.pin-btn:hover { color: rgba(26,26,24,0.55); background: rgba(26,26,24,0.06); }
.pin-btn.pinned,
.pin-btn.pinned:hover,
.news-card:hover .pin-btn.pinned,
.news-card.featured .pin-btn.pinned,
.news-card:hover .pin-btn.pinned:hover,
.news-card.featured .pin-btn.pinned:hover { color: var(--terracotta) !important; background: transparent; }
.news-card.featured .pin-btn,
.news-card:hover .pin-btn { color: rgba(245,243,238,0.45); }
.news-card.featured .pin-btn:hover,
.news-card:hover .pin-btn:hover { color: rgba(245,243,238,0.8); background: rgba(245,243,238,0.1); }

/* ── ANSLAGSTAVLA SIDEBAR ── */
.pin-badge {
  margin-left: auto;
  background: var(--terracotta); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.nav-btn-anslagstavla {
  padding-left: 14px; gap: 8px;
  font-weight: 500; color: var(--coal);
}
.nav-btn-anslagstavla.active .pin-badge { background: rgba(245,243,238,0.3); }

/* ── ANSLAGSTAVLA PANEL ── */
.pin-panel-header {
  padding: 20px 48px 16px;
  font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  nav { padding: 0 24px; }
  .hero { padding: 14px 24px 16px; height: 180px; }
  .hero-title { font-size: 26px; white-space: normal; }
  .sticky-note { right: 24px; width: 110px; height: 105px; }
  .sticky-note-title { font-size: 12px; }
  .sticky-note-icon { font-size: 18px; }
  .main { grid-template-columns: 200px 1fr; }
  .toolbar-inner { padding: 10px 20px; }
  .news-card { padding: 20px 24px; }
  .footer { padding: 14px 24px; }
}
@media (max-width: 580px) {
  .main { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* Version label in footer */
.footer-version {
  margin-left: 1.5em;
}
.footer-updated {
  margin-left: 1.5em;
}
