:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
}

[data-theme="sport"] {
  --accent: #cb312a;
  --accent-soft: #fff4f4;
}

[data-theme="light"] {
  --accent: #2563eb;
  --accent-soft: #eff6ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/** Vertikal plass til footer i vinduet — ikke overstyr .container sin bredde (92vw / sentrering). */
main.container {
  flex: 1 1 auto;
}

.container {
  width: min(960px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.brand__name {
  font-weight: 700;
  font-size: 18px;
}

.hero {
  padding: 40px 0 8px;
}

.hero__title-row {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.8vw, 14px);
  flex-wrap: wrap;
}

.hero__logo {
  width: clamp(56px, 14vw, 88px);
  height: clamp(56px, 14vw, 88px);
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
}

.hero__title-row h1 {
  flex: 1 1 min(12rem, 100%);
  min-width: 0;
}

.hero__eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  text-align: left;
}

.hero__lead {
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 600;
}

.portal-intro {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.65;
}

.hero .portal-intro--hero {
  margin: 12px 0 0;
}

.portal-intro a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta {
  margin-top: 18px;
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, #000 30%);
}

.section {
  padding: 12px 0;
}

.hero + .section.plain-block {
  padding-top: 28px;
}

.block-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.icon-bw {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  color: var(--text);
  display: grid;
  place-items: center;
}

.icon-bw svg {
  width: 22px;
  height: 22px;
}

.block-header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.plain-block p {
  margin: 0 0 10px;
  line-height: 1.65;
}

.plain-block p:last-child {
  margin-bottom: 0;
}

.concern-resources {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.concern-resources__intro {
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 17px;
}

.help-resource-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
  align-items: stretch;
}

.help-resource-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 16px;
  background: var(--bg);
}

.help-resource-card__site {
  display: flex;
  align-items: center;
  min-height: 52px;
  margin-bottom: 12px;
  text-decoration: none;
}

.help-resource-card__logo {
  display: block;
  max-height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.help-resource-card__name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  flex-shrink: 0;
}

.help-resource-card__contact {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
}

.help-resource-card__meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.help-resource-card__meta--phone-heading {
  font-weight: 700;
  margin-bottom: 2px;
}

.help-resource-card__region {
  font-weight: 600;
}

.help-resource-card__meta a {
  color: var(--accent);
  font-weight: 600;
}

.help-resource-card__web {
  word-break: break-word;
}

details {
  border-top: 1px solid var(--line);
}

details:last-of-type {
  border-bottom: 1px solid var(--line);
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

summary::-webkit-details-marker {
  display: none;
}

.summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-main .icon-bw {
  width: 34px;
  height: 34px;
}

.summary-main .icon-bw svg {
  width: 20px;
  height: 20px;
}

summary::after {
  content: "+";
  font-size: 26px;
  color: var(--accent);
}

details[open] summary::after {
  content: "-";
}

.accordion-body {
  padding: 0 0 14px 46px;
}

/** Åpen accordion: begrens høyde til vinduet – langt innhold scroller inni panelet (mindre helside-scroll). */
details.accordion[open] > .accordion-body--viewport {
  max-height: min(65dvh, calc(100dvh - 14rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
}

details.accordion.faq[open] > .accordion-body.faq.accordion-body--viewport {
  max-height: min(58dvh, calc(100dvh - 15rem));
}

.faq details summary {
  font-size: 18px;
  padding: 10px 0;
}

.faq .accordion-body {
  padding-left: 0;
}

.contact-block--accordion {
  padding-bottom: 4px;
}

.contact-block--accordion p {
  margin: 0 0 10px;
  line-height: 1.65;
}

.contact-block--accordion p:last-child {
  margin-bottom: 0;
}

.contact-block--accordion a {
  word-break: break-word;
}

.site-footer {
  flex-shrink: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  padding: 16px 0 28px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer #footerSlogan {
  font-size: clamp(13px, 2.5vw, 15px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--text);
}

a {
  color: var(--accent);
}

@media (max-width: 640px) {
  .accordion-body {
    padding-left: 0;
  }
}
