/*  02-grunn.css  ·  nullstilling, typografi, landmerke
    ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--fortrinn);
  background: var(--papir);
}

body {
  margin: 0;
  background: var(--papir);
  color: var(--ink);
  font: 400 var(--t-2)/var(--l-2) var(--sans);
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  word-break: normal;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--t-6); line-height: var(--l-6); }
h2 { font-size: var(--t-5); line-height: var(--l-5); }
h3 { font-size: var(--t-4); line-height: var(--l-4); }
h4 { font-family: var(--sans); font-size: var(--t-2); line-height: var(--l-2); font-weight: 700; }
p, ul, ol, dl, table, figure { margin: 0 0 var(--b-5); }
p { max-width: 72ch; }
li { max-width: 72ch; }
b, strong { font-weight: 700; }
em { font-style: italic; }

a { color: var(--aksent); text-decoration-color: var(--streke-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:visited { color: #8f4517; }
:focus-visible {
  outline: 2px solid var(--aksent);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

small { font-size: var(--t-1); line-height: var(--l-1); }
sub, sup { font-size: 72%; line-height: 0; }

hr { border: 0; border-top: 1px solid var(--streke); margin: var(--b-6) 0; }

/* tall og tabeller */
.t {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  text-align: right;
  letter-spacing: -0.01em;
}
.enhet { font-family: var(--sans); color: var(--ink-2); font-size: var(--t-0); }

/* mikrolabel, brukt ens overalt */
.mikro {
  font-family: var(--sans);
  font-size: var(--t-0);
  line-height: var(--l-0);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* utelukkende for skjermlesar / print */
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.noj { display: none; }        /* skjerm: knyttet innhold er i tabellen */

/* hoppelenker */
.hopp {
  position: absolute; left: var(--b-4); top: -100px; z-index: 60;
  background: var(--natt); color: var(--lys-pa-natt);
  padding: var(--b-2) var(--b-4); font-size: var(--t-1); text-decoration: none;
}
.hopp:focus { top: var(--b-2); }

section { scroll-margin-top: var(--fortrinn); }
