/* Kartlegg – Grunnstil for HTML-elementer.
 * Del av designsystemet i assets/css/. Filene lastes i nummerrekkefølge fra index.html.
 */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(39,134,197,.4);
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
  opacity: .5;
}
@media(prefers-reduced-motion:reduce){
  * {
    transition: none !important;
  }
}
@media(max-width:770px){
  body.mobile-menu-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
  :is(input,select,textarea):not([type=checkbox]):not([type=radio]) {
    font-size: 16px !important;
    max-width: 100%;
    min-width: 0;
  }
  /* iOS Safari gir dato- og tidsfelt en egen minstebredde som ellers sprenger kortet */
  input:is([type=date],[type=time],[type=datetime-local]) {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    text-align: left;
  }
  input:is([type=date],[type=time],[type=datetime-local])::-webkit-date-and-time-value {
    text-align: left;
  }
  dialog {
    box-sizing: border-box;
    max-width: calc(100vw - 16px);
    max-height: calc(var(--visible-height,100dvh) - 16px);
    overscroll-behavior: contain;
    scroll-padding-block: 16px;
  }
}
@media(prefers-reduced-motion:reduce){
  html {
    scroll-behavior: auto;
  }
}
:where(.nav,.btn,.base-theme-option,.service-theme-option,.appearance-options label) {
  transition: background-color .28s var(--ui-ease),border-color .28s var(--ui-ease),box-shadow .28s var(--ui-ease),color .2s ease;
}
@media(prefers-reduced-motion:reduce){
  :where(.nav,.btn,.base-theme-option,.service-theme-option,.appearance-options label) {
    transition: none !important;
  }
}
/* Overskrifter i Schibsted Grotesk, samme skrift som ordmerket (logoark oktober 2026).
   Ligger på kartlegg.com selv, så besøket ikke kontakter Google. Lisens: assets/fonts/OFL.txt. */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:is(h1,h2,h3,.score-number,.preview-score) {
  font-family: "Schibsted Grotesk",Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing: -.015em;
}
body {
  font-family: Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing: -.006em;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.ui-icon-svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:is(input,select,textarea,button):focus-visible {
  box-shadow: var(--ui-focus);
  outline-offset: 2px;
}
/* Dato og klokkeslett: Chrome flytter fokus til delfeltene, så :focus-visible treffer ikke selve feltet. */
:is(input[type="date"],input[type="time"]):focus {
  outline: 3px solid rgba(39,134,197,.4);
  outline-offset: 2px;
  box-shadow: var(--ui-focus);
}
:is(h1,h2,h3,p,li,label,button,a,small,strong) {
  overflow-wrap: anywhere;
}
@media(forced-colors:active){
  .ui-icon-svg {
    stroke: currentColor;
  }
}
/* Telefon: ingen myk rulling. Når iPhone flytter et felt over tastaturet, ble flyttingen animert og kunne
   havne et annet sted enn ventet. */
@media(max-width:770px){
  html {
    scroll-behavior: auto;
  }
}
