/* Frammi: the bare elements. Colours and sizes come from tokens.css. */

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

/* "hidden" means hidden, whatever display a class gives the element */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  line-height: 1.2;
  /* Long Icelandic compounds break instead of pushing the page wide */
  overflow-wrap: anywhere;
  hyphens: auto;
}
h1 { font-size: var(--fs-xl); font-weight: 700; line-height: 1.08; }
h2 { font-size: var(--fs-lg); font-weight: 650; }
h3 { font-size: 1.0625rem; font-weight: 650; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--interactive); text-underline-offset: 3px; }
a:hover { color: var(--interactive-hover); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius); }

button, input, textarea, select { font: inherit; color: inherit; }

.muted { color: var(--text-muted); }
.lead { color: var(--text-muted); max-width: 68ch; }
.hint { color: var(--text-muted); font-size: var(--fs-sm); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.stack > * + * { margin-top: var(--space-4); }
.stack > input[type="hidden"] + * { margin-top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-3); top: -100px; z-index: 200;
  display: flex; align-items: center; min-height: var(--target);
  padding: var(--space-2) var(--space-3);
  background: var(--surface); color: var(--interactive); border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-3); }

.icon { flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
