:root {

  color-scheme: light dark;

  --bg: #f7f3ea;

  --hover-flate: rgba(35, 29, 20, .055);
  --hev: #fffdf8;
  --kant: #e0d6c2;

  --kant-sterk: #9f8862;
  --tekst: #231d14;
  --svak: #6b5d47;
  --akse: #8f5d12;
  --akse-tekst: #fffdf8;

  --brikke: #f2e6cd;
  --brikke-kant: #cbb289;
  --brikke-tekst: #3a2f1c;

  --skygge: 0 -2px 14px rgba(60, 44, 20, .10);
  --radius: 13px;
  --bunn: env(safe-area-inset-bottom, 0px);

  --innhold-bredde: 48rem;
  --innhold-luft: 18px;

  --innhold-innmat: calc(var(--innhold-bredde) - 2 * var(--innhold-luft));

  --pil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%236b5d47' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="lys"]) {
    --bg: #12100d;
    --hover-flate: rgba(242, 236, 225, .07);
    --hev: #1c1813;
    --kant: #2f2820;
    --kant-sterk: #756448;
    --tekst: #f2ece1;
    --svak: #b0a48f;
    --akse: #e0a458;
    --akse-tekst: #1c1813;

    --brikke: #2a2318;
    --brikke-kant: #453a28;
    --brikke-tekst: #f7eeda;

    --skygge: 0 -2px 14px rgba(0, 0, 0, .5);

    --pil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%23b0a48f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

:root[data-theme="mork"] {
  --bg: #12100d;
  --hover-flate: rgba(242, 236, 225, .07);
  --hev: #1c1813;
  --kant: #2f2820;
  --kant-sterk: #756448;
  --tekst: #f2ece1;
  --svak: #b0a48f;
  --akse: #e0a458;
  --akse-tekst: #1c1813;

  --brikke: #2a2318;
  --brikke-kant: #453a28;
  --brikke-tekst: #f7eeda;

  --skygge: 0 -2px 14px rgba(0, 0, 0, .5);

  --pil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%23b0a48f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--tekst);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;

  padding-bottom: calc(150px + var(--bunn));
  -webkit-text-size-adjust: 100%;
}

.skjul { display: none !important; }

.kun-skjermleser {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hopp-lenke {
  position: absolute;
  left: -9999px;
}
.hopp-lenke:focus {
  left: 8px;
  top: 8px;
  z-index: 50;
  background: var(--akse);
  color: var(--akse-tekst);
  padding: 8px 12px;
  border-radius: 8px;
}

.topp,
.resultat,
.innhold,
.bunntekst {
  max-width: var(--innhold-bredde);
  margin-inline: auto;
  padding-inline: var(--innhold-luft);
}

.betjening {
  padding-inline: var(--innhold-luft);
}

.betjening > * {
  max-width: var(--innhold-innmat);
  margin-inline: auto;
}

.topp {
  padding-block: 22px 6px;

  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  align-items: center;
}

.merke {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.merke:hover { text-decoration: none; }

.merke .logo {
  height: 34px;
  width: auto;
  display: block;
}

.logo-prikk { fill: var(--akse); }

.topp p {
  grid-column: 1;
  grid-row: 2;
  margin: 3px 0 0;
  font-size: 14.5px;
  color: var(--svak);
}

.tema-bryter {
  grid-column: 2;
  grid-row: 1 / 3;

  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--hev);
  border: 1px solid var(--kant-sterk);
  border-radius: 11px;
  color: var(--svak);
  cursor: pointer;
}

.tema-bryter:hover { color: var(--tekst); }

.tema-bryter:focus-visible {
  outline: 2px solid var(--akse);
  outline-offset: 2px;
}

.tema-bryter svg {
  width: 19px;
  height: 19px;
  display: block;
}

.tema-bryter .ikon-sol { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="lys"]) .tema-bryter .ikon-sol { display: block; }
  :root:not([data-theme="lys"]) .tema-bryter .ikon-mane { display: none; }
}
:root[data-theme="mork"] .tema-bryter .ikon-sol { display: block; }
:root[data-theme="mork"] .tema-bryter .ikon-mane { display: none; }
:root[data-theme="lys"] .tema-bryter .ikon-sol { display: none; }
:root[data-theme="lys"] .tema-bryter .ikon-mane { display: block; }

.resultat {
  padding-block: 0;
}

.status {
  min-height: 33px;
  font-size: 12.5px;
  color: var(--svak);
  padding: 6px 2px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.fra-gammel {
  max-width: var(--innhold-bredde);
  margin: 0 auto;
  padding: 0 var(--innhold-luft) 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--svak);
}

.treffliste {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  min-height: 44vh;
  background: var(--hev);
  border: 1px solid var(--kant);
  border-radius: var(--radius);
}

.treffliste:has(> .hint) {
  align-content: center;
  justify-content: center;
  text-align: center;
}

.treffliste li {
  position: relative;
  background: var(--brikke);
  border: 1px solid var(--brikke-kant);
  border-radius: 8px;
  padding: 10px 15px 11px 13px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--brikke-tekst);
  box-shadow: 0 2px 0 var(--brikke-kant);
}

.treffliste .poeng {
  position: absolute;
  right: 4px;
  bottom: 1px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--akse);
  font-variant-numeric: tabular-nums;
}

.treffliste .hint {
  border: none;
  background: none;
  box-shadow: none;
  color: var(--svak);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 8px 2px;
}

.innhold {
  padding-block: 26px 24px;

  font-size: 15px;
}

.innhold a {
  color: var(--akse);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.innhold a:hover,
.innhold a:focus-visible { text-decoration-thickness: 2px; }

.innhold .lengdelenker a,
.innhold .alle-ord > summary { text-decoration: none; }

.innhold h1 {
  font-size: 1.45em;
  line-height: 1.25;
  margin: 0 0 10px;
  font-weight: 750;
  letter-spacing: -.015em;
}

.innhold h2 {
  font-size: 1.2em;
  line-height: 1.35;
  margin: 28px 0 8px;
  font-weight: 700;
}

.innhold > :first-child { margin-top: 0; }

.innhold p,
.innhold li {
  font-size: 1em;
  line-height: 1.55;
}

.innhold p {
  margin: 0 0 14px;
}

.innhold ul,
.innhold ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.innhold li { margin-bottom: 6px; }

.bunntekst {

  padding-block: 18px;
  font-size: 13px;
  color: var(--svak);
  border-top: 1px solid var(--kant);
  text-align: center;
}

.bunntekst p { margin: 0 0 5px; }
.bunntekst p:last-child { margin-bottom: 0; }

.bunntekst a { color: var(--akse); }

.betjening {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--kant);
  box-shadow: var(--skygge);

  padding-block: 12px calc(12px + var(--bunn));
  z-index: 20;
}

.feltrad {
  display: flex;
  gap: 8px;
  background: var(--hev);
  border: 1px solid var(--kant-sterk);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: inset 0 2px 6px rgba(60, 44, 20, .09);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="lys"]) .feltrad {
    box-shadow: inset 0 2px 7px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="mork"] .feltrad {
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, .35);
}

#bokstaver {
  flex: 1;
  min-width: 0;

  font-size: 21px;
  font-weight: 650;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 12px 4px 12px 12px;
  border: none;
  background: transparent;
  color: var(--tekst);
}

#bokstaver::placeholder {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--svak);
  opacity: .75;
}

#bokstaver:focus { outline: none; }
.feltrad:focus-within {
  border-color: var(--akse);
  box-shadow: inset 0 2px 6px rgba(60, 44, 20, .09),
              0 0 0 3px color-mix(in srgb, var(--akse) 22%, transparent);
}

.knapp {

  min-height: 46px;
  min-width: 46px;
  padding: 0 14px;
  background: var(--brikke);
  color: var(--brikke-tekst);

  border: 1px solid var(--kant-sterk);
  border-radius: 9px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--brikke-kant);
}

.knapp:active {
  transform: translateY(2px);
  box-shadow: none;
}

.knapp:focus-visible {
  outline: 2px solid var(--akse);
  outline-offset: 2px;
}

.knapp-joker {
  font-size: 20px;
  font-weight: 700;
}

.filterbryter {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
  min-height: 40px;
  padding: 0 2px;
  background: none;
  border: none;
  color: var(--akse);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.filterbryter:focus-visible {
  outline: 2px solid var(--akse);
  outline-offset: 2px;
  border-radius: 6px;
}

.filterpil {
  width: 11px;
  height: 7px;
  flex: none;
  color: currentColor;
  transition: transform .18s ease;
}

.filterbryter[aria-expanded="true"] .filterpil { transform: rotate(180deg); }

.sortering {
  margin: 12px 0 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.sortering legend {
  padding: 0 0 6px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--svak);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.knapperad {
  display: flex;
  gap: 6px;
}

.knapperad input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.knapperad label {
  flex: 1;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  background-color: var(--hev);
  border: 1px solid var(--kant-sterk);
  border-radius: 9px;
  color: var(--tekst);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.knapperad input:checked + label {
  background-color: var(--akse);
  border-color: var(--akse);
  color: var(--akse-tekst);
}

.knapperad input:focus-visible + label {
  outline: 2px solid var(--akse);
  outline-offset: 2px;
}

.ordliste-flat {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ordliste-flat li {
  background: var(--brikke);
  border: 1px solid var(--brikke-kant);
  border-radius: 8px;
  padding: 8px 12px 9px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .05em;
  color: var(--brikke-tekst);
  box-shadow: 0 2px 0 var(--brikke-kant);
}

.mer-hint {
  font-size: 13.5px;
  color: var(--svak);
}

.lengdelenker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.lengdelenker .tegn-ord {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 560px) {
  .lengdelenker .tegn-ord {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
  }
}

.lengdelenker a,
.lengdelenker strong {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: .3em;
  min-height: 46px;
  border: 1px solid var(--kant-sterk);
  border-radius: 9px;
  font-weight: 650;
  text-decoration: none;
  color: var(--akse);
}

.lengdelenker a:hover,
.lengdelenker a:focus-visible {
  border-color: var(--kant-sterk);
  background: var(--hover-flate);
  text-decoration: none;
}

.lengdelenker strong {
  background: var(--brikke);
  border-color: var(--brikke-kant);
  color: var(--brikke-tekst);
}

.alle-ord {
  margin: 0 0 22px;
  border: 1px solid var(--kant);
  border-radius: var(--radius);
  background: var(--hev);
}

.alle-ord > summary {
  padding: 13px 15px;
  min-height: 46px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 650;
  color: var(--akse);
  border-radius: var(--radius);
}

.alle-ord > summary:hover { text-decoration: underline; }

.alle-ord[open] > summary {
  border-bottom: 1px solid var(--kant);
  border-radius: var(--radius) var(--radius) 0 0;
}

.ordliste-tekst {
  margin: 0;
  padding: 13px 15px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--svak);
  overflow-wrap: anywhere;
}

.filterfelt.filterfelt-bred {

  margin-top: 20px;
}

.filterhjelp {
  font-size: 12px;
  line-height: 1.45;
  color: var(--svak);
}

.filterfelt select:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.filterrutenett {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 560px) {
  .filterrutenett { grid-template-columns: repeat(4, 1fr); }
}

.filterfelt {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filterfelt label {
  font-size: 12.5px;
  color: var(--svak);
  font-weight: 600;
}

.filterfelt input,
.filterfelt select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
  padding: 0 10px;
  border: 1px solid var(--kant-sterk);
  border-radius: 9px;
  background-color: var(--hev);
  color: var(--tekst);
}

.filterfelt input::placeholder {
  color: var(--svak);
  opacity: .55;
}

.filterfelt input:focus-visible,
.filterfelt select:focus-visible {
  outline: 2px solid var(--akse);
  outline-offset: 1px;
}

select,
.filterfelt select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: var(--pil);
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px 7px;
  padding-right: 34px;
}

select::-ms-expand { display: none; }

.annonse {
  max-width: var(--innhold-bredde);
  margin: 16px auto;
  padding-inline: 0;
  border-radius: 10px;
  color: var(--svak);
  font-size: 12px;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.annonseflate {
  width: 320px;
  height: 100px;
}

#annonse-midt { margin-top: 44px; }
#annonse-bunn { margin-bottom: 44px; }

@media (min-width: 768px) {
  .annonse { min-height: 90px; }
  .annonseflate { width: 728px; height: 90px; }
}

.annonse:has(.adsbygoogle[data-ad-status="unfilled"]) {
  display: none;
}

@media (min-width: 720px) {
  body { padding-bottom: 0; font-size: 18px; }

  .betjening {
    position: sticky;
    top: 0;
    bottom: auto;
    box-shadow: none;
    border-top: none;
    border-bottom: 1px solid var(--kant);
    padding-bottom: 12px;
  }

  .treffliste { min-height: 50vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .knapp:active { transform: none; }
}
