/*
 * content.css — the GENERIC, token-driven design layer for PageBuilder-composed standalone
 * pages (the `.nb-section` / `.nb-contain` / `.btn--primary` / `.nb-cta` … vocabulary that
 * PageBuilder emits). The single-source theme's design.css is the decomposed FRONT-PAGE css
 * scoped to `.nb-site`; it does NOT define these page hooks, so without this file every migrated
 * standalone page renders unstyled (no container width, no button style, no band rhythm). This
 * file gives every migration a decent baseline for free — no per-site generation, no re-migration.
 *
 * Scope: everything under `.nb-content` (the page <main> emitted by PageRender) so it never
 * touches the `.nb-site` chrome parts or the `.nb-cpt` CPT card layouts.
 *
 * Tokens: relies only on the GLOBAL :root tokens the child theme's design.css writes
 * (--primary, --nb-green, --nb-bg, --nb-ink, --nb-line, --nb-tint, --nb-container, --text/--serif),
 * each with a sturdy fallback so a token-light site still looks intentional.
 *
 * EVERY value here comes from a variable — that is the parent's licence to exist
 * (docs/theme-architecture.md §4: a floor "takes every value from an ACSS variable"). The audit in
 * §5f found 11 that did not and they are now `var(--token, <the previous literal>)`: the rhythm.css
 * model, so a site overrides by setting the token and the default renders exactly as before.
 * Two values are deliberately NOT tokenised — `rgba(255,255,255,…)` overlays and the card's
 * `rgba(0,0,0,.09)` shadow express DEPTH, not brand, and no ACSS token means "shadow".
 *
 * `--nb-star` (default #e0a008) is the one property this file introduces: the review-star gold. It is
 * an affordance colour, not a brand colour — ACSS has no token for it — so it is named here to be
 * per-site overridable rather than left as an unreachable literal.
 */

.nb-content{
  /* All colour keyed to the ACSS palette (written from the brand by the migration), so changing the ACSS
     vars re-themes the whole tier. --c-* are thin aliases kept for the existing rules below. */
  --c-ink:var(--text-dark,#23262C);
  --c-light:var(--text-light,#FBFBF8);
  --c-muted:color-mix(in srgb,var(--c-ink) 62%,transparent);
  --c-line:var(--neutral-light,var(--nb-line,#e3ddd2));
  --c-primary:var(--primary,#33302f);
  --c-bg:var(--base,#F6F1E9);
  --c-tint:var(--primary-ultra-light,color-mix(in srgb,var(--c-primary) 9%,#fff));
  --c-dark:var(--primary-dark,color-mix(in srgb,var(--c-primary) 72%,#000));
  --c-container:var(--nb-container,1140px);
  --c-pad:var(--nb-pad,24px);
  color:var(--c-ink);
  font-family:var(--nb-body-font,var(--text,system-ui,-apple-system,sans-serif));
  line-height:1.65;
}
.nb-content *{box-sizing:border-box}

/* ── Bands: each section is full-bleed; the inner .nb-contain sets the reading width. The VERTICAL RHYTHM
   (inset on filled bands; seam/collapse/gap between sections; breadcrumb hug) is owned by the shared
   rhythm.css, keyed on the data-fill PageRender stamps on each .nb-section — one consistent system across
   every tier, instead of the per-tier padding rules that used to live here. This file keeps only the band
   COLOURS + the image-band background props. ── */
/* ── IMAGE BAND: a real <img>, layered, not a CSS background ────────────────────────────────────
   PageBuilder used to emit the photo as an inline `background-image` with a gradient baked in. A
   background has no alt, no filename and no title for Google, does not print, and cannot be moved
   out from under the text on a narrow screen. It is now an <img> + its own scrim element, stacked
   behind the copy with z-index. `isolation:isolate` keeps the negative z-indexes inside the band
   so they can never slide behind the page itself. */
.nb-content .nb-section.has-bg-image{position:relative;isolation:isolate;overflow:hidden}
.nb-content .nb-section__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:-2;display:block}
.nb-content .nb-section__scrim{position:absolute;inset:0;z-index:-1;background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.42))}
/* Legacy bands still carrying the inline background keep working until their content is rewritten. */
.nb-content .nb-section.has-bg-image{background-size:cover;background-position:center}
/* Band fills + their contrast pair moved to rhythm.css's [data-fill] floor (one contract, every
   tier). The on-brand BUTTON rules below stay here — they are content-component styling, not the
   band identity — and are rekeyed to [data-fill]. See docs/theme-architecture.md §5c. */
/* Deterministic contrast pairing: ALL text on a brand/dark band flips to the ACSS light text colour
   (--text-light), so a light-on-light failure is impossible regardless of what the content sets. */

/* ── The shared container — the alignment "red line" matching the chrome width ── */
.nb-content .nb-contain{max-width:var(--c-container);margin-inline:auto;padding-inline:var(--c-pad)}
.nb-content .nb-head--center{text-align:center}
.nb-content .nb-head--center .nb-contain,
.nb-content.nb-head--center{margin-inline:auto}

/* ── Typography — match the front page: brand heading font (--nb-heading-font) at the design's lighter
   weight (--nb-heading-weight, default 500), NOT a generic bold Georgia. ── */
.nb-content h1,.nb-content h2,.nb-content h3,.nb-content h4,.nb-content .h1,.nb-content .h2,.nb-content .h3,.nb-content .h4{font-family:var(--nb-heading-font,var(--serif,Georgia,serif));font-weight:var(--nb-heading-weight,500)}
/* Headings use ACSS's modular type scale (--h1/--h2/--h3) so content pages match the CPT/SiteCta headings
   and the whole fleet shares ONE scale. The prior clamp() stays as the fallback (identical if --h* is
   somehow absent), so this only ever upgrades to the token — never regresses the size. */
.nb-content h1,.nb-content .h1{font-size:var(--h1,clamp(2rem,1.4rem+2.6vw,3.2rem));line-height:1.1;margin:0 0 .5em}
.nb-content h2,.nb-content .h2{font-size:var(--h2,clamp(1.6rem,1.2rem+1.6vw,2.4rem));line-height:1.15;margin:0 0 .5em}
.nb-content h3,.nb-content .h3{font-size:var(--h3,clamp(1.25rem,1.05rem+.8vw,1.6rem));margin:0 0 .4em}
.nb-content h4,.nb-content .h4{font-size:1.15rem;margin:0 0 .4em}
.nb-content p{margin:0 0 1em;max-width:68ch}
/* An insert must share the PROSE MEASURE, or it reads as a different column. In the CPT
   context `.nb-prose` caps the parent so everything inside inherits it, but here the cap
   sits on each `p`, so a full-width child escapes it: the mid-CTA measured 1080px against
   602px of text on elholm's /produkter/om-doedsannoncer/ — 478px wider than the paragraphs
   it sits between. `.nb-midcta` itself inherits the body font-size (only its `__lead` child
   is 1.05rem), so the SAME `68ch` resolves to the same width as a paragraph. */
.nb-content .nb-midcta{max-width:68ch}
.nb-content .nb-head--center p{margin-inline:auto}
.nb-content .text--600{font-size:clamp(1.05rem,1rem+.4vw,1.25rem)}
.nb-content .text--400{font-size:.95rem}
.nb-content a{color:var(--nb-link,var(--c-primary));text-decoration:underline;text-underline-offset:2px}
/* D9/V1: preserved inline emphasis MUST read as emphasis. ACSS's site-wide reset can flatten a bare
   <strong>/<em> under .nb-content, so assert the weight/style explicitly (Andreas's minimum ask). */
.nb-content strong,.nb-content b{font-weight:650}
.nb-content em,.nb-content i{font-style:italic}
.nb-content .nb-section.has-bg-image,.nb-content .nb-section.has-bg-image *{color:var(--white,#fff)}

/* ── Buttons (the "Ring til familien" CTA + all PageBuilder buttons) ── */
/* ONE canonical button spec shared by the front page (.nb-site), content pages (.nb-content) and CPT views
   (.nb-cpt) so every button on the site looks identical and is driven by the brand ACSS variables. Match the
   bespoke design's button: 1px border, inline-flex, .95rem, hover = darken to var(--primary-hover). */
.nb-content .btn{display:inline-flex;align-items:center;gap:.5em;padding:.85em 1.7em;border-radius:var(--btn-radius,8px);font-weight:600;font-size:.95rem;text-decoration:none;line-height:1.2;transition:background .2s ease,color .2s ease,box-shadow .2s ease;cursor:pointer;border:1px solid transparent}
.nb-content .btn--primary{background:var(--c-primary);color:var(--white,#fff);border-color:var(--c-primary)}
.nb-content .btn--primary:hover{background:var(--primary-hover);border-color:var(--primary-hover)}
.nb-content .btn--secondary,.nb-content .btn--ghost{background:transparent;color:var(--c-primary);border-color:var(--c-primary)}
.nb-content .btn--secondary:hover,.nb-content .btn--ghost:hover{background:var(--c-primary);color:var(--white,#fff);border-color:var(--c-primary)}
.nb-content [data-fill="brand"] .btn--primary,.nb-content .nb-section.has-bg-image .btn--primary{background:var(--white,#fff);color:var(--c-primary);border-color:var(--white,#fff)}
.nb-content [data-fill="brand"] .btn--ghost,.nb-content .nb-section.has-bg-image .btn--ghost{color:var(--white,#fff);border-color:rgba(255,255,255,.55)}
.nb-content [data-fill="brand"] .btn--ghost:hover,.nb-content .nb-section.has-bg-image .btn--ghost:hover{background:rgba(255,255,255,.14);color:var(--white,#fff)}
/* A button pairs with its IMMEDIATE surface, not the band. A `.nb-card` is a light surface even inside a
   brand/image band, so its primary button must be brand-FILLED — the band's white-on-brand button would
   otherwise be white-on-white (invisible) on the card. Qualified with the band selector so it out-weighs
   the 0,4,0 band rules above; ghost stays outline-brand so it reads on the light card. */
.nb-content [data-fill="brand"] .nb-card .btn--primary,.nb-content .nb-section.has-bg-image .nb-card .btn--primary{background:var(--c-primary);color:var(--white,#fff);border-color:var(--c-primary)}
.nb-content [data-fill="brand"] .nb-card .btn--primary:hover,.nb-content .nb-section.has-bg-image .nb-card .btn--primary:hover{background:var(--primary-hover);border-color:var(--primary-hover)}
.nb-content [data-fill="brand"] .nb-card .btn--ghost,.nb-content .nb-section.has-bg-image .nb-card .btn--ghost{background:transparent;color:var(--c-primary);border-color:var(--c-primary)}
/* Heading rhythm inside a section container that isn't an explicit `.nb-flow` (some PageBuilder sections
   place a button + heading loose in `.nb-contain` → they collided with 0 gap, e.g. /publikationer "Når
   nogen dør" right under a button). Give any heading that FOLLOWS a sibling the standard pre-heading space.
   Scoped to direct children so card grids/media keep their own spacing; first-child headings stay flush. */
.nb-content .nb-contain > * + :is(h2,h3,h4){margin-top:var(--flow-before-heading,2em)}
/* On-brand focus ring — replaces the browser-default BLUE outline that looked wrong around a brown CTA.
   currentColor adapts to each surface so it stays visible + accessible on light, dark and brand bands. */
.nb-content :is(a,button,.btn,[role="button"],input,textarea,select):focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:3px}
.nb-content .nb-cta{display:flex;flex-direction:column;gap:.4rem}
.nb-content .nb-cta .btn{margin-top:1rem;align-self:flex-start}
.nb-content .nb-head--center .nb-cta .btn,.nb-content .nb-cta--band .btn{align-self:center}

/* ── Native hero block (nembedemand/hero) — BASE layout so it's contained + split even when the per-site
   design.css doesn't define .nb-split-hero (the block assumes the design does; profile-3 etc. don't, so the
   hero rendered full-width with no container). ── */
.nb-content .nb-split-hero{padding-block:clamp(48px,7vw,104px)}
.nb-content .nb-split-hero__inner{max-width:var(--c-container);margin-inline:auto;padding-inline:var(--c-pad);display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(28px,5vw,60px);align-items:center}
.nb-content .nb-split-hero__media img{width:100%;height:auto;border-radius:12px;display:block}
.nb-content .nb-split-hero__media img:not([src]),.nb-content .nb-split-hero__media img[src=""]{display:none}
.nb-content .nb-split-hero__media:empty{display:none}
@media(max-width:780px){.nb-content .nb-split-hero__inner{grid-template-columns:1fr}}

/* ── Split (two-column) sections ── */
.nb-content .nb-split{display:grid;grid-template-columns:1fr 1fr;gap:clamp(28px,5vw,64px);align-items:start}
.nb-content .nb-split__col{min-width:0}
@media(max-width:780px){.nb-content .nb-split{grid-template-columns:1fr}}

/* ── Service / card grids ── */
.nb-content .nb-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:clamp(18px,2.5vw,28px)}
.nb-content .nb-card-grid .nb-card{background:var(--white,#fff);border:1px solid var(--c-line);border-radius:12px;padding:1.5rem}
/* V5/F37: a detected card module (priseksempel cards, product teasers). Title→price→lines→CTA lockup. */
.nb-content .nb-card--price{display:flex;flex-direction:column}
/* F38: an image TILE card (the hub produkterbox category fan-out) — photo + label, the whole card links.
   Mirrors the term-archive category-card grid so the hub and the archives read as one system. */
.nb-content .nb-card-grid .nb-card--tile{padding:0;overflow:hidden;display:block;text-decoration:none;color:inherit;transition:box-shadow .2s,transform .2s}
.nb-content .nb-card--tile:hover{box-shadow:0 10px 30px rgba(0,0,0,.09)}
.nb-content .nb-card--tile .nb-card__ph{aspect-ratio:4/3;background:var(--c-tint,#eef2ec);overflow:hidden}
.nb-content .nb-card--tile .nb-card__ph img{width:100%;height:100%;object-fit:cover;display:block}
.nb-content .nb-card--tile .nb-card__title{margin:16px 18px;font-size:var(--h4,1.15rem)}
.nb-content .nb-card__title{margin:0 0 .5rem;font-size:var(--h4,1.15rem)}
.nb-content .nb-card__price{margin:0 0 .9rem;font-weight:700;color:var(--c-primary);font-size:1.1rem}
.nb-content .nb-card__lines{margin:0 0 1.2rem;padding-left:1.1rem;line-height:1.55;font-size:.95rem}
.nb-content .nb-card__lines li{margin:.2rem 0}
.nb-content .nb-card__cta{margin-top:auto;align-self:flex-start}
.nb-content .nb-svc--iconrow .nb-card{background:transparent;border:0;padding:1rem 0}
.nb-content .nb-svc--numbered{counter-reset:nbn}
.nb-content .nb-svc--numbered .nb-card{position:relative;counter-increment:nbn}
.nb-content .nb-svc--numbered .nb-card::before{content:counter(nbn);display:block;font-size:1.4rem;font-weight:700;color:var(--c-primary);margin-bottom:.4rem}

/* ── Testimonials ── */
.nb-content .nb-testimonials{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:clamp(18px,2.5vw,28px)}
.nb-content .nb-testimonials--slider{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:20px}
.nb-content .nb-testimonials--slider .nb-testimonial{flex:0 0 min(85%,340px);scroll-snap-align:start}
.nb-content .nb-testimonial{background:var(--white,#fff);border:1px solid var(--c-line);border-radius:12px;padding:1.5rem;margin:0}
.nb-content .nb-testimonial blockquote{margin:0 0 .8rem;font-style:italic}
.nb-content .nb-testimonial figcaption{font-weight:600;font-size:.9rem}
.nb-content .nb-pull-quote{max-width:46ch;margin-inline:auto;text-align:center;font-size:clamp(1.3rem,1.1rem+1vw,1.8rem);font-style:italic;border:0;padding:0}
.nb-content .nb-pull-quote-author{font-size:.95rem;font-style:normal;font-weight:600;opacity:.8;margin-top:.8rem}
.nb-content .nb-stars{color:var(--nb-star,#e0a008);letter-spacing:2px;margin-bottom:.5rem}

/* ── Price grid ── */
.nb-content .nb-price-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1.1rem}

/* ── Contact form (most styling is inline; just align width + button) ── */
.nb-content .nb-contact-form{max-width:560px}
.nb-content .nb-contact-form .btn--primary{margin-top:.4rem}

/* ── Lists ── */
.nb-content ul,.nb-content ol{margin:0 0 1em;padding-left:1.3em}
.nb-content li{margin-bottom:.4em}

/* ── Images ── */
.nb-content img{max-width:100%;height:auto;display:block}
.nb-content figure{margin:0 0 1em}

/* ── Breadcrumbs already styled in cpt.css (.nb-breadcrumbs) — loaded site-wide ── */

/* ── Plain (non-PageBuilder) page prose fallback ── */
.nb-prose{max-width:72ch}
.nb-prose p{margin:0 0 1em}
.nb-prose a{color:var(--nb-link,var(--primary))}

/* ── Screen-reader-only (keeps a valid single H1 without a visible duplicate) ── */
.nb-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ── Per-site closing CTA band (SiteCta) — HARD RULE: every generated page ends in a CTA ──────────────
   Deliberately UNSCOPED + fully self-contained (its own button styles, no tier `.btn`) so the same band
   renders identically when appended inside `.nb-content`, `.nb-wrap`/`.nb-single` (CPT) and bespoke
   `.nb-site` mains. Brand-driven via the ACSS tokens (no invented colours). content.css is enqueued
   site-wide, so these rules reach every tier. */
/* Padding + margin are owned by rhythm.css via data-bleed/data-fill="brand" (see class-site-cta.php) so the
   CTA spaces/collapses like every other band — no hardcoded margin-top (that double-spaced it before footer). */
.nb-site-cta{background:var(--primary,#33302f);color:var(--text-light,#FBFBF8);text-align:center}
/* …but the CONTENT above it had no bottom inset at all. The generic CPT single (`.nb-single > .nb-wrap`)
   and the standalone page (`main.nb-content > .nb-content`) both ship padding-bottom:0, so the last
   paragraph ran straight into the dark closing band — measured 18px on a staff single and 45px on a
   standalone page, against a generous inset everywhere else. The band's own padding-top keeps the text
   off the edge, so it reads as a page that was cut off rather than as an overlap. --rhythm-inset keeps
   this on the same rhythm as every other band boundary (and tightens with it on mobile). */
.nb-single > .nb-wrap,
main.nb-content > .nb-content{padding-bottom:var(--rhythm-inset,clamp(2.5rem,6vw,4.5rem))}
/* F17: the canonical closing band owns its BRAND fill on EVERY tier. A per-site design.css
   `.nb-site [data-fill="brand"]{background:var(--brand-wash)}` (0,2,0) — a LIGHT tint the design uses for
   its OWN bands — otherwise repaints the platform closer light-grey on bespoke `.nb-site`/`.nb-cpt-bespoke`
   pages, leaving its light text unreadable (contrast ~1.35:1). Out-specify it with the band's own attrs
   (0,3,0); self-contained across all tiers, no `!important` (constitution rule 3). Matches both fill tags:
   new builds emit data-fill="dark" (correct — the CTA IS the dark --primary), already-migrated sites carry
   the legacy data-fill="brand"; either way the CTA stays dark. */
.nb-site-cta[data-section="cta"]:is([data-fill="brand"],[data-fill="dark"]){background:var(--primary,#33302f);color:var(--text-light,#FBFBF8)}
/* F35 (completion): the lockup is BLOCK flow so the monotonic eyebrow/title/body/row margins below
   (8/17/28px) own the vertical rhythm. An ACSS/Etch `:where()` default otherwise makes this inner a
   flex COLUMN with a uniform ~30px `gap` that ADDS to those margins → every gap ~37/46/57px, flattening
   the lockup back into "four unrelated strips" (the F35 defect). Scoped `.nb-site-cta .nb-site-cta__in`
   (0,2,0) beats the `:where()` bleed with no `!important`. text-align:center + the body's `margin:0 auto`
   keep it centred without flex. */
.nb-site-cta .nb-site-cta__in{display:block;max-width:var(--nb-container,1140px);margin-inline:auto;padding-inline:var(--nb-pad,24px)}
/* F35 (D-rule): the closing CTA is a LOCKUP, not four unrelated strips. Kicker binds tight to the title,
   title→body medium, body→buttons the widest — a monotonic scale (8/17/28px), NOT the uniform ~45px flow
   gap. The lockup margins MUST out-specify the generic `.nb-content p/h2` (0,1,1) that otherwise repaints
   them when the band renders inside `.nb-content` — so scope each with the band class (0,2,0), no !important. */
.nb-site-cta .nb-site-cta__eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:12px;font-weight:700;opacity:.75;margin:0 0 .5rem}
.nb-site-cta .nb-site-cta__title{font-family:var(--ff-heading,var(--nb-heading-font,Georgia,serif));font-weight:var(--nb-heading-weight,500);font-size:var(--h2,clamp(1.6rem,1.2rem+1.6vw,2.4rem));line-height:1.15;margin:0 0 1.05rem;color:var(--text-light,#FBFBF8)}
.nb-site-cta .nb-site-cta__body{max-width:54ch;margin:0 auto 1.75rem;opacity:.92;line-height:1.6}
.nb-site-cta__row{display:flex;gap:var(--space-xs,.8rem);justify-content:center;flex-wrap:wrap}
/* CTA band buttons use the canonical `.btn` (one button system — no forked `__action` class). Scoped to
   the band (0,2,0) so it: renders identically wherever the CTA is appended (page `.nb-content` or CPT
   `.nb-cpt`); beats the bespoke `.nb-site a` underline (0,1,1); and out-specifies ACSS's
   `[class*="btn--"]` framing — so NO `!important` and no ACSS background-zeroing. On the brand band the
   primary button is a light surface with brand-coloured text (a contrast pair), ghost is outline-light. */
/* FONT: the band renders on BOTH tiers — inside .nb-site on a bespoke page, and outside it on a
   generic CPT single. The per-site design tokens (--ff-body/--ff-heading) are scoped to .nb-site,
   so outside it they resolve to nothing and the button fell back to the inherited Georgia serif —
   the same CTA reading sans on one page and serif on another. Name the fallback explicitly here so
   the band is self-sufficient wherever it is appended. */
/* SIZE: bound to the ACSS button tokens rather than restated, so the band's button is the SAME
   button as every other one on the site (Constitution rule 2 — one `.btn`, driven by ACSS). This
   was a third size (.95rem/.85em·1.7em) next to ACSS's and the per-site design's, which read as
   three different buttons on one page. The literals stay as fallbacks so the band remains
   self-sufficient on a site without ACSS, exactly like the font-family above. */
.nb-site-cta .btn{font-family:var(--ff-body,var(--nb-body-font,var(--text,system-ui,-apple-system,sans-serif)));display:inline-flex;align-items:center;gap:.5em;padding:var(--btn-padding-block,.85em) var(--btn-padding-inline,1.7em);border-radius:var(--btn-radius,8px);font-weight:var(--btn-font-weight,600);font-size:var(--text-m,.95rem);text-decoration:none;line-height:var(--btn-line-height,1.2);border:var(--btn-border-width,1px) solid transparent;transition:background .2s ease,color .2s ease,border-color .2s ease}
.nb-site-cta .btn--primary{background:var(--text-light,#fff);color:var(--primary,#33302f);border-color:var(--text-light,#fff)}
.nb-site-cta .btn--primary:hover{background:color-mix(in srgb,var(--text-light,#fff) 88%,var(--primary,#33302f));border-color:var(--text-light,#fff)}
.nb-site-cta .btn--ghost{background:transparent;color:var(--text-light,#fff);border-color:rgba(255,255,255,.55)}
.nb-site-cta .btn--ghost:hover{background:rgba(255,255,255,.14);color:var(--text-light,#fff)}
/* NB: no specificity-boosting protection rules here. The design.css's base element resets are scoped SOFT
   (`:where(.nb-site) p/section{…}`, 0,0,1 — see EtchImport::scope_css), so this band's own (0,1,0) component
   rules above win in every tier, including inside a bespoke `.nb-site` main. */

/* ─── Header actions cluster + MitID button (single-source chrome, every migrated design) ───────────────
   The always-on MitID "Rum til pårørende" button is injected immediately before the primary tel: CTA and
   the two are wrapped in `.nb-hdr-actions` (EtchTemplates::build_site), so they form ONE atomic flex item —
   grouped together on the right regardless of the header grammar's justify-content (previously the button
   floated to the middle under `space-between`). */
.nb-site .nb-hdr-actions{display:inline-flex;align-items:center;gap:.6rem;flex-wrap:nowrap}
/* The design reset `.nb-site a:not(svg):not(math){display:revert}` (which undoes ACSS's a{display:block})
   also clobbers the MitID button's own `display:inline-flex`, collapsing it so the mark + label fall onto
   the text baseline (misaligned). Restore the flex lockup in the .nb-site context — 0,2,1 beats the reset's
   0,1,3, no !important. */
.nb-site a.nbr-mitid-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;line-height:1}

/* ─── Footer seam ──────────────────────────────────────────────────────────────────────────────────────
   The footer is meant to sit FLUSH against the final content band (e.g. the dark CTA). WP's block-gap flow
   can put a stray `margin-block-start` above the footer template part (seen on multisite subsites: a ~24px
   light strip between the CTA and footer). Zero it — the footer part is the last child of .wp-site-blocks.
   0,2,0 beats WP's `:where(.wp-site-blocks) > *` (0,0,0); generic, no !important. */
.wp-site-blocks > .wp-block-template-part:last-child{margin-block-start:0}

/* ── MOBILE (≤768px): image bands STACK, and CTAs go full width ─────────────────────────────────
   Jesper, 2026-08-14: "så vi undgår tekst ovenpå billeder (på mobil) og får SEO-juice for billeder
   med ALT" and "alle CTA'er skal være min. 100% i bredden på mobil - det giver et bedre flow".

   Overlaying a headline on a photo works at 1440px, where there is room beside the subject. At
   390px the text lands on faces and the scrim has to be dark enough to save it, which hides the
   photo you just paid to load. Stacking gives the photo its own band at full brightness and puts
   the copy under it on paper — the same treatment the front-page hero already got. */
@media (max-width: 768px) {
  .nb-content .nb-section.has-bg-image{
    display: flow-root;          /* the img is in flow now, so the band must contain it */
    padding-top: 0;              /* hero photo sits flush at the top — no band inset above it */
    background: var(--base, #fff);
  }
  .nb-content .nb-section__img{
    position: static; z-index: auto;
    width: 100%; height: auto;
    aspect-ratio: 16 / 9;
    margin-bottom: var(--rhythm-inset, clamp(1.5rem, 6vw, 2.5rem));
  }
  .nb-content .nb-section__scrim{ display: none; }
  /* the copy is on paper now, so undo the light-on-dark pairing this band gets when it overlays */
  .nb-content .nb-section.has-bg-image,
  .nb-content .nb-section.has-bg-image *{ color: var(--nb-ink, var(--text-dark, #23262C)); }
  .nb-content .nb-section.has-bg-image .btn--primary{ background: var(--c-primary); color: var(--white,#fff); border-color: var(--c-primary); }
  .nb-content .nb-section.has-bg-image .btn--ghost{ color: var(--c-primary); border-color: var(--c-primary); }

  /* CTAs full width. Scoped to CONTENT surfaces — a full-width pill in the header bar or in the
     burger drawer would break the chrome, so those keep their intrinsic width. */
  .nb-content .btn,
  .nb-site-cta .btn,
  .nb-cpt .btn,
  .nb-single .btn,
  .nb-site main .btn{ width: 100%; justify-content: center; }
  /* `.nb-site main` and not `.nb-site` — the site wrapper contains the header, and a full-width
     pill in the bar (or in the burger drawer, or the MitID button) would break the chrome. */
  .nb-site header .btn,
  .nb-burger, .nb-burger .btn,
  .nbr-mitid-btn{ width: auto; }

  /* Centred copy is a POSTER treatment, and a poster needs width. Jesper, 2026-09-01: "centreret
     tekst på mobil". `.nb-head--center` had no breakpoint at all, so a lead set to read as a centred
     statement at 1440px became a ragged block at 390px, where every line wraps somewhere different
     and the eye loses the left edge it scans down.

     ⚠ THE CENTRED VARIANT STAYS — this is a reading rule for one viewport, not a redesign. It is
     emitted on 89 of elholm's 295 URLs but NOT on all of them (the front page and every area page
     are left-aligned), so it is a per-page generator decision; removing the variant would change
     those 89 pages on desktop too, which is not what was asked and not what anyone has seen.

     Same 768px breakpoint as the rest of this block on purpose: this is the viewport where the copy
     already comes off the photo and onto paper, and a second nearby breakpoint would only create a
     band of widths where the two treatments disagree. */
  .nb-content .nb-head--center,
  .nb-content.nb-head--center{ text-align: start; }
  .nb-content .nb-head--center p{ margin-inline: 0; }
}
