/* Global: tokens (theme "d" as :root), the light surface set, base, buttons, header and mobile menu, footer,
   shared pieces (.tp-stars, .reel video tiles, the lightbox), the global reduced-motion rule and generic .js states.
   Carved from design/style.css (concept approved 23 Oct 2026) in source order; see build/carve/LEDGER.md. */

/* ---------- Tokens: D Navy og logo-blå ---------- */
:root {
  --bg: #0A1020;
  --bg-2: #0E1529;
  --surface: #131C33;
  --line: #24304D;
  --ink: #EEF2F8;
  --muted: #98A0B3;
  --accent: #3D6BFF;
  --accent-lit: #8EC5FF;
  --accent-ink: #FFFFFF;
  --field: #131C33;
  --glow: rgba(61, 107, 255, .2);
  --font-display: "Familjen Grotesk", "Instrument Sans", system-ui, sans-serif;
  --font-text: "Instrument Sans", system-ui, sans-serif;
  --display-wght: 600;
  --display-track: -0.03em;
  --display-italic: italic;
  --radius: 6px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* No CSS smooth scrolling: it breaks GSAP ScrollTrigger's position measuring. Anchor links scroll smoothly via JS instead. */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .5s ease, color .5s ease;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--display-wght); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1240px, 100% - 2 * clamp(16px, 4vw, 48px)); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--bg); padding: .5em 1em; }

.grain {
  position: fixed; inset: -60px; z-index: 90; pointer-events: none;
  filter: url(#grain); opacity: .12; mix-blend-mode: overlay;
}

/* Type scale (perfect fourth-ish, fluid) */
.h-xl, .hero-title, .h-lg {
  font-family: var(--font-display);
  letter-spacing: var(--display-track);
  font-weight: var(--display-wght);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  text-wrap: balance; /* no lone short word on the last line */
}
.h-xl  { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.75rem); line-height: 1.02; }
.h-lg  { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.05; }
.lead  { font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); line-height: 1.55; color: var(--ink); }
.sub, .muted { color: var(--muted); }

/* Buttons */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--h); padding: 0 1.6em;
  font: 600 1rem/1 var(--font-text); letter-spacing: .01em;
  text-decoration: none; border-radius: var(--radius);
  transition: background-color .25s, color .25s, border-color .25s, transform .25s;
}
.btn-sm { --h: 42px; padding: 0 1.15em; font-size: .9rem; }
.btn-solid { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn-ghost { border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-lit); }
/* Hover: the solid button keeps its colours and every button lifts a little (Jannik, 30 Oct). The concept's light
   blue (--accent-lit) left the white text unreadable on the dark surfaces. Mouse only, never with reduced motion. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-2px); }
}

/* Claims awaiting approval (the ?flags switch is gone; the class stays harmless) */
.flag { text-decoration: none; }
html.show-flags .flag { background: rgba(255, 196, 0, .22); outline: 1px dashed #FFC400; outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: 2rem; height: 76px; }
.logo {
  display: block; width: 118px; aspect-ratio: var(--bedri-logo-ratio, 512 / 171); flex: none;
  /* The existing Bedri logo used as a mask: mark in the accent, word in ivory. The logo from Bedri → Indstillinger
     (--bedri-logo, set by inc/assets.php) when there is one, else the theme's copy. */
  background: linear-gradient(90deg, var(--accent) 0 23%, var(--ink) 23%);
  -webkit-mask: var(--bedri-logo, url(../img/logos/bedri-logo.png)) center / contain no-repeat;
          mask: var(--bedri-logo, url(../img/logos/bedri-logo.png)) center / contain no-repeat;
}
.logo-sm { width: 104px; margin-bottom: 1rem; }
.main-nav { display: flex; gap: 2rem; margin-inline: auto; }
.main-nav a { text-decoration: none; font-size: .95rem; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.main-nav a:hover { color: var(--accent-lit); }
.header-cta { display: flex; gap: .6rem; }

.nav-only-mobile { display: none; }
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius); background: none; cursor: pointer; position: relative; flex: none; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 11px; width: 18px; height: 1.5px; background: var(--ink); content: ""; transition: transform .3s, background-color .3s; }
.burger span { top: 20px; }
.burger span::before { left: 0; top: -6px; }
.burger span::after { left: 0; top: 6px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }

.reel { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); border-radius: calc(var(--radius) * 2); }
.reel video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2); }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .75)); pointer-events: none; }
.reel figcaption { position: absolute; left: 1.25rem; right: 4.5rem; bottom: 1.1rem; z-index: 1; font-size: .9rem; color: rgba(255, 255, 255, .78); }
.reel figcaption strong { display: block; font-family: var(--font-display); font-weight: var(--display-wght); font-size: 1.5rem; color: #fff; letter-spacing: var(--display-track); }
.reel-sound {
  position: absolute; right: 1rem; bottom: 1.1rem; z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .25); cursor: pointer; backdrop-filter: blur(6px);
}
.reel-sound::before { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 12px solid #fff; border-block: 7px solid transparent; transform: translateX(2px); }
.reel.is-loud .reel-sound::before { width: 12px; height: 14px; border: 0; border-inline: 4px solid #fff; transform: none; }

/* ---------- Footer ---------- */
.site-footer { padding: 4rem 0 6rem; border-top: 1px solid var(--line); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer address { font-style: normal; color: var(--muted); }
.site-footer nav { display: flex; flex-direction: column; gap: .5rem; }
.site-footer nav a { text-decoration: none; color: var(--muted); }
.site-footer nav a:hover { color: var(--ink); }
/* copyright line in the first column, under the tagline (21 Oct, Jannik) */
.footer-copy { margin: 1.25rem 0 0; font-size: .85rem; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  /* hero start states, revealed by hero.js; scoped to .hero so the logo row is visible anywhere else */
  .js .hero .hero-actions .btn, .js .hero .hero-logos { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
/* 900–1080px: the concept hid "Find sælgere" here, and the burger (with its copy of the link) only comes below 900,
   so companies had no way in from the header on an iPad (Jannik, 6 Nov). Both buttons stay; tighter gaps make room */
@media (max-width: 1080px) {
  .main-nav { gap: 1.25rem; }
}
@media (min-width: 900px) and (max-width: 1080px) {
  .header-inner { gap: 1.5rem; }
  .main-nav a, .header-cta .btn { white-space: nowrap; }
}
/* the narrowest phones: the burger stood 13px past the edge at 320px */
@media (max-width: 360px) {
  .header-inner { gap: .75rem; }
  .header-cta .btn-sm { padding: 0 .9em; }
}
@media (max-width: 899px) {
  .header-cta { margin-left: auto; }
  .header-cta .btn-ghost { display: none; } /* "Find sælgere" is in the menu here (.nav-only-mobile) */
  .burger { display: block; }
  .main-nav {
    display: none; position: absolute; top: 76px; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: .5rem clamp(16px, 4vw, 48px) 1.25rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .main-nav a { padding: .9rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .main-nav .nav-only-mobile { display: block; color: var(--accent); border-bottom: 0; }
  .site-header.nav-open { background: var(--bg); border-bottom-color: var(--line); }
  .site-header.nav-open .main-nav { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Open menu: the page behind is locked (bedri-motion.js), so a menu taller than the screen (a phone on its side)
     scrolls itself. The gutter is kept where scrollbars take room, so nothing jumps sideways (Jannik, 6 Nov) */
  html.nav-lock { overflow: hidden; scrollbar-gutter: stable; }
  .site-header.nav-open .main-nav { max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* D: the logo mark in its original blue-to-cyan gradient, wherever the mark appears */
:root .logo { background: linear-gradient(90deg, #6FD6FF 4%, #3D6BFF 21%, var(--ink) 21.1%); }

/* D: the logo blue is for fills; small text on navy uses the lighter blue for contrast */
:root .stories-sub,
:root .net-label { color: var(--accent-lit); }

/* =====================================================
   "Kartoteket" pass: index cards
   ===================================================== */
:root { --card-r: 6px; --tab-h: 38px; }

/* One radius family for everything card-like */
.reel { border-radius: var(--card-r); }

.h-xl, .h-lg { line-height: 1.05; }

/* =====================================================
   Video lightbox
   ===================================================== */
.reel { cursor: pointer; }
.reel video { transition: transform .8s cubic-bezier(.22, .8, .2, 1), filter .5s; }
.reel:hover video { transform: scale(1.04); filter: grayscale(0); }
.reel-sound { transition: transform .35s cubic-bezier(.22, .8, .2, 1), background-color .3s; }
.reel:hover .reel-sound { transform: scale(1.1); background: var(--accent); border-color: var(--accent); }
.reel-sound::after { content: ""; position: absolute; inset: 0; }
.reel.is-lifted { visibility: hidden; }

html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; }
.lb[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); cursor: zoom-out; }
.lb-frame { position: fixed; margin: 0; overflow: hidden; border-radius: 10px; background: #000; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7); }
.lb-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-cap { position: fixed; left: 0; right: 0; bottom: max(1rem, 3vh); margin: 0; text-align: center; color: var(--muted); font-size: .95rem; pointer-events: none; }
.lb-cap strong { color: var(--ink); font-family: var(--font-display); font-weight: var(--display-wght); font-size: 1.25rem; margin-right: .5rem; }
.lb-close {
  position: fixed; top: 20px; right: 20px; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); background: color-mix(in srgb, var(--bg) 60%, transparent);
  transition: background-color .25s, transform .35s cubic-bezier(.22, .8, .2, 1);
}
.lb-close::before, .lb-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%) rotate(45deg); }
.lb-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.lb-close:hover { background: var(--accent); transform: rotate(90deg); }

/* =====================================================
   20 Oct (client round 2): Trustpilot in the hero, light
   sections, Trustpilot reviews per audience, "Hvem er Bedri"
   ===================================================== */
/* Trustpilot stars: green squares with a white star, the way Trustpilot draws them.
   Sized in em so they follow the text they sit next to. */
/* 23 Nov (Jannik): the overall score in half stars (Bedri_Reviews::score_stars). As on Trustpilot, a half star is
   green on the left and grey on the right, an empty one all grey, the white star over both. The grey is the ink at
   low strength, so it reads on the navy and on the light surfaces alike. */
.tp-stars {
  display: inline-flex; gap: .12em; flex: none;
  --tp-green: #00B67A; --tp-off: color-mix(in srgb, var(--ink) 20%, transparent);
  --tp-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 3.2l2.6 6 6.5.5-5 4.3 1.5 6.4L12 17l-5.6 3.4 1.5-6.4-5-4.3 6.5-.5z'/%3E%3C/svg%3E");
}
.tp-stars i {
  width: 1.05em; height: 1.05em; border-radius: 1px;
  background: var(--tp-star) center / 80% no-repeat, var(--tp-green);
}
.tp-stars i.is-half { background: var(--tp-star) center / 80% no-repeat, linear-gradient(90deg, var(--tp-green) 50%, var(--tp-off) 50%); }
.tp-stars i.is-off { background: var(--tp-star) center / 80% no-repeat, var(--tp-off); }

/* --- Light surface: the same components, re-tokened, so buttons, focus rings, logo glyphs
   and the CTA bands adapt by themselves. Framer's grey is a warm #F2F1EC; this has the same
   lightness but stays neutral, so it sits with the cool paper card (#EEF2F8) in the hero. --- */
.surface-light {
  --bg: #F1F2F4; --bg-2: #E8EBEF; --surface: #FFFFFF; --line: #D9DDE5;
  --ink: #0A1020; --muted: #535B6E;
  --accent: #3D6BFF; --accent-lit: #2449D8; --accent-ink: #FFFFFF; --field: #E8EBEF;
  background: var(--bg); color: var(--ink);
} /* its border-block: 0 is in sections/faq.css, after .faq (load order, see build/carve/LEDGER.md) */

/* --- Hvem er Bedri --- */
.eyebrow { margin: 0 0 1rem; font-size: .9rem; font-weight: 600; color: var(--accent-lit); }

/* =====================================================
   WordPress: the header and footer as core blocks
   Everything above is the concept's CSS (build/carve). The rules below give core's markup the concept's boxes:
   core/navigation renders nav > ul.wp-block-navigation__container > li > a where the concept had nav > a,
   core/buttons wraps each link in a div.wp-block-button, and the footer address is a group (<address>) with one
   paragraph. inc/blocks.php puts the concept's .btn classes on every core/button link.
   ===================================================== */

/* Buttons: the wrapper takes the link's box, so no line box (and no strut) sits around the link; and the link drops
   what core's .wp-block-button__link adds to the concept's .btn (centred and broken text, width and height 100%: a
   percentage width rounds the link's fractional width and moves its text by a fraction of a pixel) */
.wp-block-buttons > .wp-block-button { display: flex; }
.btn.wp-block-button__link { width: auto; height: auto; text-align: inherit; word-break: normal; }
.header-cta { flex-wrap: nowrap; align-items: normal; }

/* Header navigation. Core positions the nav and its items (position: relative, z-index: 1, for submenus, which
   this menu doesn't have); the concept's links aren't positioned, and positioned items make Chrome give the logo and
   the links layers of their own, which changes how the CTA text is anti-aliased (sub-pixel instead of greyscale).
   Below 900px the concept positions the nav itself (the menu panel). */
.main-nav { align-items: normal; }
@media (min-width: 900px) { .main-nav { position: static; } }
.main-nav .wp-block-navigation-item { position: static; }
.main-nav .wp-block-navigation-item__content { z-index: auto; }
.main-nav > .wp-block-navigation__container { flex-direction: inherit; flex-wrap: nowrap; align-items: inherit; gap: inherit; position: static; }
.main-nav .wp-block-navigation-item > .wp-block-navigation-item__content { flex-grow: 1; }
.site-header .main-nav .wp-block-navigation-item > a.wp-block-navigation-item__content { color: color-mix(in srgb, var(--ink) 82%, transparent); }
.site-header .main-nav .wp-block-navigation-item > a.wp-block-navigation-item__content:hover { color: var(--accent-lit); }
.main-nav .wp-block-navigation-item.nav-only-mobile { display: none; }

/* Footer: the address paragraph, and the two link lists (unpositioned, as in the concept) */
.site-footer address > p { margin: 0; }
.site-footer .wp-block-navigation { align-items: normal; position: static; }
.site-footer .wp-block-navigation-item { position: static; }
.site-footer .wp-block-navigation-item__content { z-index: auto; }
.site-footer .wp-block-navigation > .wp-block-navigation__container { flex-direction: column; flex-wrap: nowrap; align-items: normal; gap: inherit; position: static; }
.site-footer .wp-block-navigation-item > .wp-block-navigation-item__content { flex-grow: 1; }
.site-footer .wp-block-navigation-item > a.wp-block-navigation-item__content { color: var(--muted); }
.site-footer .wp-block-navigation-item > a.wp-block-navigation-item__content:hover { color: var(--ink); }
/* Touch: 40px rows for the footer links (they were 24px tall, 8px apart). The padding is the gap now, and the
   negative margin keeps the first and last link's text where it was, in line with the other columns (Jannik, 6 Nov) */
@media (max-width: 899px), (pointer: coarse) {
  .site-footer nav.wp-block-navigation { gap: 0; margin-block: -.5rem; }
  .site-footer .wp-block-navigation-item > a.wp-block-navigation-item__content { padding-block: .5rem; }
}

@media (max-width: 899px) {
  /* the concept hides the ghost link (below 900 since 6 Nov, see Responsive); here its wrapper goes too, or the empty
     wrapper would keep a gap */
  .header-cta > .wp-block-button.is-style-outline { display: none; }
}
@media (max-width: 899px) {
  /* core's `body .is-layout-flex { display: flex }` outranks the concept's `.main-nav { display: none }` */
  .site-header .main-nav { display: none; }
  .main-nav .wp-block-navigation-item.nav-only-mobile { display: flex; }
  .site-header .main-nav .wp-block-navigation-item.nav-only-mobile > a.wp-block-navigation-item__content { color: var(--accent); border-bottom: 0; }
  .site-header .main-nav .wp-block-navigation-item.nav-only-mobile > a.wp-block-navigation-item__content:hover { color: var(--accent-lit); }
}

/* Language switcher (bedri/language-switcher in parts/header.html and parts/footer.html; markup in bedri-core's
   blocks/language-switcher/render.php, behaviour in its view.js). Here with the header and footer rather than in a
   block style: a block style depends on this file, and the first one in the header pulled global.css in ahead of
   core's button styles, whose outline variant then beat the header's ghost button (Jannik, 6 Nov).
   Header: from 900px a 42px button (the burger's box) left of the CTA buttons, with a small panel under it; below
   900px the button goes and the row of names sits at the bottom of the mobile menu (view.js moves it into .main-nav).
   Footer: the bottom row of the footer grid. */
.lang-sw-list { margin: 0; padding: 0; list-style: none; }
.lang-sw a { text-decoration: none; }
.lang-sw-globe { display: block; flex: none; }

/* ---------- Header: the button and its panel ---------- */
.lang-sw.is-header { position: relative; flex: none; display: flex; align-items: center; }
/* the header's flex gap is 2rem (1.5rem to 1080px): the button keeps the CTA buttons' own .6rem to them instead */
.header-inner > .wp-block-bedri-language-switcher { margin-right: -1.4rem; }
.lang-sw-toggle {
  display: inline-flex; align-items: center; gap: .4rem; height: 42px; padding: 0 .7rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: none; cursor: pointer;
  font: 600 .85rem/1 var(--font-text); letter-spacing: .04em; color: color-mix(in srgb, var(--ink) 82%, transparent);
  transition: border-color .25s, color .25s;
}
.lang-sw-toggle:hover, .lang-sw.is-open .lang-sw-toggle { border-color: color-mix(in srgb, var(--ink) 35%, transparent); color: var(--ink); }
.lang-sw-chev { flex: none; transition: transform .25s; }
.lang-sw.is-open .lang-sw-chev { transform: rotate(180deg); }

.lang-sw-panel {
  position: absolute; top: calc(100% + .5rem); right: 0; z-index: 2; min-width: 11rem; padding: .35rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  /* visibility, not display, so the panel can fade; hidden links can't take focus either way */
  visibility: hidden; opacity: 0; transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.lang-sw.is-open .lang-sw-panel { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.lang-sw-panel a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; padding: 0 .75rem;
  border-radius: var(--radius); font-size: .95rem; color: color-mix(in srgb, var(--ink) 82%, transparent);
}
.lang-sw-panel a:hover { background: var(--surface); color: var(--ink); }
.lang-sw-panel a[aria-current] { color: var(--ink); font-weight: 600; }
/* a check mark after the current language */
.lang-sw-panel a[aria-current]::after {
  content: ""; width: 9px; height: 5px; margin-bottom: 3px; border: solid var(--accent-lit); border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg);
}

/* 900–1080px: the header was tuned so both CTA buttons fit from 900px (global.css, Responsive). The button is the
   globe alone here, and below 960px the gaps and the CTA buttons' padding give up the few pixels it needs (only in a
   header that has the switcher) */
@media (max-width: 1080px) {
  .header-inner > .wp-block-bedri-language-switcher { margin-right: -.9rem; }
  .lang-sw-toggle { width: 42px; padding: 0; justify-content: center; }
  .lang-sw-code, .lang-sw-chev { display: none; }
}
@media (min-width: 900px) and (max-width: 959px) {
  .header-inner:has(> .wp-block-bedri-language-switcher) { gap: 1.25rem; }
  .header-inner:has(> .wp-block-bedri-language-switcher) .main-nav { gap: 1rem; }
  .header-inner:has(> .wp-block-bedri-language-switcher) .header-cta .btn-sm { padding: 0 1em; }
  .header-inner > .wp-block-bedri-language-switcher { margin-right: -.75rem; }
}

/* ---------- Header below 900px: no button; the row in the mobile menu ---------- */
.lang-sw-row { display: none; }
@media (max-width: 899px) {
  .header-inner > .wp-block-bedri-language-switcher { display: none; }
  .main-nav .lang-sw-row {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem;
    margin-top: .75rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  }
  .main-nav .lang-sw-row a {
    display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 .25rem;
    border: 1px solid var(--line); border-radius: var(--radius); font-size: .95rem;
    color: color-mix(in srgb, var(--ink) 82%, transparent);
  }
  .main-nav .lang-sw-row a:hover { color: var(--accent-lit); }
  .main-nav .lang-sw-row a[aria-current] { color: var(--ink); font-weight: 600; border-color: var(--accent); background: var(--surface); }
}

/* ---------- Footer: the bottom row of the grid ---------- */
/* (the grid placement, like the header's margins, goes on the block's outer element: in the editor that's a wrapper) */
.footer-grid > .wp-block-bedri-language-switcher { grid-column: 1 / -1; }
.site-footer .lang-sw.is-footer {
  flex-direction: row; align-items: center; gap: .75rem;
  margin-top: .5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted);
}
.lang-sw.is-footer .lang-sw-list { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.lang-sw.is-footer a { color: var(--muted); }
.lang-sw.is-footer a:hover { color: var(--ink); }
.lang-sw.is-footer a[aria-current] { color: var(--ink); text-decoration: underline 1px var(--accent); text-underline-offset: .4em; }
/* Touch: 40px rows, as the footer's link lists above; the negative margin keeps the text where it was */
@media (max-width: 899px), (pointer: coarse) {
  .lang-sw.is-footer .lang-sw-list { margin-block: -.5rem; }
  .lang-sw.is-footer a { display: block; padding-block: .5rem; }
}

/* Templates: page, index, home, archive, search, single and 404 (no approved design yet; built from the concept's spacing) */
.page-main { padding-top: calc(76px + clamp(2.5rem, 9vh, 6rem)); padding-bottom: clamp(5rem, 10vw, 8rem); }
.page-main > h1, .page-main > .wp-block-post-title { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.page-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(1.75rem, 4.5vh, 2.75rem); }
.post-list .wp-block-post { padding-block: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.post-list .wp-block-post-title a { text-decoration: none; }
.post-list .wp-block-post-date { margin: .75rem 0 1rem; font-size: .9rem; }

/* Form card proof (bedri/contact, .kt-proof): a seller reviewer has no face, no photo, icon or initial (client via
   Jannik, 23 Nov), so the row drops the face's column and name, company and stars start where it was. The extra class
   outranks the block's own `.kt-proof li` columns at every breakpoint, whichever sheet loads last. */
.kt-proof li.kt-proof-noface { grid-template-columns: auto; }
