
```{css}
#| echo: false
/* Dokumentspecifik stil för att få det att kännas som en rapport */

/* Anpassad brödtext */
body {
  font-family: "Aptos", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11pt;
  color: #333333;
  line-height: 1.5;
}

/* Anpassade rubriker */
h1 {
  font-family: Cambria, "Times New Roman", serif;
  font-size: 24pt;
  color: #3F5664;
  font-weight: bold;
}

h2 {
  font-family: Cambria, "Times New Roman", serif;
  font-size: 18pt;
  color: #3F5664;
  font-weight: bold;
  margin-top: 2rem;
}

h3 {
  font-family: Cambria, "Times New Roman", serif;
  font-size: 14pt;
  color: #3F5664;
  font-weight: bold;
  margin-top: 1.5rem;
}

/* Dölj Quarto-titeln */
#title-block-header {
  display: none;
}

/* Sidlayout */
main {
  max-width: 1100px;
  margin: 0 auto;
}

/* Innehållsförteckning */
#TOC .nav-link.active {
  font-weight: bold;
  color: #3F5664 !important;
  border-left: 2px solid #3F5664;
}

#TOC .nav-link {
  font-size: 12px;
  color: #666666;
}

#TOC .nav-link:hover {
  color: #3F5664 !important;
}

#toc-title {
  font-weight: bold !important;
  color: #3F5664 !important;
  font-size: 18px !important;
}

#TOC {
  margin-left: 30px;
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
}

/* Tabeller */
table {
  width: 100%;
  margin-bottom: 1.5rem;
}

th, td {
  vertical-align: middle;
}

/* Anpassa bredden på den första kolumnen */
.table th:first-child, .table td:first-child {
  width: 15em !important;
}

/* Anpassa bredden på alla kolumner utom den första */
.table th:nth-child(n+2), .table td:nth-child(n+2) {
  width: 4em !important;
}

/* Info-box styling */
.info-box {
  background-color: #cce3f1;
  border-left: 4px solid #0077bc;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.info-box h4 {
  color: #3F5664;
  margin-top: 0;
}

/* Nyckeltal panels */
.nyckeltal-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.nyckeltal-item {
  flex: 1 1 200px;
  background-color: #cce3f1;
  padding: 1rem;
  border-radius: 4px;
  border-left: 4px solid #0077bc;
}

.nyckeltal-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #3F5664;
}

.nyckeltal-label {
  font-size: 0.9rem;
  color: #333333;
}

/* Förbättra länkar */
a {
  color: #0076bc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Utskriftsanpassning */
@media print {
  @page {
    size: A4;
    margin: 2cm;
  }
  
  body {
    font-size: 10pt;
    line-height: 1.3;
  }
  
  h1 {
    font-size: 16pt;
  }
  
  h2 {
    font-size: 14pt;
  }
  
  h3 {
    font-size: 12pt;
  }
  
  .print-button {
    display: none;
  }
  
  #TOC, .navbar {
    display: none !important;
  }
  
  /* För att säkerställa att diagram visas korrekt vid utskrift */
  img, figure {
    max-width: 100%;
    height: auto !important;
    page-break-inside: avoid;
  }
  
  /* Undvik sidbrytningar inom viktiga sektioner */
  h1, h2, h3, 
  .info-box, 
  .nyckeltal-panel,
  table, figure {
    break-inside: avoid;
  }
  
  /* Ta bort bakgrundsfärger för att spara bläck (valfritt) */
  .info-box, .warning-box, .error-box, .success-box {
    background-color: transparent !important;
    border-left: 2pt solid #3F5664 !important;
  }
  
  /* Säkerställ korrekta sidbrytningar */
  p, table, .gt_table {
    orphans: 3;
    widows: 3;
  }
  
  /* Gör om flexboxar för bättre utskrift */
  .nyckeltal-panel {
    display: block !important;
  }
  
  .nyckeltal-item {
    margin-bottom: 1cm;
    page-break-inside: avoid;
  }
  
  /* Lägg till sidnummer */
  @bottom-right {
    content: counter(page);
  }
  
  /* Göm meny och andra kontroller */
  button, .navbar, .nav, .sidebar, .navbar-brand {
    display: none !important;
  }
}

/* Responsiva tabeller */
@media (min-width: 1200px) {
  /* För stora skärmar - justera avstånd mellan kolumner */
  table th:first-child, 
  table td:first-child {
    padding-right: 0 !important;
    width: 8% !important;
  }
  
  table th:nth-child(2), 
  table td:nth-child(2) {
    width: 10% !important;
  }
  
  /* Jämn fördelning av övriga kolumner */
  table th:nth-child(n+3), 
  table td:nth-child(n+3) {
    width: calc(82% / 7) !important; /* Fördela återstående utrymme jämnt */
  }
}

@media (max-width: 1199px) {
  /* För medium skärmar - behåll tabellen läsbar */
  table {
    table-layout: fixed; /* Gör att kolumnbredderna respekteras */
  }
  
  table th, table td {
    padding: 8px 3px !important;
  }
  
  table th:first-child, 
  table td:first-child {
    width: 15% !important;
  }
}

@media (max-width: 768px) {
  /* För mobila enheter - gör tabellen scrollbar horisontellt */
  .table-container {
    width: 100%;
    overflow-x: auto;
  }
  
  table {
    min-width: 700px; /* Säkerställer att tabellen inte komprimeras för mycket */
  }
  
  table th, table td {
    padding: 6px 2px !important;
    font-size: 0.85rem !important;
  }
}

/* Allmänna tabellstilar som alltid gäller */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

table th, table td {
  white-space: nowrap; /* Hindrar radbrytning inom celler */
  border: none;
}

table caption {
  font-style: italic;
  text-align: left;
  caption-side: bottom;
  padding-top: 0.5rem;
  color: #666;
  font-size: 0.9rem;
}

/* Formatering av figur/tabelltext */
.figure-caption, .table-caption {
  font-size: 0.9rem !important;
  font-style: italic !important;
  color: #666 !important;
  margin-top: 0.3rem !important;
  margin-bottom: 1.5rem !important;
}


```

