/* Lenke i bio for Studentdemokratiet ONH.
   ONH-profilen med studentdemokrati-fargene: blå, gul og korall, sort tekst, Inter,
   ONH-pilene og litt avrundede hjørner. Ingen versaler, ingen sort bunn. */
@font-face {
  font-family: Inter;
  src: url(/filer/inter.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --sort: #1F1E1E;
  --hvit: #FFFFFF;
  --bla: #98C8F7;
  --lysbla: #EDF6FF;
  --gul: #FFC85E;
  --lysgul: #FFF1D7;
  --korall: #FFADA2;
  --lyskorall: #FFEFF1;
  --kant: 16px;
  --maks: 1180px;
  --ut: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}
@media (min-width: 700px) { :root { --kant: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hvit);
  color: var(--sort);
  font-family: Inter, Arial, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2, h3 { font-weight: 700; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sort);
  outline-offset: 3px;
  border-radius: 4px;
}
.innhold { max-width: var(--maks); margin: 0 auto; padding: 0 var(--kant); }
.skjult { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Toppen: navnetrekket til venstre, Meny til høyre på telefon, hele menyen på PC */
.topp { background: var(--bla); }
.topp .innhold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo { display: block; flex: none; line-height: 0; border-radius: 4px; }
.logo img { height: 40px; width: auto; }
.menyknapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-right: -10px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--sort);
  font: 700 18px/1 Inter, Arial, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menyknapp svg { width: 24px; height: 16px; flex: none; }
.hovedmeny { display: none; }
@media (min-width: 1100px) {
  .topp .menyknapp { display: none; }
  .hovedmeny { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; }
  .hovedmeny a {
    font-size: 16px;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
    text-decoration-color: transparent;
    transition: text-decoration-color 160ms var(--ut);
  }
  .hovedmeny a:hover { text-decoration-color: currentColor; }
}
@media (min-width: 1280px) {
  .hovedmeny a { font-size: 17px; }
  .hovedmeny a[aria-current="page"] {
    font-weight: 700;
    text-decoration: none;
    background: var(--gul);
    padding: 0.08em 0.32em 0.12em;
    margin: -0.08em -0.32em -0.12em;
    border-radius: 0.15em;
  }
}

/* Bærepila: ONH-pil F-08 som bærer teksten. Hals og hode beholder formen (hals 1/3 bred,
   hode 5/6 av høyden), boksen blir så lang som plassen. Ingen avrunding på pilene */
.veier { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.vei {
  --h: 84px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: var(--h);
  padding: 0 calc(var(--h) * 1.167 + 12px) 0 20px;
  background: var(--gul);
  color: var(--sort);
  text-decoration: none;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.12;
  clip-path: polygon(0 0, calc(100% - var(--h) * 1.167) 0, calc(100% - var(--h) * 1.167) 41.67%,
    calc(100% - var(--h) * 0.833) 41.67%, calc(100% - var(--h) * 0.833) 0, 100% 50%,
    calc(100% - var(--h) * 0.833) 100%, calc(100% - var(--h) * 0.833) 58.33%,
    calc(100% - var(--h) * 1.167) 58.33%, calc(100% - var(--h) * 1.167) 100%, 0 100%);
  transition: transform 200ms var(--ut);
  -webkit-tap-highlight-color: transparent;
}
.vei small { display: block; font-weight: 500; font-size: 16px; margin-top: 3px; }
.vei[aria-current="page"] { background: var(--hvit); }
.vei:focus-visible { outline: none; background: var(--hvit); text-decoration: underline; text-underline-offset: 4px; }
@media (hover: hover) { .vei:hover { transform: translateX(6px); } }
.vei:active { transform: translateX(3px); }
@media (min-width: 420px) { .vei { --h: 92px; font-size: 23px; } }
@media (min-width: 1000px) { .vei { --h: 112px; font-size: 28px; padding-left: 30px; } .vei small { font-size: 18px; } }

/* Forsiden */
.forside { background: var(--bla); }
.forside .innhold { padding-top: 20px; padding-bottom: 48px; }
.forside h1 { font-size: clamp(44px, 13.5vw, 96px); line-height: 0.98; letter-spacing: -0.01em; }
.forside h1 span { display: block; }
.forside .ingress { max-width: 30em; margin-top: 16px; font-size: 19px; line-height: 1.5; }
.forside .veier { margin-top: 32px; }
@media (min-width: 1000px) {
  .forside .innhold {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 64px;
    align-items: center;
    min-height: 520px;
    padding-top: 40px;
    padding-bottom: 80px;
  }
  .forside .veier { margin-top: 0; gap: 16px; }
  .forside .ingress { font-size: 21px; }
}

/* Tittelen på undersidene */
.tittel { position: relative; background: var(--bla); overflow: hidden; }
.tittel .innhold { position: relative; padding-top: 18px; padding-bottom: 40px; }
.tittel h1 { font-size: clamp(30px, 9.6vw, 76px); line-height: 1; letter-spacing: -0.01em; max-width: 11em; }
.tittel .etikett { margin-top: 14px; }
.tittel .ingress { max-width: 34em; margin-top: 18px; font-size: 19px; line-height: 1.5; }
/* Pila i tittelen bare der det er plass ved siden av overskriften */
.tittel .pil { display: none; position: absolute; fill: var(--sort); }
@media (min-width: 700px) {
  .tittel .pil { display: block; right: var(--kant); top: 20px; width: 120px; height: 120px; }
  .tittel.med-pil h1 { padding-right: 140px; }
}
@media (min-width: 1000px) {
  .tittel .innhold { padding-top: 48px; padding-bottom: 64px; }
  .tittel .ingress { font-size: 21px; }
  .tittel .pil { width: 190px; height: 190px; top: 24px; }
  .tittel.med-pil h1 { padding-right: 220px; }
}

.etikett {
  display: inline-block;
  background: var(--korall);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  padding: 0.3em 0.55em 0.34em;
  border-radius: 0.3em;
}
.etikett.gul { background: var(--gul); }
.etikett.hvit { background: var(--hvit); }
.tittel .etikett { font-size: 18px; }

/* Innholdet */
.del { padding: 40px 0 8px; }
.del:last-of-type { padding-bottom: 48px; }
.del h2 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
.del > .innhold > p { max-width: 38em; }
.del .forklaring { max-width: 38em; margin-bottom: 20px; }
@media (min-width: 1000px) {
  .del { padding-top: 56px; }
  .del h2 { font-size: 32px; }
  body { font-size: 18px; }
}

.rutenett { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .rutenett.to, .rutenett.tre { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .rutenett.tre { grid-template-columns: 1fr 1fr 1fr; } .rutenett { gap: 16px; } }

.kort {
  background: var(--lysbla);
  border-radius: 14px;
  padding: 18px 20px 20px;
}
.kort.gul { background: var(--lysgul); }
.kort.korall { background: var(--lyskorall); }
.kort h3 { font-size: 20px; line-height: 1.25; }
.kort p { margin-top: 6px; }
.kort .etikett { margin-bottom: 10px; }
.kort .i-host { margin-top: 10px; font-size: 15px; line-height: 1.5; }
.kort .i-host b { font-weight: 700; }

/* Styret */
.person h3 { font-size: 21px; }
.person .verv { margin-top: 4px; font-weight: 700; }
.person .hva { margin-top: 2px; font-size: 16px; line-height: 1.45; }

.liste { padding-left: 1.2em; max-width: 40em; }
.liste li + li { margin-top: 8px; }
.liste li::marker { color: var(--sort); }

/* Har du en sak: kontakt på alle sidene */
.sak { background: var(--lysgul); }
.sak .innhold { padding-top: 40px; padding-bottom: 44px; }
.sak h2 { font-size: 26px; line-height: 1.2; }
.sak .ingress { margin-top: 8px; max-width: 34em; }
.kontakt { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.kontakt a, .kontakt .rad {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  padding: 12px 18px;
  background: var(--hvit);
  border-radius: 12px;
  text-decoration: none;
}
.kontakt .hva { font-size: 15px; font-weight: 500; }
.kontakt .hvor { font-size: 18px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.kontakt a .hvor { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
@media (min-width: 1000px) {
  .sak .innhold { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; padding-top: 56px; padding-bottom: 60px; }
  .sak h2 { font-size: 32px; }
  .kontakt { margin-top: 0; }
}

.bunn { padding: 22px 0 30px; font-size: 15px; }
.bunn .innhold { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }

/* Søk om midler og Kontakt oss: vanlige knapper under bærepilene */
.snarveier { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.snarvei {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  padding: 12px 20px;
  background: var(--hvit);
  border-radius: 12px;
  color: var(--sort);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  transition: transform 200ms var(--ut);
  -webkit-tap-highlight-color: transparent;
}
.snarvei small { font-weight: 500; font-size: 15px; margin-top: 2px; }
.snarvei[aria-current="page"] { background: var(--gul); }
@media (hover: hover) { .snarvei:hover { transform: translateX(4px); } }
@media (min-width: 640px) {
  .snarveier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .snarveier li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Det store tallet på nettstudentsida */
.tall { display: grid; gap: 4px 32px; align-items: center; background: var(--lyskorall); border-radius: 16px; padding: 20px 22px 24px; }
.tall .stort { font-size: clamp(64px, 19vw, 124px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.tall p { max-width: 28em; font-size: 19px; line-height: 1.45; }
.tall small { display: block; margin-top: 8px; font-size: 14px; }
@media (min-width: 700px) { .tall { grid-template-columns: auto 1fr; padding: 28px 36px; } }
@media (min-width: 1000px) { .tall p { font-size: 21px; } }
@media (min-width: 1000px) { .snarvei { font-size: 21px; min-height: 76px; padding: 14px 24px; } .snarvei small { font-size: 16px; } }
/* Smal kolonne på små PC-skjermer: «Arbeidsoppgaver» skal få plass på én linje */
@media (min-width: 1000px) and (max-width: 1279px) { .snarvei { font-size: 19px; padding: 12px 18px; } .snarvei small { font-size: 15px; } }

/* Nedlastingsknappen for søknadsskjemaet */
.last-ned {
  display: inline-flex;
  flex-direction: column;
  margin-top: 16px;
  padding: 12px 18px;
  min-height: 56px;
  justify-content: center;
  background: var(--gul);
  border-radius: 10px;
  color: var(--sort);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  text-decoration: none;
}
.last-ned span { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.last-ned small { font-weight: 500; font-size: 14px; margin-top: 3px; }

/* Kontaktlista på Kontakt oss-sida, på hvit bunn */
.kontakt.pa-hvitt { margin-top: 12px; max-width: 640px; }
.kontakt.pa-hvitt a, .kontakt.pa-hvitt .rad { background: var(--lysbla); }

/* Vervene på Arbeidsoppgaver: kort som kan åpnes for alle oppgavene */
.verv-liste { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 1000px) { .verv-liste { grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; } }
.verv-kort { background: var(--lysbla); border-radius: 14px; }
.verv-kort.gul { background: var(--lysgul); }
.verv-kort.korall { background: var(--lyskorall); }
.verv-kort summary {
  display: block;
  position: relative;
  padding: 18px 64px 20px 20px;
  cursor: pointer;
  list-style: none;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
}
.verv-kort summary::-webkit-details-marker { display: none; }
.verv-kort summary:focus-visible { outline: 3px solid var(--sort); outline-offset: 2px; }
.verv-kort summary h3 { font-size: 20px; line-height: 1.25; margin-top: 10px; }
.verv-kort summary p { margin-top: 6px; }
.verv-kort .mer {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.verv-kort[open] .mer .lukket, .verv-kort:not([open]) .mer .apent { display: none; }
.verv-kort .tegn {
  position: absolute;
  right: 16px;
  top: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--hvit);
}
.verv-kort .tegn::before, .verv-kort .tegn::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 15px;
  width: 14px;
  height: 2px;
  background: var(--sort);
  border-radius: 1px;
  transition: transform 200ms var(--ut);
}
.verv-kort .tegn::after { transform: rotate(90deg); }
.verv-kort[open] .tegn::after { transform: rotate(0deg); }
.verv-kort .innmat { padding: 0 20px 22px; }
.verv-kort .innmat h4 { font-size: 16px; font-weight: 700; margin: 16px 0 6px; }
.verv-kort .innmat h4:first-child { margin-top: 0; }
.verv-kort .innmat ul { margin: 0; padding-left: 1.15em; }
.verv-kort .innmat li + li { margin-top: 5px; }
.verv-kort .innmat p { margin: 0; }
.kilder { margin-top: 28px; font-size: 14px; line-height: 1.55; max-width: 46em; }
.kilder a { overflow-wrap: anywhere; }

/* Menyen som legger seg over hele skjermen på telefon */
.meny {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bla);
  visibility: hidden;
  opacity: 0;
  transition: opacity 200ms var(--ut), visibility 0s linear 200ms;
}
.meny.apen { visibility: visible; opacity: 1; transition: opacity 200ms var(--ut), visibility 0s; }
.meny .veier li { transform: translateX(-14px); opacity: 0; transition: transform 260ms var(--ut), opacity 260ms var(--ut); }
.meny.apen .veier li { transform: none; opacity: 1; }
.meny.apen .veier li:nth-child(2) { transition-delay: 30ms; }
.meny.apen .veier li:nth-child(3) { transition-delay: 60ms; }
.meny .veier { margin-top: 20px; }
.meny .forsidelenke { display: inline-block; margin-top: 28px; font-size: 18px; text-underline-offset: 4px; }
.meny .sma { margin-top: 28px; font-size: 16px; line-height: 1.6; }
.meny .sma a { font-weight: 700; }
.meny .innhold.innmat { padding-bottom: 40px; }
body.meny-apen { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .vei, .snarvei, .meny, .meny .veier li, .verv-kort .tegn::after { transition: none !important; }
  .meny .veier li { transform: none; }
  .vei:hover, .vei:active, .snarvei:hover { transform: none; }
}

/* «Hva kan vi gjøre for deg?» får plass i toppmenyen først fra 1280 px; smalere står det «For deg» */
.hovedmeny .kortnavn { display: none; }
@media (max-width: 1279px) { .hovedmeny .langt { display: none; } .hovedmeny .kortnavn { display: inline; } }

/* Jevn linjedeling i overskrifter, så ingen ord står alene på siste linje */
.tittel h1, .kort h3 { text-wrap: balance; }
