:root {
  --page: #F3F9F5;
  --card: #E3EFE7;
  --text: #0F2E1F;
  --text-2: #4D6B5A;
  --brand: #1B6B45;
  --on-brand: #FFFFFF;
  --brand-mork: #134D33;
  --card-mork: #D0E3D7;
  --linje-ljus: #B9D0C0;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --steg-1: 8px;
  --steg-2: 16px;
  --steg-3: 24px;
  --steg-4: 40px;
  --steg-5: 64px;
  --kant: 20px;
}

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

html {
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.story {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

body.story > main {
  flex: 1 0 auto;
  width: 100%;
}

img, svg {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--text);
  text-transform: none;
  margin: 0;
}

p, ul, ol, dl, figure, blockquote, fieldset, table {
  margin: 0;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--brand-mork);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.ram {
  box-sizing: border-box;
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--kant);
  padding-right: var(--kant);
}

.sidhuvud {
  background: var(--page);
  color: var(--text);
  border-bottom: 1px solid var(--text-2);
}

.sidhuvud-rad {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 12px;
  min-height: 62px;
}

.ordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.ordmark:hover {
  color: var(--text);
  text-decoration: none;
}

.ordmark:hover .gransstolpe {
  color: var(--brand-mork);
}

.gransstolpe {
  flex: none;
  width: 18px;
  height: 27px;
  color: var(--brand);
}

.huvudnav {
  display: flex;
  align-items: center;
  gap: 0 10px;
}

.huvudnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: underline dotted var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.huvudnav a:hover {
  color: var(--brand);
  text-decoration-style: solid;
}

.rubrikyta {
  position: relative;
  background: var(--card);
  color: var(--text);
  border-bottom: 1px solid var(--text-2);
}

.rubrikyta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: linear-gradient(90deg, var(--text-2) 1px, transparent 1px) 0 100% / 12px 5px repeat-x, linear-gradient(90deg, var(--text-2) 1px, transparent 1px) 0 100% / 60px 10px repeat-x;
  pointer-events: none;
}

.rubrikyta-rutnat {
  display: grid;
  gap: var(--steg-3);
  padding-top: var(--steg-4);
  padding-bottom: var(--steg-4);
}

.annonsrad {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: var(--steg-3);
}

.annonsmarke {
  display: inline-block;
  padding: 3px 11px 2px;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.avdelning {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-2);
}

.storrubrik {
  font-size: clamp(2rem, 7.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.012em;
  hyphens: manual;
}

.underrubrik {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.5;
  color: var(--text);
}

.signatur {
  margin-top: var(--steg-3);
  padding-top: 12px;
  border-top: 1px dotted var(--text-2);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-2);
}

.signatur strong {
  color: var(--text);
  font-weight: 600;
}

.end_block {
  background: var(--card);
  color: var(--text);
  border-top: 1px solid var(--text-2);
  margin-top: var(--steg-5);
  font-size: 0.875rem;
  line-height: 1.65;
}

.end_block-rad {
  display: flex;
  flex-direction: column;
  gap: var(--steg-1);
  padding-top: var(--steg-3);
  padding-bottom: var(--steg-3);
}

.meta_list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--steg-3);
}

.meta_list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand);
}

.masthead_box {
  color: var(--text);
}

.masthead_box details {
  max-width: 44rem;
}

.masthead_box summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.masthead_box summary::-webkit-details-marker {
  display: none;
}

.masthead_box summary::before {
  content: "+";
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px dotted var(--brand);
  color: var(--brand);
  font-weight: 700;
  line-height: 1;
}

.masthead_box details[open] summary::before {
  content: "\2212";
}

.masthead_box p {
  padding: 0 0 var(--steg-1) 30px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.kartblad {
  padding-top: var(--steg-4);
}

.ingress p {
  max-width: 38em;
  font-size: 1.0625rem;
}

.ingress p + p {
  margin-top: 1rem;
}

.versaler {
  font-size: 0.84em;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
}

.kartbild {
  margin-top: var(--steg-4);
  max-width: 640px;
}

.kartbild-ram {
  border-bottom: 2px solid var(--brand);
  background: var(--card);
}

.kartbild img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
}

.kartbild-a img {
  object-position: 50% 62%;
}

.kartbild-b img {
  object-position: 42% 38%;
}

.kartbild-c img {
  object-position: 72% 55%;
}

.kartbild figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-2);
}

.skifte {
  position: relative;
  margin-top: var(--steg-4);
}

.skifte + .skifte {
  padding-top: var(--steg-4);
}

.skifte + .skifte::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--text-2);
}

.skifte + .skifte::after {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 19px;
  height: 19px;
  margin-left: -9px;
  background: linear-gradient(var(--brand), var(--brand)) center / 2px 100% no-repeat, linear-gradient(var(--brand), var(--brand)) center / 100% 2px no-repeat, var(--page);
}

.skifte h2 {
  font-size: clamp(1.45rem, 5.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
  max-width: 24em;
}

.skiftesnummer {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border: 2px dotted var(--brand);
  color: var(--brand);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.skifte p, .skifte ul {
  max-width: 38em;
  margin-top: 1rem;
}

.skifte h2 + p {
  margin-top: 1rem;
}

.skifte ul {
  padding: 0;
  list-style: none;
}

.skifte li {
  position: relative;
  margin-top: 8px;
  padding-left: 26px;
}

.skifte li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 9px;
  height: 9px;
  background: var(--brand);
}

.skifte .kartbild {
  margin-top: var(--steg-3);
}

.markering {
  position: relative;
  max-width: 38em;
  margin-top: var(--steg-3);
  padding: 34px 28px;
  background: var(--card);
  color: var(--text);
}

.skifte .markering p {
  margin-top: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.5;
}

.horn {
  position: absolute;
  width: 26px;
  height: 26px;
  color: var(--brand);
}

.horn-ovan {
  top: 8px;
  left: 8px;
}

.horn-nere {
  bottom: 8px;
  right: 8px;
}

.knapp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "rad pil" "under under";
  align-items: center;
  column-gap: var(--steg-2);
  width: 100%;
  max-width: 28rem;
  min-height: 44px;
  padding: 14px 20px 13px;
  border: 0;
  border-radius: 0;
  background: var(--brand);
  color: var(--on-brand);
  font-family: var(--sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.knapp:hover {
  background: var(--brand-mork);
  color: var(--on-brand);
  text-decoration: none;
}

.knapp-rad {
  grid-area: rad;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.knapp-under {
  grid-area: under;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.knapp-pil {
  grid-area: pil;
  font-size: 1.5rem;
  line-height: 1;
}

.skifte .knapp {
  margin-top: var(--steg-3);
}

.slutkort {
  max-width: 38em;
  margin-top: var(--steg-4);
  padding: var(--steg-3) 22px 26px;
  border: 1px solid var(--text-2);
  background: var(--card);
}

.slutkort p {
  max-width: 30em;
  margin-bottom: 20px;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
}

.tail_note {
  max-width: 38em;
  margin-top: var(--steg-3);
  padding-top: 12px;
  border-top: 1px dotted var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
}

.vidare {
  margin-top: var(--steg-5);
}

.vidare h2 {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--text-2);
}

.vidare ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.vidare li {
  display: grid;
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid var(--linje-ljus);
}

.bilaga {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px dotted var(--brand);
  color: var(--brand);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.vidare a {
  display: inline-block;
  padding: 8px 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand);
}

.vidare li p {
  margin-top: 4px;
  max-width: 34em;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-2);
}

[hidden] {
  display: none !important;
}

body.story main, body.artikelsida, body.textsida, .uppslagsyta, .kartblad, .vidare, .skifte {
  background-color: var(--page);
  color: var(--text);
}

.view-appointment-page .formularkort {
  scroll-margin-top: var(--steg-2);
}

.tjanstdel, .steg, .krysstext {
  min-width: 0;
}

.stegtext {
  white-space: nowrap;
}

.tjanstyta {
  padding-top: var(--steg-4);
}

.tjanstrutnat {
  display: grid;
  gap: var(--steg-4);
}

.tjanstrubrik {
  margin-top: 14px;
  font-size: clamp(2rem, 7.4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.tjanstingress {
  max-width: 38em;
  margin-top: 20px;
  font-size: 1.0625rem;
}

.tabellram {
  margin-top: 28px;
  overflow-x: auto;
}

.genomgang {
  width: 100%;
  margin-top: 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
  background: none;
}

.genomgang th {
  padding: 0 14px 10px 0;
  border-bottom: 2px solid var(--text-2);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  color: var(--brand);
  background: none;
}

.genomgang td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--linje-ljus);
  vertical-align: top;
  background: none;
}

.genomgang td:last-child, .genomgang th:last-child {
  padding-right: 0;
}

.randnot {
  max-width: 34em;
  margin-top: 20px;
  padding-left: 14px;
  border-left: 2px dotted var(--text-2);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-2);
}

.formularkort {
  padding: 20px 18px 24px;
  border: 1px solid var(--brand);
  background: var(--card);
  color: var(--text);
}

.stegrad {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 22px;
  padding: 0 0 16px;
  list-style: none;
  border-bottom: 1px solid var(--linje-ljus);
}

.stegrad li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.stegnummer {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px dotted var(--text-2);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1;
}

.stegrad .aktivt {
  color: var(--brand);
}

.stegrad .aktivt .stegnummer {
  border: 2px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

.stegrubrik {
  margin-bottom: 18px;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
}

.frageblock {
  min-width: 0;
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}

.frageblock legend {
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.valrad {
  display: grid;
  gap: 10px;
}

.val {
  position: relative;
  display: block;
  cursor: pointer;
}

.val input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.valruta {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  min-height: 62px;
  padding: 12px 14px;
  border: 2px solid var(--linje-ljus);
  background: var(--page);
}

.valbock {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border: 2px dotted var(--text-2);
  background: var(--page);
}

.valtext {
  font-size: 1rem;
  line-height: 1.4;
}

.val:hover .valruta {
  border-color: var(--text-2);
}

.val input:checked + .valruta {
  border-color: var(--brand);
  background: var(--on-brand);
}

.val input:checked + .valruta .valbock {
  border: 2px solid var(--brand);
  background: var(--brand);
}

.val input:checked + .valruta .valbock::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 1px;
  width: 8px;
  height: 14px;
  border: solid var(--on-brand);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.val input:focus-visible + .valruta {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.frageblock.ogiltig .valruta {
  border-style: dashed;
  border-color: var(--text);
}

.faltrad {
  display: grid;
  gap: 0 16px;
}

.falt {
  margin-bottom: 18px;
}

.falt label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.falt input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 10px 14px;
  border: 2px solid var(--text-2);
  border-radius: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.3;
  box-shadow: none;
}

.falt input:focus {
  border-color: var(--brand);
  background: var(--on-brand);
  color: var(--text);
}

.falt input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.falt input[aria-invalid="true"] {
  border-color: var(--text);
  border-style: dashed;
}

.fel {
  margin-top: 8px;
  padding: 2px 0 2px 12px;
  border-left: 4px solid var(--text);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}
