label { display: block; font-size: .82rem; color: var(--text-muted); margin-bottom: 5px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="date"], input[type="file"], textarea, select {
  width: 100%;
  padding: 11px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit; font-size: 1rem;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
/* Tastaturfokus må være synlig også på knapper og lenker. */
a:focus-visible, button:focus-visible, .knapp:focus-visible,
summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
/* Native date/search widgets render a black glyph on a dark field otherwise. */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); }
textarea { min-height: 160px; resize: vertical; font-variant-numeric: tabular-nums; }

.felt + .felt { margin-top: var(--gap); }
.felt-feil { color: var(--danger); font-size: .8rem; margin-top: 5px; }
.felt-hjelp { color: var(--text-dim); font-size: .8rem; margin-top: 5px; }
/* A help line between two fields breaks the `.felt + .felt` rule above and
   leaves the next field with no top margin, so the help text collides with
   its label. Restore the gap across it. */
.felt-hjelp + .felt { margin-top: var(--gap); }

.knapp {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: inherit; font-size: .95rem; font-weight: 700;
  cursor: pointer;
}
.knapp:hover { filter: brightness(1.08); text-decoration: none; }
.knapp--full { display: block; width: 100%; }
.knapp--sekundar {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.knapp--sekundar:hover { background: var(--surface-hover); filter: none; }
.knapp--fare { background: transparent; border-color: var(--danger); color: var(--danger); }
.knapp--fare:hover { background: var(--danger-wash); filter: none; }
.knapp--liten { padding: 6px 11px; font-size: .8rem; }

.knapperad { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ── Segmented control ───────────────────────────────────────────── */
.segmentert {
  display: flex; gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.segmentert a {
  flex: 1;
  text-align: center;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: .85rem; font-weight: 600;
}
.segmentert a:hover { color: var(--text); text-decoration: none; }
.segmentert a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); }
