:root {
  --eik: #7a4a22;
  --ink: #1f242a;
  --max: 100rem;
  --red: #88423d;
  --rim: #e1d5c3;
  --sky: #008fcb;
  --blue: #355d8b;
  --font: var(--font-text);
  --grey: #747b86;
  --line: #dfe3e2;
  --mist: #f1f3f2;
  --mose: #4f6b4a;
  --navy: #003c71;
  --peru: #cb9965;
  --rust: #b2452a;
  --sand: #efe6d8;
  --teal: #466f67;
  --wood: var(--teal);
  --kritt: #faf6ef;
  --misty: #dfc8c3;
  --night: var(--slate);
  --paper: var(--white);
  --slate: #393f46;
  --white: #ffffff;
  --accent: var(--teal);
  --danger: var(--rust);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --radius: 0;
  --shadow: none;
  --skifer: var(--slate);
  --measure: 42rem;
  --slate-2: #4c535c;
  --eik-dark: #4a2c12;
  --grey-mid: #95a6a2;
  --positive: var(--teal);
  --red-dark: #743732;
  --eik-light: #d9b78f;
  --font-text: "Klarheit", "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gainsboro: #dfe3e2;
  --ink-muted: #4c535c;
  --radius-lg: 0;
  --radius-sm: 0;
  --radius-xl: 0;
  --teal-dark: #3a5c55;
  --wood-dark: var(--teal-dark);
  --grey-light: #c8ccd3;
  --wood-light: var(--gainsboro);
  --accent-dark: var(--teal-dark);
  --radius-pill: 0;
  --skifer-dark: var(--ink);
  --font-display: "Reckless Neue", "Fraunces", Georgia, "Times New Roman", serif;
}

/* Trapperingen – grunnstiler, tett på uttrykket til trapperingen.no:
   flate fargefelt i fullbredde (teal #466f67, skifer #393f46, rustrød #88423d), hvitt ellers,
   ingen avrunding, ingen skygger. Serif i overskrifter, sans i tekst, tynne understrekte lenker.
   Fonter: selvhostet Fraunces og Inter fra /theme/fonts (ingen eksterne fonttjenester). */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/theme/fonts/fraunces.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 700; font-display: swap; src: url("/theme/fonts/fraunces-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/theme/fonts/inter.woff2") format("woff2"); }

/* Grunnlag */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 6.5rem; }
body { margin: 0; font-family: var(--font-text); font-size: 1rem; color: var(--ink); background: #fff; line-height: 1.6; letter-spacing: 0.01em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.35em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: text-decoration-color 0.25s ease, color 0.25s ease; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--gainsboro); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 350; font-optical-sizing: auto; letter-spacing: 0; color: var(--ink); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.15; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.3; margin-bottom: 1.75rem; }
h3 { font-family: var(--font-text); font-size: 1.375rem; font-weight: 400; line-height: 1.3; margin-bottom: 0.5rem; }
h4 { font-family: var(--font-text); font-size: 1rem; font-weight: 500; color: var(--ink-muted); margin-bottom: 0.5rem; }
h1 a, h2 a, h3 a { text-decoration: none; }
p, ul, ol { margin: 0 0 1rem; }
strong { font-weight: 500; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--ink-muted); max-width: 38rem; }
.eyebrow { font-family: var(--font-text); font-size: 1rem; color: var(--ink-muted); margin: 0 0 1.25rem; }
.small { font-size: 0.875rem; color: var(--grey); }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; background: #fff; padding: 0.5rem 1rem; z-index: 30; }

main { max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter); }
main > section { margin-block: clamp(4rem, 8vw, 6.25rem); }
main > section:first-child { margin-top: 0; }
main > section:last-child { margin-bottom: clamp(4rem, 8vw, 6.25rem); }
/* Fargefelt i fullbredde ligger kant i kant, slik som på trapperingen.no */
main > section[data-component="cta"], main > section[data-component="form"], main > section.with-image { margin-block: 0; }
main > section[data-component="cta"]:last-child, main > section[data-component="form"]:last-child { margin-bottom: 0; }

/* Knapper: rektangulære. Fargen fylles inn fra venstre ved hover, pilen glir ut og inn igjen. */
.button {
  display: inline-flex; align-items: center; gap: 0.75rem; color: #fff; text-decoration: none; font-weight: 400; font-size: 1rem; white-space: nowrap;
  padding: 0.8rem 1.2rem; border: 1px solid var(--teal); border-radius: 0; cursor: pointer; line-height: 1.25; font-family: inherit;
  background-color: var(--teal); background-image: linear-gradient(var(--slate), var(--slate)); background-repeat: no-repeat; background-size: 0% 100%;
  transition: background-size 0.5s cubic-bezier(.6,.05,.2,1), color 0.3s ease, border-color 0.3s ease;
}
.button::after { content: "→"; display: inline-block; width: 1em; overflow: hidden; text-indent: 0; text-shadow: -1.6em 0 0 currentColor; transition: text-indent 0.5s cubic-bezier(.6,.05,.2,1); }
.button:hover { background-size: 100% 100%; border-color: var(--slate); color: #fff; }
.button:hover::after { text-indent: 1.6em; }
.button.secondary { background-color: transparent; background-image: linear-gradient(var(--ink), var(--ink)); color: var(--ink); border-color: var(--ink); }
.button.secondary:hover { color: #fff; border-color: var(--ink); }
.button.light { background-color: #fff; background-image: linear-gradient(var(--ink), var(--ink)); color: var(--teal); border-color: #fff; }
.button.light:hover { color: #fff; border-color: var(--ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5.25rem; flex-wrap: wrap; padding-block: 0.6rem; }
.site-header .brand { display: inline-flex; align-items: center; text-decoration: none; }
.site-header .brand svg { height: clamp(2.6rem, 3.6vw, 3.25rem); width: auto; flex: none; display: block; }
.site-header nav { display: flex; gap: clamp(1rem, 2.6vw, 2.25rem); align-items: center; flex-wrap: wrap; }
.site-header nav a:not(.button) { text-decoration: none; color: var(--ink); font-size: 1rem; background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat; padding-bottom: 4px; transition: background-size 0.4s cubic-bezier(.6,.05,.2,1); }
.site-header nav a:not(.button):hover { background-position: 0 100%; background-size: 100% 1px; }
.site-header nav .button { padding: 0.6rem 1rem; }
@media (max-width: 52rem) {
  .site-header .brand svg { height: 2.6rem; }
  .site-header .wrap { gap: 0.25rem 1rem; padding-block: 0.75rem 0; min-height: 0; }
  .site-header nav { order: 2; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding: 0.6rem var(--gutter) 0.8rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 1.4rem;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a { white-space: nowrap; flex: none; }
  .site-header nav .button { order: -1; }
}

/* Footer: skifer, ingress i stor sans, lenker i lys grå */
.site-footer { background: var(--slate); color: #fff; padding-top: clamp(3rem, 5vw, 4rem); }
.site-footer .grid { display: grid; gap: 2.5rem; grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 48rem) { .site-footer .grid { grid-template-columns: 1fr; } }
.site-footer .brand { display: none; }
.site-footer .grid > div:first-child p { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.3; color: #fff; max-width: 30rem; }
.site-footer strong { display: block; font-weight: 400; font-size: 0.875rem; color: var(--grey-mid); margin-bottom: 1rem; }
.site-footer p { color: var(--grey-light); max-width: 32rem; }
.site-footer a { color: var(--grey-light); text-decoration: none; background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat; padding-bottom: 3px; transition: color 0.2s ease, background-size 0.4s cubic-bezier(.6,.05,.2,1); }
.site-footer a:hover { color: #fff; background-position: 0 100%; background-size: 100% 1px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; } .site-footer li { margin-bottom: 0.5rem; }
.site-footer .small { max-width: var(--max); color: var(--grey-mid); margin: 3.5rem auto 0; padding-block: 1.5rem; }

/* Tabeller og skillelinjer i løpende tekst */
table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; font-size: 1rem; }
th { font-weight: 500; font-size: 0.875rem; color: var(--grey); }
th, td { text-align: left; padding: 0.85rem 0.75rem; border-bottom: 1px solid var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

/* Bevegelse */
@keyframes tr-rise { from { opacity: 0; transform: translateY(2rem); } to { opacity: 1; transform: none; } }
@keyframes tr-zoom { from { transform: scale(1.05); } to { transform: none; } }
@keyframes tr-fade { from { opacity: 0; transform: translateY(0.75rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    main > section:not(:first-child) > * { animation: tr-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
  }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* Postnummer → sted (theme js): stedsnavnet under feltet. Fargen settes av skjemakomponenten. */
.postcode-place { display: block; margin-top: 0.25rem; font-size: 0.9rem; color: var(--ink-muted); }

/* component: before-after */
/* Før/etter: uten skript to bilder side om side; med skript oppå hverandre med et dra-håndtak. Flatt, ingen skygger eller runde hjørner. */
[data-component="before-after"] > h2 { max-width: 22ch; }
[data-component="before-after"] > .lead { margin-bottom: 2.5rem; }
[data-component="before-after"] .compare { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 0.75rem; --pos: 50%; }
[data-component="before-after"] figure { position: relative; margin: 0; overflow: hidden; background: var(--slate); aspect-ratio: 4 / 3; }
[data-component="before-after"] img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
[data-component="before-after"] figcaption { position: absolute; top: clamp(0.75rem, 2vw, 1.25rem); left: clamp(0.75rem, 2vw, 1.25rem); padding: 0.4rem 0.7rem; background: #fff; color: var(--ink); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.2; pointer-events: none; transition: opacity 0.25s ease; }

/* Med skript: bildene stables, etter-bildet klippes fra skillelinjen og mot høyre */
[data-component="before-after"] .compare.is-ready { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); gap: 0; aspect-ratio: 16 / 9; max-height: calc(100svh - 7.25rem); min-height: 18rem; overflow: hidden; background: var(--slate); }
[data-component="before-after"] .is-ready > figure { grid-area: 1 / 1; aspect-ratio: auto; height: 100%; }
[data-component="before-after"] .is-ready > .after { clip-path: inset(0 0 0 var(--pos)); }
[data-component="before-after"] .is-ready > .after figcaption { left: auto; right: clamp(0.75rem, 2vw, 1.25rem); background: var(--teal); color: #fff; }
[data-component="before-after"] .compare.is-low .before figcaption { opacity: 0; }
[data-component="before-after"] .compare.is-high .after figcaption { opacity: 0; }
[data-component="before-after"] .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
[data-component="before-after"] .handle::after { content: "\2190\00a0\2192"; position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; transform: translate(-50%, -50%); background: #fff; color: var(--teal); font-size: 1.05rem; letter-spacing: -0.05em;
  transition: background-color 0.25s ease, color 0.25s ease, width 0.35s cubic-bezier(.2,.7,.3,1); }
[data-component="before-after"] .compare.is-ready:hover .handle::after, [data-component="before-after"] .compare.is-dragging .handle::after { background: var(--teal); color: #fff; width: 4.25rem; }
[data-component="before-after"] .compare:has(input:focus-visible) .handle::after { outline: 2px solid var(--teal); outline-offset: 3px; }
/* Selve glidebryteren dekker hele bildet: dra hvor som helst, eller bruk piltastene */
[data-component="before-after"] .compare input[type="range"] { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent; touch-action: pan-y; }
[data-component="before-after"] .compare input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 3.5rem; height: 100vh; }
[data-component="before-after"] .compare input[type="range"]::-moz-range-thumb { width: 3.5rem; height: 100vh; border: 0; }
@media (max-width: 52rem) { [data-component="before-after"] .compare.is-ready { aspect-ratio: 4 / 5; } }

/* component: card-grid */
/* Flate fliser i lys grå. Ved hover fylles flisen med teal nedenfra og teksten blir hvit. Det brede førstekortet er teal fra start. */
[data-component="card-grid"] > h2 { max-width: 22ch; }
[data-component="card-grid"] ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { [data-component="card-grid"] ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) {
  [data-component="card-grid"] ul { grid-template-columns: repeat(3, 1fr); }
  [data-component="card-grid"]:not(.list) ul:has(> li:last-child:nth-child(3n + 2)) > li:first-child { grid-column: span 2; }
  [data-component="card-grid"]:not(.list) ul:has(> li:last-child:nth-child(3n + 1)) > li:first-child { grid-column: 1 / -1; }
}
[data-component="card-grid"] li { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(12rem, 20vw, 16rem); padding: clamp(1.25rem, 2.5vw, 2rem);
  background-color: var(--gainsboro); background-image: linear-gradient(var(--teal), var(--teal)); background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 0%; color: var(--ink);
  transition: background-size 0.55s cubic-bezier(.6,.05,.2,1), color 0.35s ease; }
[data-component="card-grid"] li h3 { font-family: var(--font-text); font-weight: 400; font-size: clamp(1.6rem, 2.2vw, 2rem); line-height: 1.3; color: inherit; margin: 0 0 0.4rem; }
[data-component="card-grid"] li h3 a { color: inherit; text-decoration: none; }
[data-component="card-grid"] li h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
[data-component="card-grid"] li p { color: var(--ink-muted); margin: 0; max-width: 26rem; transition: color 0.35s ease; }
[data-component="card-grid"] li > .body { display: flex; flex-direction: column; }
[data-component="card-grid"] li .meta { font-size: 0.875rem; color: var(--grey); margin: 0 0 0.6rem; }
[data-component="card-grid"] li a.more { align-self: flex-start; margin-top: 1.25rem; color: inherit; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, currentColor 50%, transparent); padding-bottom: 5px; position: relative; z-index: 1; transition: border-color 0.3s ease; }
[data-component="card-grid"] .note { margin-top: 1.75rem; color: var(--ink-muted); }
[data-component="card-grid"] .note p { margin: 0; }
@media (min-width: 64rem) {
  [data-component="card-grid"]:not(.list) ul:has(> li:last-child:nth-child(3n + 2)) > li:first-child:not(.has-image),
  [data-component="card-grid"]:not(.list) ul:has(> li:last-child:nth-child(3n + 1)) > li:first-child:not(.has-image) { background-color: var(--teal); background-image: linear-gradient(var(--slate), var(--slate)); color: #fff; }
  [data-component="card-grid"]:not(.list) ul:has(> li:last-child:nth-child(3n + 2)) > li:first-child:not(.has-image) p,
  [data-component="card-grid"]:not(.list) ul:has(> li:last-child:nth-child(3n + 1)) > li:first-child:not(.has-image) p { color: rgba(255, 255, 255, 0.85); }
  [data-component="card-grid"]:not(.list) ul:has(> li:last-child:nth-child(3n + 2)) > li:first-child:not(.has-image) h3,
  [data-component="card-grid"]:not(.list) ul:has(> li:last-child:nth-child(3n + 1)) > li:first-child:not(.has-image) h3 { font-family: var(--font-display); font-weight: 350; font-size: clamp(2rem, 3vw, 2.5rem); }
}
@media (hover: hover) {
  [data-component="card-grid"] li:not(.has-image):hover { background-size: 100% 100%; color: #fff; }
  [data-component="card-grid"] li:not(.has-image):hover p { color: rgba(255, 255, 255, 0.85); }
  [data-component="card-grid"] li:not(.has-image):hover a.more { border-color: #fff; }
}
[data-component="card-grid"] li:not(.has-image):focus-within { background-size: 100% 100%; color: #fff; }
[data-component="card-grid"] li:not(.has-image):focus-within p { color: rgba(255, 255, 255, 0.85); }
[data-component="card-grid"] li h3 a:focus-visible { outline: none; }
[data-component="card-grid"] li:has(h3 a:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }
/* Kort med bilde: bildet øverst, teksten på hvit bunn under. Bildet zoomer rolig og tittelen får strek ved hover. */
[data-component="card-grid"] li.has-image { background: none; padding: 0; min-height: 0; justify-content: flex-start; }
[data-component="card-grid"] li.has-image .media { overflow: hidden; aspect-ratio: 4 / 3; background: var(--gainsboro); margin-bottom: 1.25rem; }
[data-component="card-grid"] li.has-image .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(.2,.7,.3,1); }
[data-component="card-grid"] li.has-image h3 { font-family: var(--font-display); font-weight: 350; font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
[data-component="card-grid"] li.has-image h3 a { background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat; transition: background-size 0.45s cubic-bezier(.6,.05,.2,1); }
@media (hover: hover) {
  [data-component="card-grid"] li.has-image:hover .media img { transform: scale(1.04); }
  [data-component="card-grid"] li.has-image:hover h3 a { background-position: 0 100%; background-size: 100% 1px; }
  [data-component="card-grid"] li.has-image:hover a.more { border-color: currentColor; }
}
/* Variant list: én kolonne, bilde til venstre og tekst til høyre, skilt med tynne linjer. Laget for artikkeloversikten. */
[data-component="card-grid"].list ul { grid-template-columns: 1fr; gap: 0; }
[data-component="card-grid"].list li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-block: clamp(1.5rem, 3vw, 2.5rem); border-top: 1px solid var(--grey-light); min-height: 0; }
[data-component="card-grid"].list li:last-child { border-bottom: 1px solid var(--grey-light); }
[data-component="card-grid"].list li:not(.has-image) { grid-template-columns: 1fr; background: none; }
[data-component="card-grid"].list li .media { margin: 0; aspect-ratio: 3 / 2; }
[data-component="card-grid"].list li h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.25; margin-bottom: 0.75rem; }
[data-component="card-grid"].list li p { font-size: 1.0625rem; max-width: 34rem; }
@media (max-width: 48rem) { [data-component="card-grid"].list li { grid-template-columns: 1fr; gap: 1.25rem; } }

/* component: contact */
/* Flatt lysegrått felt med etikett/verdi-par */
[data-component="contact"] { display: grid; gap: 2rem clamp(2rem, 5vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); padding: clamp(2rem, 5vw, 3.5rem); background: var(--gainsboro); color: var(--ink); }
[data-component="contact"] dl { margin: 0; }
[data-component="contact"] dt { font-size: 0.875rem; color: var(--ink-muted); margin-bottom: 0.2rem; }
[data-component="contact"] dd { margin: 0 0 1.5rem; font-size: 1.25rem; line-height: 1.4; white-space: pre-line; color: var(--ink); }
[data-component="contact"] dd:last-child { margin-bottom: 0; }
[data-component="contact"] dd a { color: var(--ink); }

/* component: cta */
/* Fargefelt i fullbredde. Standard er rustrød som «Avtal et møte» på trapperingen.no, light er teal. */
[data-component="cta"] { width: 100vw; margin-inline: calc(50% - 50vw); padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); padding-block: clamp(3.5rem, 8vw, 6rem); background: var(--red); color: #fff; display: grid; gap: 1rem; justify-items: start; }
[data-component="cta"] h2 { color: #fff; margin: 0; max-width: 20ch; }
[data-component="cta"] p { color: #fff; max-width: 36rem; margin: 0 0 1rem; }
[data-component="cta"] p a { color: #fff; }
[data-component="cta"] a.button { background-color: #fff; background-image: linear-gradient(var(--ink), var(--ink)); border-color: #fff; color: var(--red); }
[data-component="cta"] a.button:hover { color: #fff; border-color: var(--ink); }
[data-component="cta"].light { background: var(--teal); }
[data-component="cta"].light a.button { color: var(--teal); }
[data-component="cta"].light a.button:hover { color: #fff; }

/* component: faq */
/* Én kolonne i full bredde: overskrift over, spørsmålene under over hele innholdsbredden */
[data-component="faq"] > h2 { max-width: 22ch; }
[data-component="faq"] details { border-bottom: 1px solid var(--grey-light); }
[data-component="faq"] details:first-of-type { border-top: 1px solid var(--grey-light); }
[data-component="faq"] summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.5rem 0; cursor: pointer; list-style: none; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.4; color: var(--ink); transition: color 0.2s ease; }
[data-component="faq"] summary:hover { color: var(--teal); }
[data-component="faq"] summary::-webkit-details-marker { display: none; }
[data-component="faq"] summary::after { content: "+"; flex: none; font-size: 1.9rem; font-weight: 300; line-height: 1; color: var(--teal); transition: transform 0.35s cubic-bezier(.6,.05,.2,1); }
[data-component="faq"] details[open] summary::after { transform: rotate(45deg); }
[data-component="faq"] details > :not(summary) { color: var(--ink-muted); font-size: 1.0625rem; max-width: 64rem; }
[data-component="faq"] details p { margin: -0.25rem 0 1.5rem; }

/* component: form */
/* Rustrødt felt i fullbredde som «Avtal et møte» på trapperingen.no: intro til venstre, felt i to kolonner til høyre.
   Gjennomsiktige felt med lys ramme, hvit tekst og hvit send-knapp. */
[data-component="form"] { width: 100vw; margin-inline: calc(50% - 50vw); padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); padding-block: clamp(3rem, 7vw, 5.5rem); background: var(--red); color: #fff; display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
[data-component="form"]:has(> .intro) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 56rem) { [data-component="form"]:has(> .intro) { grid-template-columns: 1fr; } }
[data-component="form"] .intro { max-width: 34rem; color: #fff; }
[data-component="form"] .intro h2 { color: #fff; }
[data-component="form"] .intro p:last-child { margin-bottom: 0; }
[data-component="form"] .intro a { color: #fff; }
[data-component="form"]:not(:has(> .intro)) form[data-form] { max-width: 44rem; }

form[data-form] { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 40rem) {
  form[data-form] { grid-template-columns: 1fr 1fr; }
  form[data-form] > label:has(textarea), form[data-form] > label:has(select), form[data-form] > label.check, form[data-form] > .hp { grid-column: 1 / -1; }
}
form[data-form] > label { display: grid; gap: 0.4rem; align-content: start; font-size: 0.875rem; color: #fff; }
form[data-form] input:not([type="checkbox"]), form[data-form] select, form[data-form] textarea {
  font: inherit; font-size: 1rem; width: 100%; min-height: 3.125rem; padding: 0.6rem 0.95rem; color: #fff; background: transparent;
  border: 1px solid var(--misty); border-radius: 0; -webkit-appearance: none; appearance: none; transition: border-color 0.2s ease, background-color 0.2s ease; }
form[data-form] ::placeholder { color: rgba(255, 255, 255, 0.7); opacity: 1; }
form[data-form] select { padding-right: 2.75rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='white' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; }
form[data-form] select option { color: var(--ink); }
form[data-form] textarea { min-height: 8rem; resize: vertical; }
@media (hover: hover) { form[data-form] input:not([type="checkbox"]):hover, form[data-form] select:hover, form[data-form] textarea:hover { border-color: #fff; } }
form[data-form] input:not([type="checkbox"]):focus, form[data-form] select:focus, form[data-form] textarea:focus { outline: none; border-color: #fff; background-color: rgba(255, 255, 255, 0.08); }
form[data-form] input:user-invalid, form[data-form] textarea:user-invalid { border-color: #ffd1c7; border-width: 2px; }
/* Postnummer → sted: stedsnavnet dukker opp under feltet med en liten hvit firkant foran */
form[data-form] .postcode-place { display: flex; align-items: center; gap: 0.5rem; min-height: 1.35rem; margin: 0.1rem 0 0; font-size: 0.95rem; color: #fff; letter-spacing: 0.01em; }
form[data-form] .postcode-place:not(:empty)::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; background: #fff; }
@media (prefers-reduced-motion: no-preference) { form[data-form] .postcode-place:not(:empty) { animation: tr-fade 0.35s cubic-bezier(.2,.7,.3,1) both; } }
form[data-form] label.check { grid-template-columns: auto 1fr; align-items: start; gap: 0.7rem; font-size: 0.875rem; line-height: 1.5; color: #fff; cursor: pointer; }
form[data-form] input[type="checkbox"] { -webkit-appearance: none; appearance: none; width: 1.1rem; height: 1.1rem; margin: 0.15rem 0 0; border: 1px solid var(--misty); background: transparent center / 0.7rem no-repeat; cursor: pointer; transition: background-color 0.2s ease; }
form[data-form] input[type="checkbox"]:checked { background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2l3.3 3.3L11 1.5' fill='none' stroke='%2388423d' stroke-width='2'/%3E%3C/svg%3E"); }
form[data-form] input[type="checkbox"]:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
form[data-form] > button { justify-content: space-between; min-height: 3.125rem; background-color: #fff; background-image: linear-gradient(var(--ink), var(--ink)); color: var(--red); border-color: #fff; }
form[data-form] > button:hover { color: #fff; border-color: var(--ink); }
form[data-form] .hp { position: absolute; left: -9999px; }
.form-status { padding: 1rem 1.25rem; background: #fff; color: var(--red); }
.form-status.error { color: var(--rust); }

/* component: gallery */
/* Høye bildekort som modellkarusellen på trapperingen.no: navnet i hvit sans nederst til venstre på bildet. */
[data-component="gallery"] > h2 { max-width: 22ch; }
[data-component="gallery"] ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
[data-component="gallery"] figure { position: relative; margin: 0; overflow: hidden; background: var(--slate-2); aspect-ratio: 3 / 4; }
[data-component="gallery"] .frame { position: absolute; inset: 0; }
[data-component="gallery"] .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(.2,.7,.3,1), filter 0.4s ease; }
/* Hele kortet er klikkbart når det har lenke */
[data-component="gallery"] .cover { position: absolute; inset: 0; display: block; text-decoration: none; }
[data-component="gallery"] .cover:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
[data-component="gallery"] .placeholder { position: absolute; inset: 0; display: flex; align-items: flex-start; padding: 1.25rem; font-size: 0.875rem; color: rgba(255, 255, 255, 0.75); background: var(--slate-2); }
[data-component="gallery"] figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 4rem clamp(1rem, 2vw, 1.5rem) clamp(1rem, 2vw, 1.5rem); color: #fff; font-size: 0.95rem; line-height: 1.45; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }
[data-component="gallery"] figcaption p { margin: 0; }
[data-component="gallery"] figcaption strong { display: block; font-weight: 400; font-size: clamp(1.6rem, 2.2vw, 2rem); line-height: 1.3; margin-bottom: 0.15rem; }
[data-component="gallery"] figcaption a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.6); pointer-events: auto; }
[data-component="gallery"] figcaption a:hover { text-decoration-color: #fff; }
/* Pil som glir inn nederst til høyre på lenkede kort */
[data-component="gallery"] figure:has(.cover)::after { content: "→"; position: absolute; right: clamp(1rem, 2vw, 1.5rem); bottom: clamp(1rem, 2vw, 1.5rem); z-index: 2; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; background: #fff; color: var(--teal); font-size: 1.15rem; pointer-events: none;
  opacity: 0; transform: translateX(-0.75rem); transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,.7,.3,1); }
[data-component="gallery"] figure:has(.cover) figcaption { padding-right: 4.5rem; }
@media (hover: hover) {
  [data-component="gallery"] figure:hover .frame img { transform: scale(1.04); }
  [data-component="gallery"] figure:has(.cover):hover::after { opacity: 1; transform: none; }
}
[data-component="gallery"] figure:has(.cover:focus-visible)::after { opacity: 1; transform: none; }
@media (hover: none) { [data-component="gallery"] figure:has(.cover)::after { opacity: 1; transform: none; } }

/* component: hero */
/* Standard: hvit flate med stor serif-overskrift, som introseksjonene på trapperingen.no */
[data-component="hero"] { padding-block: clamp(3.5rem, 8vw, 6.25rem) clamp(1rem, 3vw, 2rem); max-width: 56rem; }
[data-component="hero"] h1 { max-width: 20ch; }
[data-component="hero"] .buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }
@media (prefers-reduced-motion: no-preference) {
  [data-component="hero"] > div > * { animation: tr-fade 0.8s cubic-bezier(.2,.7,.3,1) both; }
  [data-component="hero"] > div > *:nth-child(2) { animation-delay: 0.08s; } [data-component="hero"] > div > *:nth-child(3) { animation-delay: 0.16s; } [data-component="hero"] > div > *:nth-child(4) { animation-delay: 0.24s; }
}
/* with-image: helbredde bilde, aldri høyere enn skjermen minus headeren. Liten tekst øverst, stor sans-tekst nederst til venstre. */
[data-component="hero"].with-image { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); max-width: none; width: 100vw; margin-inline: calc(50% - 50vw); padding: 0;
  height: min(calc(100svh - 5.25rem), 56rem); min-height: 26rem; background: var(--slate); overflow: hidden; }
@media (max-width: 52rem) { [data-component="hero"].with-image { height: min(calc(100svh - 7.25rem), 40rem); min-height: 24rem; } }
[data-component="hero"].with-image > * { grid-area: 1 / 1; }
[data-component="hero"].with-image img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) { [data-component="hero"].with-image img { animation: tr-zoom 2.4s cubic-bezier(.2,.7,.3,1) both; } }
[data-component="hero"].with-image > div { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(1.5rem, 4vw, 2.5rem) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) clamp(2.5rem, 7vw, 5rem);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.2) 100%); }
[data-component="hero"].with-image > div > * { max-width: 36rem; }
[data-component="hero"].with-image .eyebrow { position: absolute; top: clamp(1.25rem, 3vw, 2rem); left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); color: #fff; margin: 0; }
[data-component="hero"].with-image h1 { font-family: var(--font-text); font-weight: 400; font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.3; color: #fff; margin-bottom: 1rem; }
[data-component="hero"].with-image .lead { color: #fff; font-size: 1.0625rem; }
[data-component="hero"].with-image .buttons { margin-top: 1.5rem; }
[data-component="hero"].with-image .button { background-color: #fff; background-image: linear-gradient(var(--teal), var(--teal)); color: var(--teal); border-color: #fff; }
[data-component="hero"].with-image .button:hover { color: #fff; border-color: var(--teal); }
[data-component="hero"].with-image .button.secondary { background-color: transparent; background-image: linear-gradient(#fff, #fff); color: #fff; border-color: #fff; }
[data-component="hero"].with-image .button.secondary:hover { color: var(--ink); }

/* component: map */
[data-component="map"] .placeholder { position: relative; width: 100%; aspect-ratio: 21 / 9; min-height: 16rem; display: grid; place-items: center; background: var(--gainsboro); overflow: hidden; }
[data-component="map"] .placeholder::before { content: ""; position: absolute; left: 50%; top: 50%; width: 1rem; height: 1rem; margin: -3.5rem 0 0 -0.5rem; border-radius: 50%; background: var(--peru); }
[data-component="map"] .placeholder a { position: relative; display: inline-flex; padding: 0.7rem 1rem; color: var(--teal); text-decoration: none; background-color: #fff; background-image: linear-gradient(var(--teal), var(--teal)); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size 0.5s cubic-bezier(.6,.05,.2,1), color 0.3s ease; }
[data-component="map"] .placeholder a:hover { background-size: 100% 100%; color: #fff; }

/* component: prisindikator */
/* Prisindikator: stort bilde av valgt modell til venstre (følger med ved scroll), valg og pris til høyre. Flatt og rektangulært. */
[data-component="prisindikator"] { width: 100vw; margin-inline: calc(50% - 50vw); padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
[data-component="prisindikator"] .pi { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 60rem) { [data-component="prisindikator"] .pi { grid-template-columns: 1fr; } }
[data-component="prisindikator"] .stage { position: sticky; top: 5.5rem; aspect-ratio: 16 / 10; background: var(--gainsboro); overflow: hidden; }
@media (max-width: 60rem) { [data-component="prisindikator"] .stage { position: relative; top: 0; } }
[data-component="prisindikator"] .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
[data-component="prisindikator"] .pi:not(.is-ready) .stage img:first-child, [data-component="prisindikator"] .stage img.is-active { opacity: 1; }
[data-component="prisindikator"] .panel h2 { margin-bottom: 0.75rem; }
[data-component="prisindikator"] .intro { color: var(--ink-muted); margin-bottom: 1.5rem; }
[data-component="prisindikator"] fieldset { border: 0; border-top: 1px solid var(--grey-light); margin: 0; padding: 1.25rem 0 1.5rem; min-width: 0; }
[data-component="prisindikator"] fieldset[hidden] { display: none; }
[data-component="prisindikator"] legend { float: left; width: 100%; padding: 0; margin-bottom: 0.9rem; font-size: 1.0625rem; color: var(--ink); }
[data-component="prisindikator"] legend + * { clear: both; }
[data-component="prisindikator"] .choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
[data-component="prisindikator"] .choices.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 30rem) { [data-component="prisindikator"] .choices.models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-component="prisindikator"] .choice { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border: 1px solid var(--grey-light); background: #fff; cursor: pointer; font-size: 0.95rem; transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease; }
[data-component="prisindikator"] .choice[hidden] { display: none; }
[data-component="prisindikator"] .choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
@media (hover: hover) { [data-component="prisindikator"] .choice:hover { border-color: var(--ink); } }
[data-component="prisindikator"] .choice:has(input:checked) { background: var(--teal); border-color: var(--teal); color: #fff; }
[data-component="prisindikator"] .choice:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
[data-component="prisindikator"] .choice.model { display: grid; padding: 0; gap: 0; align-items: stretch; }
[data-component="prisindikator"] .choice.model .thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--gainsboro); }
[data-component="prisindikator"] .choice.model .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2,.7,.3,1); }
@media (hover: hover) { [data-component="prisindikator"] .choice.model:hover .thumb img { transform: scale(1.05); } }
[data-component="prisindikator"] .choice.model .name { padding: 0.5rem 0.7rem; }
[data-component="prisindikator"] .choice.model:not(:has(.thumb))::before { content: ""; display: block; aspect-ratio: 4 / 3; background: var(--gainsboro); }
[data-component="prisindikator"] .choice.model:has(input:checked) { background: #fff; border-color: var(--teal); outline: 2px solid var(--teal); outline-offset: -2px; color: var(--ink); }
[data-component="prisindikator"] .choice.model:has(input:checked) .name { background: var(--teal); color: #fff; }
[data-component="prisindikator"] .sum { background: var(--slate); color: #fff; padding: clamp(1.25rem, 3vw, 2rem); margin-top: 0.5rem; display: grid; gap: 0.35rem; justify-items: start; }
@media (max-width: 60rem) { [data-component="prisindikator"] .sum { position: sticky; bottom: 0; z-index: 5; } }
[data-component="prisindikator"] .sum .label { margin: 0; color: var(--grey-light); font-size: 0.95rem; }
[data-component="prisindikator"] .sum .price { margin: 0; font-family: var(--font-display); font-weight: 350; font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1.1; color: #fff; }
[data-component="prisindikator"] .sum .choice-summary { margin: 0; color: var(--grey-light); font-size: 0.9rem; }
[data-component="prisindikator"] .sum .disclaimer { margin: 0.5rem 0 1rem; color: var(--grey-light); font-size: 0.875rem; max-width: 30rem; }

/* component: prose */
[data-component="prose"] { max-width: var(--measure); counter-reset: step; }
/* Artikler: spalten står midt på siden, teksten er venstrestilt */
[data-component="prose"]:has(> .md-article) { margin-inline: auto; }
/* Forsiden: full bredde, stegene i kolonner */
[data-component="prose"]:has(> .md-forside) { max-width: none; }
[data-component="prose"] .md-forside > h2 { max-width: 22ch; }
[data-component="prose"] .md-forside > p { max-width: var(--measure); }
[data-component="prose"] .md-forside > ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 0 clamp(1.5rem, 3vw, 3rem); margin-top: 2.5rem; }
[data-component="prose"] .md-forside > ol > li { padding: 5rem 0 1.5rem; border-top: 2px solid var(--ink); border-bottom: 0; font-size: 1.125rem; }
[data-component="prose"] .md-forside > ol > li::before { top: 1.5rem; width: 2.5rem; height: 2.5rem; font-size: 1.05rem; }
[data-component="prose"] .md > :first-child { margin-top: 0; }
[data-component="prose"] .md > :last-child { margin-bottom: 0; }
[data-component="prose"] h2 { margin-top: clamp(3rem, 6vw, 4.5rem); }
[data-component="prose"] h3 { margin-top: 2.25rem; }
[data-component="prose"] p, [data-component="prose"] li { font-size: 1.0625rem; line-height: 1.7; color: var(--ink-muted); }
[data-component="prose"]:has(> .md-article) p, [data-component="prose"]:has(> .md-article) li { font-size: 1.125rem; line-height: 1.75; }
[data-component="prose"] strong { color: var(--ink); }
[data-component="prose"] ol { list-style: none; padding: 0; margin: 1.5rem 0 2.5rem; }
[data-component="prose"] ol > li { counter-increment: step; position: relative; padding: 1.25rem 0 1.25rem 3.75rem; border-top: 1px solid var(--gainsboro); margin: 0; }
[data-component="prose"] ol > li:last-child { border-bottom: 1px solid var(--gainsboro); }
[data-component="prose"] ol > li::before { content: counter(step); position: absolute; left: 0; top: 1.25rem; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; background: var(--teal); color: #fff; font-size: 1rem; line-height: 1; }
[data-component="prose"] .md-forside > ol > li, [data-component="prose"] .md-forside > ol > li:last-child { padding: 5rem 0 1.5rem; border-top: 2px solid var(--ink); border-bottom: 0; }
[data-component="prose"] .md-forside > ol > li::before { top: 1.5rem; width: 2.5rem; height: 2.5rem; }
[data-component="prose"] ul { padding-left: 1.2rem; }
[data-component="prose"] ul > li { margin-bottom: 0.4rem; }
[data-component="prose"] ul > li::marker { color: var(--teal); }
[data-component="prose"] blockquote { margin: 2.5rem 0; padding: 0.25rem 0 0.25rem 1.5rem; border-left: 2px solid var(--teal); font-family: var(--font-display); font-weight: 350; font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.35; color: var(--ink); }
[data-component="prose"] blockquote p { font-size: inherit; color: inherit; line-height: inherit; }
[data-component="prose"] img { margin-block: 2rem; }
