/* ==========================================================================
   Kystveien Legesenter – designsystem
   Inspirert av NAVs designsystem Aksel og Helsenorge: rolig, lesbart og
   oppgaveorientert. Én skrift (Source Sans 3), få farger, ingen skygger
   eller dekor som konkurrerer med innholdet.
   Alle tekstfarger oppfyller WCAG 2.2 AA – brødtekst har kontrast 15:1.
   ========================================================================== */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations"),
    url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farger */
  --text: #1d2731; /* 15.1:1 mot hvit */
  --text-subtle: #4b5663; /* 7.5:1 */
  --link: #0b5cab; /* 6.7:1 */
  --link-hover: #073f78;
  --primary: #0b5cab;
  --primary-hover: #073f78;
  --primary-active: #052d55;
  --primary-tint: #eef4fb;
  --primary-tint-strong: #dbe8f6;
  --primary-border: #a9c6e8;
  --green: #2e8540;
  --green-text: #2f6b1e;
  --green-tint: #edf5e6;
  --red: #b42318;
  --red-tint: #fdf0ef;
  --red-border: #f1c7c3;
  --amber: #b26b00;
  --surface: #ffffff;
  --surface-subtle: #f3f5f7;
  --border: #cfd6dd;
  --border-strong: #8a96a3;
  --focus: #00347d;
  --footer-bg: #0b2c4f;
  --footer-text: #c9d6e3;

  /* Typografi – skala etter Aksel: 40/32/24/20/18 (mobil litt mindre) */
  --font: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
  --fs-small: 1rem;
  --fs-body: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem); /* 18–20 px */
  --fs-lead: clamp(1.25rem, 1.18rem + 0.35vw, 1.4375rem); /* 20–23 px */
  --fs-h1: clamp(2rem, 1.6rem + 1.8vw, 2.75rem); /* 32–44 px */
  --fs-h2: clamp(1.625rem, 1.45rem + 0.8vw, 2rem); /* 26–32 px */
  --fs-h3: clamp(1.3125rem, 1.24rem + 0.35vw, 1.5rem); /* 21–24 px */
  --fs-h4: clamp(1.1875rem, 1.15rem + 0.2vw, 1.25rem); /* 19–20 px */

  /* Avstand (8 px-rutenett) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --section: clamp(2.5rem, 1.75rem + 3vw, 4rem);

  --radius: 0.5rem;
  --container: 70rem;
  --measure: 40rem; /* ca. 65–70 tegn per linje */
  --gutter: clamp(1rem, 0.4rem + 2.5vw, 2rem);
  --header-h: 4.5rem;
}

/* ---------- Grunnmur ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--surface);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
h4 {
  margin: 0 0 var(--s-3);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  text-wrap: balance;
}
h1,
.h1 {
  font-size: var(--fs-h1);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h2,
.h2 {
  font-size: var(--fs-h2);
}
h3,
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}
h4,
.h4 {
  font-size: var(--fs-h4);
  line-height: 1.35;
}
p,
ul,
ol,
dl,
table,
figure,
address {
  margin: 0 0 var(--s-4);
}
p {
  text-wrap: pretty;
}
address {
  font-style: normal;
}
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
strong {
  font-weight: 600;
}
time,
.tnum {
  font-variant-numeric: tabular-nums;
}

/* ---------- Hjelpeklasser ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.nowrap {
  white-space: nowrap;
}
.no-margin {
  margin: 0;
}
.small {
  font-size: var(--fs-small);
}
.subtle {
  color: var(--text-subtle);
}
.sprite {
  display: none;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  font-weight: 600;
  color: #fff;
  background: var(--focus);
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---------- Oppsett ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.measure {
  max-width: var(--measure);
}
.section {
  padding-block: var(--section);
}
.section--subtle {
  background: var(--surface-subtle);
}
.split {
  display: grid;
  gap: var(--s-7);
}
@media (min-width: 56rem) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-8);
  }
  .split--media {
    align-items: center;
  }
}
.lead {
  max-width: var(--measure);
  margin-bottom: var(--s-5);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

/* Brødtekst på innholdssider */
.prose {
  max-width: var(--measure);
}
.prose > * + h2 {
  margin-top: var(--s-7);
}
.prose > * + h3 {
  margin-top: var(--s-6);
}
.prose > :last-child {
  margin-bottom: 0;
}
.prose > * + .alert--urgent {
  margin-top: var(--s-7);
}
.prose .figure {
  max-width: 28rem;
}
.space-section {
  margin-top: var(--section);
}
.prose ul,
.prose ol {
  padding-left: 1.4rem;
}
.prose li {
  margin-bottom: var(--s-2);
}
.prose li::marker {
  color: var(--text-subtle);
}
.prose .link-list {
  padding-left: 0;
}
.prose .link-list li {
  margin: 0;
}

/* ---------- Ikoner ---------- */
.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Knapper ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 3rem;
  padding: 0.625rem 1.25rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  text-decoration: none;
  background: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  color: #fff;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn:active {
  background: var(--primary-active);
  border-color: var(--primary-active);
}
.btn--secondary {
  color: var(--primary);
  background: var(--surface);
}
.btn--secondary:hover {
  color: var(--primary-hover);
  background: var(--primary-tint);
}
.btn--secondary:active {
  color: var(--primary-active);
  background: var(--primary-tint-strong);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
@media (max-width: 30rem) {
  .btn-row > .btn {
    flex: 1 1 100%;
  }
}

/* ---------- Akuttlinje øverst ---------- */
.topbar {
  font-size: var(--fs-small);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem var(--s-5);
  padding-block: 0.4rem;
}
.topbar a {
  font-weight: 600;
  color: var(--text);
}
.topbar .topbar__alarm {
  color: var(--red);
}
.topbar__short {
  display: none;
}
@media (max-width: 30rem) {
  .topbar__long {
    display: none;
  }
  .topbar__short {
    display: inline;
  }
}

/* ---------- Toppfelt ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  flex: none;
  padding-block: var(--s-2);
}
.brand img {
  width: auto;
  height: 3.25rem;
}
.nav {
  margin-left: auto;
}
.nav__list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  display: flex;
  align-items: center;
  min-height: var(--header-h);
  padding: 0 var(--s-3);
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  border-block: 4px solid transparent;
}
.nav__link:hover {
  color: var(--link);
  text-decoration: underline;
}
.nav__link[aria-current="page"] {
  color: var(--link);
  border-bottom-color: var(--primary);
}
.nav__extra,
.nav-toggle {
  display: none;
}
.header-cta {
  flex: none;
}

/* Mobil og nettbrett: «Meny»-knapp. Uten JavaScript vises menyen som en liste. */
@media (max-width: 67.99rem) {
  :root {
    --header-h: 4rem;
  }
  .brand img {
    height: 2.75rem;
  }
  .site-header__inner {
    flex-wrap: wrap;
    gap: var(--s-3);
  }
  .header-cta {
    display: none;
  }
  .nav {
    flex-basis: 100%;
    margin: 0;
  }
  .nav__list {
    flex-direction: column;
  }
  .nav__link {
    justify-content: space-between;
    min-height: 3.5rem;
    padding: 0 var(--s-2);
    font-size: var(--fs-h4);
    border: 0;
    border-top: 1px solid var(--border);
  }
  .nav__link::after {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    margin-right: 0.3rem;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
  }
  .nav__link[aria-current="page"] {
    padding-left: var(--s-4);
    background: var(--primary-tint);
    box-shadow: inset 4px 0 0 var(--primary);
  }
  .nav__extra {
    display: grid;
    gap: var(--s-3);
    padding: var(--s-4) 0 var(--s-5);
    border-top: 1px solid var(--border);
  }
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 2.75rem;
    margin-left: auto;
    padding: 0 var(--s-4);
    font: inherit;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
  }
  .js .nav-toggle:hover {
    background: var(--surface-subtle);
  }
  .js .nav-toggle[aria-expanded="true"] {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
  }
  .nav-toggle__bars {
    position: relative;
    width: 1.1rem;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }
  .nav-toggle__bars::before {
    transform: translateY(-6px);
  }
  .nav-toggle__bars::after {
    transform: translateY(6px);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars {
    background: transparent;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
    transform: rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
    transform: rotate(-45deg);
  }
  .js .nav {
    display: none;
  }
  .js .nav.is-open {
    display: block;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ---------- Forside: topp ---------- */
.hero {
  padding-block: clamp(1.75rem, 1rem + 3vw, 3.5rem) var(--section);
}
.hero__grid {
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--s-8);
    align-items: start;
  }
}
.hero h1 {
  margin-bottom: var(--s-3);
}
.hero__more {
  margin: var(--s-4) 0 0;
}

/* Status «åpent nå» */
.status-wrap {
  margin-bottom: var(--s-5);
}
.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-weight: 600;
}
.status__dot {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--text-subtle);
  border-radius: 50%;
}
[data-state="open"] .status__dot {
  background: var(--green);
}
[data-state="closed"] .status__dot {
  background: var(--red);
}
[data-state="phone-closed"] .status__dot {
  background: var(--amber);
}
.status-hint {
  margin: var(--s-1) 0 0 1.35rem;
  font-size: var(--fs-small);
}

/* ---------- Lenkepaneler (oppgaver) ---------- */
.link-panels {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) {
  .link-panels--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.link-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 4.75rem;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.link-panel:hover {
  background: var(--primary-tint);
  border-color: var(--primary);
}
.link-panel:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.link-panel__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--primary);
  background: var(--primary-tint);
  border-radius: 50%;
}
.link-panel:hover .link-panel__icon {
  background: var(--surface);
}
.link-panel__body {
  flex: 1;
  min-width: 0;
}
.link-panel__title {
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.3;
  color: var(--link);
  text-decoration: none;
}
.link-panel__title::after {
  /* Hele panelet er klikkbart */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.link-panel__title:focus-visible {
  outline: none;
}
.link-panel:hover .link-panel__title {
  color: var(--link-hover);
  text-decoration: underline;
}
.link-panel__desc {
  display: block;
  margin-top: 0.125rem;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--text-subtle);
}
.link-panel__chevron {
  color: var(--primary);
}

/* ---------- Lenkeliste (rader med skillelinjer) ---------- */
.link-list {
  margin: 0 0 var(--s-5);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.link-list li {
  border-bottom: 1px solid var(--border);
}
.link-list a {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 3.5rem;
  padding: var(--s-3) var(--s-2);
  font-weight: 600;
  text-decoration: none;
}
.link-list a:hover {
  background: var(--primary-tint);
}
.link-list a:hover .link-list__title {
  text-decoration: underline;
}
.link-list__text {
  flex: 1;
  min-width: 0;
}
.link-list__title {
  display: block;
}
.link-list__desc {
  display: block;
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--text-subtle);
}
.link-list .icon {
  color: var(--primary);
}

/* ---------- Paneler og varsler ---------- */
.panel {
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  background: var(--surface-subtle);
  border-radius: var(--radius);
}
.panel > :last-child {
  margin-bottom: 0;
}
.panel--info {
  background: var(--primary-tint);
}
.panel--bordered {
  background: var(--surface);
  border: 1px solid var(--border);
}
.panel h2,
.panel h3 {
  margin-bottom: var(--s-3);
}

.alert {
  display: flex;
  gap: var(--s-3);
  max-width: var(--measure);
  margin-bottom: var(--s-5);
  padding: var(--s-4);
  border: 1px solid;
  border-radius: var(--radius);
}
.alert__icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1em;
}
.alert h2,
.alert h3 {
  margin-bottom: var(--s-1);
  font-size: var(--fs-h4);
}
.alert > div > :last-child,
.alert > p {
  margin-bottom: 0;
}
.alert--info {
  background: var(--primary-tint);
  border-color: var(--primary-border);
}
.alert--info .alert__icon {
  color: var(--primary);
}
.alert--urgent {
  background: var(--red-tint);
  border-color: var(--red-border);
}
.alert--urgent .alert__icon {
  color: var(--red);
}
.alert--success {
  background: var(--green-tint);
  border-color: #bcd9a8;
}
.alert--success .alert__icon {
  color: var(--green-text);
}

/* ---------- Åpningstider ---------- */
.hours {
  width: 100%;
  margin-bottom: var(--s-3);
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.hours th,
.hours td {
  padding: var(--s-2) 0;
  text-align: left;
  font-weight: 400;
  border-bottom: 1px solid var(--border);
}
.hours td {
  padding-left: var(--s-4);
  text-align: right;
  white-space: nowrap;
}
.hours tr.is-today > * {
  font-weight: 600;
}
.today-tag {
  display: inline-block;
  margin-left: var(--s-2);
  padding: 0 var(--s-2);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--primary-hover);
  background: var(--primary-tint-strong);
  border-radius: 0.25rem;
}
.phone {
  font-size: var(--fs-h3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.phone:hover {
  text-decoration: underline;
}

/* ---------- Aktuelt ---------- */
.teaser {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.teaser:hover {
  border-color: var(--primary);
}
.teaser:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.teaser__body {
  flex: 1;
  min-width: 0;
}
.teaser__meta {
  margin-bottom: var(--s-1);
  font-size: var(--fs-small);
  color: var(--text-subtle);
}
.teaser h3 {
  margin-bottom: var(--s-2);
  font-size: var(--fs-h3);
}
.teaser__link {
  color: var(--link);
  text-decoration: none;
}
.teaser__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.teaser__link:focus-visible {
  outline: none;
}
.teaser:hover .teaser__link {
  color: var(--link-hover);
  text-decoration: underline;
}
.teaser p:last-child {
  margin-bottom: 0;
}
.teaser .icon {
  color: var(--primary);
}

/* ---------- Haster det? ---------- */
.urgent-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.urgent-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--s-4);
  align-items: center;
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--border);
}
.urgent-list__label {
  font-weight: 600;
}
.urgent-list__desc {
  grid-column: 1;
  font-size: var(--fs-small);
  color: var(--text-subtle);
}
.urgent-list__number {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: var(--fs-h3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
}
.urgent-list__number:hover {
  text-decoration: underline;
}
.urgent-list__number--alarm {
  color: var(--red);
}
.urgent-list__number--alarm:hover {
  color: #8a1a12;
}

/* ---------- Sidetopp på undersider ---------- */
.page-header {
  padding-block: clamp(1.25rem, 0.75rem + 2vw, 2.25rem) var(--s-6);
}
.page-header h1 {
  margin-bottom: var(--s-3);
}
.page-header .lead {
  margin-bottom: 0;
}
.page-header .status-wrap {
  margin: var(--s-5) 0 0;
}
.page-body {
  padding-bottom: var(--section);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-2);
  margin: 0 0 var(--s-4);
  padding: 0;
  font-size: var(--fs-small);
  list-style: none;
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: var(--s-2);
  color: var(--border-strong);
}
.breadcrumb [aria-current] {
  color: var(--text-subtle);
}

/* «Innhold på siden» */
.toc {
  max-width: var(--measure);
  margin-bottom: var(--s-7);
  padding: var(--s-4) var(--s-5);
  background: var(--surface-subtle);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.toc h2 {
  margin-bottom: var(--s-2);
  font-size: var(--fs-h4);
}
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc li {
  margin-block: var(--s-1);
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  gap: var(--s-4);
  margin-bottom: var(--s-7);
}
@media (min-width: 48rem) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.figure {
  margin: 0;
}
.figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}
.figure figcaption {
  margin-top: var(--s-2);
  font-size: var(--fs-small);
  color: var(--text-subtle);
}

/* ---------- Ansatte ---------- */
.people {
  display: grid;
  gap: var(--s-4);
  margin: 0 0 var(--s-6);
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) {
  .people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 64rem) {
  .people {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.person {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.person h3 {
  margin: 0;
  font-size: var(--fs-h4);
}
.person__role {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--text-subtle);
}
.presence {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--s-2);
  margin: 0;
  padding: 0 var(--s-2);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.25rem;
}
.presence[hidden] {
  display: none;
}
.presence::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: currentColor;
  border-radius: 50%;
}
.presence--in {
  color: var(--green-text);
  background: var(--green-tint);
}
.presence--out {
  color: var(--text-subtle);
  background: var(--surface-subtle);
}
.days {
  margin-top: auto;
  padding-top: var(--s-2);
}
.days__label {
  display: block;
  margin-bottom: var(--s-2);
  font-size: var(--fs-small);
  color: var(--text-subtle);
}
.days__list {
  display: flex;
  gap: var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.days__list li {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-hover);
  background: var(--primary-tint-strong);
  border-radius: 0.25rem;
}
.days__list li.off {
  color: #66727d;
  background: transparent;
  border: 1px dashed var(--border-strong);
  text-decoration: line-through;
}
.days__list li.is-today {
  box-shadow: inset 0 0 0 2px var(--primary);
}
.name-list {
  columns: 2 15rem;
  column-gap: var(--s-6);
}

/* ---------- Bunntekst ---------- */
.site-footer {
  padding-block: var(--s-7) var(--s-5);
  font-size: var(--fs-small);
  color: var(--footer-text);
  background: var(--footer-bg);
}
.site-footer h2 {
  margin-bottom: var(--s-3);
  font-size: var(--fs-body);
  color: #fff;
}
.site-footer a {
  color: #fff;
}
.site-footer a:hover {
  color: var(--primary-tint-strong);
}
.site-footer :focus-visible {
  outline-color: #fff;
}
.footer-grid {
  display: grid;
  gap: var(--s-5);
}
@media (min-width: 40rem) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 64rem) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }
}
.footer-brand {
  display: inline-block;
  margin-bottom: var(--s-4);
}
.footer-brand img {
  width: auto;
  height: 3.25rem;
}
.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-list li {
  margin-bottom: var(--s-2);
}
.footer-hours {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.footer-hours dd {
  margin: 0 0 var(--s-2);
  color: #fff;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid rgb(255 255 255 / 0.2);
}

/* ---------- Fast knappelinje på mobil ---------- */
.action-bar {
  display: none;
}
@media (max-width: 67.99rem) {
  body {
    padding-bottom: calc(4.4rem + env(safe-area-inset-bottom));
  }
  .action-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-2);
    padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border-strong);
    transition:
      transform 0.2s ease,
      visibility 0s linear 0s;
  }
  /* Skjules mens hurtigvalgene øverst er synlige, og mens menyen er åpen */
  .js .action-bar[data-hidden="true"] {
    transform: translateY(110%);
    visibility: hidden;
    transition:
      transform 0.2s ease,
      visibility 0s linear 0.2s;
  }
  .action-bar .btn {
    padding-inline: var(--s-2);
    white-space: nowrap;
  }
}

/* ---------- Minste skjermer (320–360 px) ---------- */
@media (max-width: 23rem) {
  .brand img {
    height: 2.4rem;
  }
  .js .nav-toggle {
    padding-inline: var(--s-3);
  }
  .action-bar .btn {
    font-size: var(--fs-small);
  }
  .link-panel {
    gap: var(--s-3);
    padding: var(--s-3);
  }
}

/* ---------- 404 ---------- */
.not-found {
  padding-block: var(--section);
}

/* ---------- Bevegelse og utskrift ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
@media print {
  .topbar,
  .site-header,
  .action-bar,
  .site-footer nav,
  .skip-link {
    display: none !important;
  }
  body {
    padding: 0;
    font-size: 11pt;
  }
  .section {
    padding-block: 1rem;
  }
}
