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

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
}

.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
header {
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
  margin-bottom: 2rem;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: #1a1a1a;
}
nav a {
  color: #555;
  text-decoration: none;
  font-size: 0.95rem;
}
nav a:hover { color: #1a1a1a; }

/* Forside */
.forside-intro {
  margin: 2rem 0;
}
.forside-intro h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.forside-intro p {
  color: #555;
  font-size: 1rem;
}

.artikkelgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 2rem 0;
}
.kort {
  display: block;
  padding: 0.875rem 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  text-decoration: none;
  color: #1a1a1a;
  transition: border-color 0.15s, background 0.15s;
}
.kort:hover {
  border-color: #2563eb;
  background: #eff6ff;
}
.kort-tittel { font-size: 0.95rem; }

/* Artikkel */
article h1 {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.innhold h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}
.innhold h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}
.innhold p { margin-bottom: 1rem; }
.innhold ul, .innhold ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.innhold li { margin-bottom: 0.3rem; }

.innhold .eksempel {
  background: #f5f5f5;
  border-left: 3px solid #2563eb;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
}
.innhold .huskeregel {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}
.innhold .huskeregel strong { color: #1d4ed8; }

/* Relatert */
.relatert {
  border-top: 1px solid #e5e5e5;
  margin-top: 3rem;
  padding-top: 1.5rem;
}
.relatert h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.relatert ul { list-style: none; padding: 0; }
.relatert li { margin-bottom: 0.4rem; }
.relatert a { color: #2563eb; text-decoration: none; font-size: 0.95rem; }
.relatert a:hover { text-decoration: underline; }

/* Artikkelliste */
.artikkelliste { list-style: none; padding: 0; }
.artikkelliste li { border-bottom: 1px solid #f0f0f0; }
.artikkelliste a {
  display: block;
  padding: 0.6rem 0;
  color: #2563eb;
  text-decoration: none;
}
.artikkelliste a:hover { text-decoration: underline; }

/* Footer */
footer {
  border-top: 1px solid #e5e5e5;
  margin-top: 4rem;
  padding: 1.5rem 0;
  color: #888;
  font-size: 0.875rem;
}

/* Søk */
.sok-wrapper {
  position: relative;
  margin: 1.5rem 0;
}
#sok-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  background: #fff;
}
#sok-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px #dbeafe;
}
.sok-resultater {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  list-style: none;
  padding: 0.25rem 0;
  margin: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.sok-resultater a {
  display: block;
  padding: 0.6rem 1rem;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.95rem;
}
.sok-resultater a:hover {
  background: #eff6ff;
  color: #2563eb;
}
.sok-ingen {
  padding: 0.6rem 1rem;
  color: #888;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  article h1 { font-size: 1.5rem; }
  .artikkelgrid { grid-template-columns: 1fr 1fr; }
}
