/* Fyndra – innholdssider, felles meny og footer. Bygger på tokens og grunnstiler i styles.css. */

/* ---------- Meny ---------- */

.site-header .bar { flex-wrap: wrap; row-gap: 12px; }
.site-nav { flex: 1; display: flex; justify-content: center; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-family: var(--display); font-weight: 600; font-size: 0.9375rem;
  color: var(--ink); text-decoration: none; border-radius: 999px;
}
.site-nav a:hover { background: var(--paper); }
.site-nav a[aria-current="page"] { background: var(--tag); }
.chip-link { text-decoration: none; color: var(--ink); }
.chip-link:hover { background: var(--tag); }

@media (max-width: 900px) {
  .site-nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  .site-nav ul { flex-wrap: nowrap; }
  .site-nav a { padding: 0 12px; white-space: nowrap; }
}

/* ---------- Footer ---------- */

.site-footer-full { padding-block: 48px 40px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-note { margin: 12px 0 0; color: var(--mute); font-size: 0.9375rem; max-width: 30ch; }
.foot-h { margin: 0 0 10px; font-family: var(--display); font-weight: 700; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid a { color: var(--mute); text-decoration: none; font-size: 0.9375rem; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-copy { margin: 32px 0 0; color: var(--mute); font-size: 0.875rem; }

/* ---------- Innholdsside ---------- */

.page { padding-block: 8px 72px; }
.wrap.narrow { width: min(100% - 2 * var(--gutter), 780px); }

.page .crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 24px; padding: 0; font-size: 0.875rem; color: var(--mute); }
.crumbs li + li::before { content: "/"; margin-right: 6px; }
.crumbs a { color: var(--mute); }

.page h1 { font-size: clamp(2rem, 1.4rem + 2.8vw, 3.5rem); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.updated { margin: 12px 0 0; color: var(--mute); font-size: 0.875rem; }
.answer {
  margin: 20px 0 8px; padding: 18px 20px; font-size: var(--fs-lead); line-height: 1.55;
  background: var(--paper); border-left: 6px solid var(--tag); border-radius: 0 10px 10px 0;
}

.page section { margin-top: 40px; }
.page h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 12px; }
.page p, .page li { max-width: 68ch; }
.page a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.page a:hover { text-decoration-color: var(--tag-deep); }
.page ul, .page ol { padding-left: 1.3em; }
.page li { margin: 6px 0; }
.prose h2 { margin-top: 32px; }
.prose code, .page code { font-size: 0.875em; padding: 1px 6px; background: var(--paper); border-radius: 4px; }

.page table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; background: var(--paper); border-radius: 10px; overflow: hidden; }
.page caption { caption-side: bottom; padding: 8px 0; text-align: left; color: var(--mute); font-size: 0.8125rem; }
.page th, .page td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.page thead th { font-family: var(--display); font-size: 0.875rem; background: var(--frost); }
.page tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .page table { display: block; overflow-x: auto; }
}

.sources { margin-top: 20px; color: var(--mute); font-size: 0.8125rem; }
.sources a { color: var(--mute); }

.howto { counter-reset: step; list-style: none; padding: 0; }
.howto li { position: relative; padding: 4px 0 12px 48px; counter-increment: step; }
.howto li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font-family: var(--display); font-weight: 700; background: var(--tag); box-shadow: 0 0 0 2px var(--ink);
}

.feature-list { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.feature-list a { display: grid; gap: 4px; padding: 16px 18px; background: var(--paper); border-radius: 10px; text-decoration: none; border: 1.5px solid transparent; }
.feature-list a:hover { border-color: var(--ink); }
.feature-list strong { font-family: var(--display); font-size: 1.125rem; }
.feature-list span { color: var(--mute); }

/* FAQ-widget: like over avsluttende handling */
.faq { margin-top: 48px; }
.faq-item { border-top: 1.5px solid var(--ink); }
.faq-item:last-child { border-bottom: 1.5px solid var(--ink); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 16px 40px 16px 0; position: relative;
  font-family: var(--display); font-weight: 700; font-size: 1.125rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 12px; font-size: 1.5rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-body { padding: 0 0 16px; }
.faq-body p { margin: 0 0 8px; }

.cta-box { margin-top: 40px; padding: 28px; background: var(--tag); border-radius: 14px; }
.cta-box h2 { margin-bottom: 6px; }
.cta-box p { margin: 0 0 16px; }
.cta-box .btn { display: inline-block; text-decoration: none; }

.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.related a { display: grid; gap: 6px; height: 100%; padding: 16px; background: var(--paper); border-radius: 10px; text-decoration: none; border: 1.5px solid transparent; }
.related a:hover { border-color: var(--ink); }
.related strong { font-family: var(--display); }
.related span { color: var(--mute); font-size: 0.875rem; }
.related-q ul { padding-left: 1.2em; }

/* Kalkulatoren på /priser bruker forsidens stiler fra styles.css */
.content-site .calc { margin-top: 48px; }

/* Forsiden: lenker videre til undersidene */
.more-link { margin: 20px 0 0; font-weight: 600; }
.more-link a { color: var(--ink); text-underline-offset: 3px; }
