/* Guidesider. Flate flater, samme typografi som forsiden. Ingen harde skygger. */
body.guide { color: var(--navy); }
/* padding-block, ikke shorthand: .wrap sin padding-inline må få stå */
.guide-hoved { padding-block: 2rem var(--sek, 6rem); }
@media (max-width: 699px) {
  body.guide { --pv-gutter: 24px; }
  .guide-hoved { padding-top: 1.5rem; }
}
/* Tydelig sidemarg på alle guide-sider; ikke full-bleed for kort/bokser.
   Asymmetrisk safe-area (f.eks. liggende iPhone) respekteres per side. */
body.guide .wrap {
  padding-left: max(var(--pv-gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pv-gutter), env(safe-area-inset-right, 0px));
}

.sti {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.25rem;
  font-size: var(--t-small, 0.875rem);
  line-height: 1.5;
  color: var(--pv-mose);
}
.sti a { color: var(--navy); text-underline-offset: 3px; }

.guide-meta {
  margin: 0;
  font: 800 var(--t-small, 0.875rem)/1.4 var(--pv-font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pv-mose);
}

body.guide h1 {
  margin: 0.5rem 0 0;
  max-width: 22ch;
  font-size: var(--pv-fs-h2, 2rem);
  line-height: 1.1;
  letter-spacing: var(--pv-track-display, -0.03em);
  color: var(--navy);
}

.artikkel {
  margin-top: 1.75rem;
  max-width: 68ch;
  font-size: 1.0625rem; /* 17px på mobil */
  line-height: 1.7;
  color: var(--navy);
}
@media (min-width: 700px) {
  .artikkel { font-size: 1.125rem; } /* 18px desktop */
}
.artikkel > p:first-child,
.artikkel > p:first-child em,
.artikkel em {
  font-style: italic;
}
.artikkel p { margin: 0 0 1.1em; }
.artikkel h2 {
  margin: 2.5em 0 0.6em;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: var(--pv-track-display, -0.03em);
  color: var(--navy);
}
.artikkel h3 {
  margin: 1.8em 0 0.6em;
  font-size: 1.125rem;
  line-height: 1.3;
}
.artikkel h2:first-child,
.artikkel h3:first-child { margin-top: 0; }
.artikkel a { color: var(--navy); font-weight: 700; text-underline-offset: 3px; }
.artikkel ul, .artikkel ol { margin: 0 0 1.1em; padding-left: 1.5em; }
.artikkel li { margin: 0; }
.artikkel li + li { margin-top: 0.5em; }
.artikkel blockquote {
  margin: 0 0 1.1em;
  padding: 1.15rem 1.25rem;
  border: var(--pv-border-myk);
  border-radius: var(--pv-r-md, 12px);
  background: var(--pv-papir, #fff);
}

.tabell-wrap {
  margin: 0 0 1.25rem;
  overflow-x: visible;
  border: var(--pv-border-myk);
  border-radius: var(--pv-r-md, 12px);
  background: var(--pv-papir, #fff);
}
.artikkel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
}
.artikkel th, .artikkel td {
  padding: 1rem 1.15rem;
  text-align: left;
  vertical-align: top;
  border-bottom: var(--pv-border-myk);
}
.artikkel th {
  font-weight: 750;
  background: color-mix(in srgb, var(--navy) 4%, var(--pv-papir, #fff));
}
.artikkel tr:last-child td { border-bottom: 0; }

@media (max-width: 639px) {
  .tabell-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    border-radius: 0;
    -webkit-overflow-scrolling: auto;
  }
  .artikkel table,
  .artikkel thead,
  .artikkel tbody,
  .artikkel th,
  .artikkel td,
  .artikkel tr {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .artikkel thead {
    width: 0 !important;
    height: 0 !important;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    visibility: hidden;
  }
  .artikkel tr {
    margin: 0 0 12px;
    padding: 1.15rem 1.25rem;
    border: var(--pv-border-myk);
    border-radius: var(--pv-r-md, 12px);
    background: var(--pv-papir, #fff);
  }
  .artikkel tr:last-child { margin-bottom: 0; }
  .artikkel td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: var(--pv-border-myk);
    text-align: left;
  }
  .artikkel td:last-child { border-bottom: 0; }
  .artikkel td::before {
    content: attr(data-label);
    font-weight: 750;
    flex: 0 1 42%;
    max-width: 12rem;
    color: var(--navy);
  }
  .artikkel .tabell-verdi {
    flex: 1 1 50%;
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .artikkel td.tabell-radnavn {
    display: block;
    font-weight: 800;
    font-size: 1rem;
    padding: 0.25rem 0 0.5rem;
    border-bottom: var(--pv-border-myk);
  }
  .artikkel td.tabell-radnavn::before { content: none; }
  .artikkel td.tabell-radnavn:last-child { border-bottom: 0; }
}
@media (min-width: 640px) {
  .tabell-wrap { overflow-x: visible; }
}



/* Kategorimeny og grupper på /guider/ */
.kat-meny {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  margin: 1.25rem 0 0;
  padding: 0.1rem 0 0.5rem;
}
.kat-meny a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border: var(--pv-border-myk);
  border-radius: 999px;
  background: var(--pv-papir, #fff);
  box-shadow: none;
  color: var(--navy);
  font-size: var(--t-body, 1rem);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.kat-meny a[aria-current="page"] {
  background: color-mix(in srgb, var(--navy) 8%, var(--pv-papir, #fff));
}
.kat-meny a:hover,
.kat-meny a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kat-meny a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.guide-kat {
  margin-top: 2.5rem;
  scroll-margin-top: 1rem;
}
.guide-kat-hode {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
}
.guide-kat-hode h1,
.guide-kat-hode h2 {
  margin: 0;
  max-width: none;
}
.guide-kat-hode h2 {
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: var(--pv-track-display, -0.03em);
  color: var(--navy);
  scroll-margin-top: 1rem;
}
.guide-kat-hode h2 a {
  color: inherit;
  text-decoration: none;
}
.guide-kat-hode h2 a:hover,
.guide-kat-hode h2 a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.veiviser-lenke {
  font-size: var(--t-body, 1rem);
  font-weight: 700;
  color: var(--navy);
  text-underline-offset: 3px;
}
.guide-kat .guide-grid,
.guide-kat-hode + .guide-grid,
.kat-meny + .guide-grid { margin-top: 1.25rem; }
@media (max-width: 699px) {
  .guide-kat-hode { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
}
