:root {
  --dif-navy: #071E46;
  --dif-blue: #69B8E8;
  --dif-yellow: #F5C542;
  --dif-red: #C92B3B;
  --dif-text: #202B3C;
  --dif-muted: #64748B;
  --dif-bg: #FFFFFF;
  --dif-soft: #F4F7FB;
  --dif-code-bg: #012456;
  --dif-code-text: #E6EDF7;
}

/* Grundtypografi */
html {
  font-size: 16px;
}

body {
  background: var(--dif-bg);
  color: var(--dif-text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dif-navy);
  font-family: Manrope, Inter, "Segoe UI", sans-serif;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-top: 2rem;
}

a {
  color: var(--dif-navy);
  text-decoration-color: var(--dif-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--dif-red);
  text-decoration-color: var(--dif-yellow);
}

/* Markeringar */
::selection {
  background: var(--dif-yellow);
  color: var(--dif-navy);
}

hr {
  border: 0;
  border-top: 2px solid var(--dif-blue);
  opacity: 0.65;
}

/* Kodblock */
pre {
  background: var(--dif-code-bg) !important;
  color: var(--dif-code-text) !important;
  border-left: 4px solid var(--dif-blue);
  border-radius: 8px;
  padding: 1rem 1.25rem !important;
  margin: 1.5rem 0 2.2rem !important;
  overflow-x: auto;
  line-height: 1.6 !important;
  font-family: "JetBrains Mono", Consolas, "Liberation Mono", monospace !important;
  font-size: 0.9rem;
  tab-size: 4;
}

pre *,
pre span,
code {
  font-family: "JetBrains Mono", Consolas, "Liberation Mono", monospace !important;
}

:not(pre) > code {
  background: var(--dif-soft);
  color: var(--dif-red);
  border: 1px solid #DCE5F0;
  border-radius: 4px;
  padding: 0.12em 0.35em;
  font-size: 0.9em;
}

/* Bilder och tabeller */
img {
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th {
  background: var(--dif-navy);
  color: #FFFFFF;
  text-align: left;
}

th, td {
  border: 1px solid #DCE5F0;
  padding: 0.65rem 0.8rem;
}

/* Små detaljer i Blug */
.plugin-label {
  color: var(--dif-navy) !important;
  border-bottom: 3px solid var(--dif-yellow);
}

/* Ta bort gamla bakgrundsfärger från importerad kod */
pre *,
pre span {
  background-color: transparent !important;
}


/* Enhetlig visning av kod */
pre {
  white-space: pre;
  tab-size: 4;
  overflow-x: auto;
  overflow-wrap: normal;
  word-break: normal;
}

pre code {
  display: block;
  white-space: inherit;
  tab-size: inherit;
}

/* Normalisera innehållet i kodblock */
pre code,
pre code * {
  background: transparent !important;
  font-family: "JetBrains Mono", Consolas, "Liberation Mono", monospace !important;
  font-size: inherit !important;
}

pre code::before,
pre code::after,
pre code *::before,
pre code *::after {
  content: none !important;
  display: none !important;
}

/* Rubriklänkar */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  color: inherit !important;
  text-decoration: none !important;
  transition: color 0.18s ease;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
  color: var(--dif-blue) !important;
  text-decoration: none !important;
}

/* Ta bort eventuell extra ram från Highlight.js-kod */
pre code {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Endast pre ska hantera horisontell scrollning */
pre code {
  overflow: visible !important;
  overflow-x: visible !important;
}
