/* V&H Vision – vhvision.hr
   Layout: a blueprint sheet. Sticky title strip; heroes as drawing sheets with corner registration marks;
   brand plates; company data as a drawing title block. Dark = blueprint, light = whiteprint. */
:root {
  --bg: #0b1a2b;
  --bg-raise: #0f2236;
  --fg: #e4edf6;
  --muted: #93a8bf;
  --rule: rgba(150, 195, 240, .22);
  --grid-minor: rgba(120, 190, 255, .045);
  --grid-major: rgba(120, 190, 255, .09);
  --line: #62d0ff;
  --csp: #7f90ff;
  --wy: #ff5c72;
  --vx: #4d8dff;     /* Vexion blue (vexion.app #276efc), lifted for the dark theme */
  --vx-2: #2f6fe0;
  --wa: #25d366;
  --on-accent: #06121f;
  --shade: rgba(3, 10, 20, .92);
  --font-display: "Archivo", "Arial Black", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef2f6; --bg-raise: #ffffff; --fg: #0c1b2b; --muted: #4b5f75; --rule: rgba(12, 40, 70, .17);
    --grid-minor: rgba(10, 90, 160, .045); --grid-major: rgba(10, 90, 160, .09);
    --line: #0866a3; --csp: #1f2fd6; --wy: #c8102e; --vx: #276efc; --vx-2: #2052b8; --on-accent: #ffffff; --shade: rgba(8, 16, 28, .9);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eef2f6; --bg-raise: #ffffff; --fg: #0c1b2b; --muted: #4b5f75; --rule: rgba(12, 40, 70, .17);
  --grid-minor: rgba(10, 90, 160, .045); --grid-major: rgba(10, 90, 160, .09);
  --line: #0866a3; --csp: #1f2fd6; --wy: #c8102e; --vx: #276efc; --vx-2: #2052b8; --on-accent: #ffffff; --shade: rgba(8, 16, 28, .9);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  color: var(--fg);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--line); outline-offset: 3px; }
[id] { scroll-margin-top: 90px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 10px 14px; background: var(--line); color: var(--on-accent); }
.skip:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.wrap {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-left: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(48px, 7vw, 96px); }
.band-tight { padding-block: clamp(32px, 5vw, 64px); }

.eyebrow { margin: 0; font: 500 12px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--line); }
h1, h2, h3 { text-wrap: balance; }
/* long single words (e.g. DE "Verkaufsbedingungen") must not widen the page on phones */
@media (max-width: 480px) { h1, h2 { hyphens: auto; overflow-wrap: break-word; } }
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(2.05rem, 4.5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.015em;
}
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 750;
  font-stretch: 110%;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -.01em;
}
h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-stretch: 106%; font-size: 1.25rem; line-height: 1.2; }
.lead { margin: 0; max-width: 60ch; color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.14rem); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.band-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: clamp(22px, 4vw, 38px); max-width: 64ch; }
.band-head .sub { margin: 0; color: var(--muted); }
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1em; }

/* Corner registration marks */
.marks {
  --brand: var(--line);
  background:
    linear-gradient(var(--brand) 0 0) 0 0 / 18px 2px, linear-gradient(var(--brand) 0 0) 0 0 / 2px 18px,
    linear-gradient(var(--brand) 0 0) 100% 0 / 18px 2px, linear-gradient(var(--brand) 0 0) 100% 0 / 2px 18px,
    linear-gradient(var(--brand) 0 0) 0 100% / 18px 2px, linear-gradient(var(--brand) 0 0) 0 100% / 2px 18px,
    linear-gradient(var(--brand) 0 0) 100% 100% / 18px 2px, linear-gradient(var(--brand) 0 0) 100% 100% / 2px 18px,
    var(--bg-raise);
  background-repeat: no-repeat;
  border: 1px solid var(--rule);
}
.is-csp { --brand: var(--csp); }
.is-vision { --brand: var(--line); }
.is-wy { --brand: var(--wy); }
.is-vexion { --brand: var(--vx); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 18px; border: 0;
  background: var(--line); color: var(--on-accent);
  font: 600 15px/1.1 var(--font-body); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--rule); }
.btn-ghost:hover { border-color: var(--fg); filter: none; }
.btn-wa { background: var(--wa); color: #06210f; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--rule); }
@supports (backdrop-filter: blur(8px)) { .top { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); } }
.top-in { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; min-height: 64px; }
.logo-link { display: flex; align-items: center; padding-block: 10px; text-decoration: none; }
.logo {
  display: block; width: 200px; height: calc(200px * 56 / 659); background: var(--fg);
  -webkit-mask: url(/assets/brand/vh-vision-logo.png) center / contain no-repeat;
  mask: url(/assets/brand/vh-vision-logo.png) center / contain no-repeat;
}
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a { padding: 8px 9px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--line); }
.nav .nav-login { display: none; }
.nav > a { display: inline-flex; align-items: center; min-height: 44px; }
.nav-brands { --cap: 16px; position: relative; display: flex; height: 44px; margin-right: 6px; padding-right: 6px; }
.nav-brands::after, .nav .bn + .bn::before {
  content: ""; position: absolute; top: 12px; bottom: 12px; width: 1px; background: var(--rule);
}
.nav-brands::after { right: 0; }
.nav .bn + .bn::before { left: 0; }
.nav .bn {
  --ink: var(--muted); --ink-2: var(--muted);
  position: relative; display: flex; align-items: center; justify-content: center; padding: 0 10px;
}
.bn-mark { position: relative; display: flex; align-items: center; }
.bn-label { display: none; }
.nav .bn .csp-logo, .nav .bn .vision-word { background: var(--ink); transition: background-color .15s; }
.nav .bn .wy-mark { --wy: var(--ink); --fg: var(--ink-2); }   /* WY_MARK paints with var(--wy) and var(--fg) */
.nav .bn .vx-logo { --vx: var(--ink); --vx-2: var(--ink); --fg: var(--ink-2); color: var(--ink-2); transition: color .15s; }
.bn-ext { position: absolute; left: calc(100% + 2px); top: -1px; font: 500 10px/1 var(--font-body); color: var(--ink); }
.nav .bn:hover, .nav .bn:focus-visible, .nav .bn[aria-current="page"] { --ink: var(--brand); --ink-2: var(--fg); }
.nav .bn[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); }
.nav .bn:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tools { display: flex; align-items: center; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--rule); }
.seg > * {
  display: inline-flex; align-items: center; padding: 8px 9px; border: 0; background: transparent; color: var(--muted);
  font: 500 12px/1 var(--font-mono); letter-spacing: .06em; cursor: pointer; text-decoration: none;
}
.seg > * + * { border-left: 1px solid var(--rule); }
.seg > [aria-pressed="true"], .seg > [aria-current="true"] { background: var(--fg); color: var(--bg); }
.langs { position: relative; }
.langs summary {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border: 1px solid var(--rule);
  color: var(--fg); font: 500 12px/1 var(--font-mono); letter-spacing: .06em; cursor: pointer; list-style: none;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { width: 16px; height: 16px; }
.langs[open] summary { border-color: var(--fg); }
.langs ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 168px; margin: 0; padding: 6px; list-style: none;
  background: var(--bg-raise); border: 1px solid var(--rule); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.langs a { display: flex; gap: 10px; padding: 9px 10px; color: var(--fg); text-decoration: none; font-size: 14.5px; }
.langs a b { width: 24px; font: 600 12px/1.6 var(--font-mono); color: var(--muted); }
.langs a:hover { background: color-mix(in srgb, var(--line) 14%, transparent); }
.langs a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--line); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 34px; padding: 0; border: 1px solid var(--rule); background: transparent; color: var(--fg); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.btn-login { padding: 9px 13px; border: 1px solid var(--line); color: var(--line); font: 600 13px/1 var(--font-body); text-decoration: none; white-space: nowrap; }
.btn-login:hover { background: var(--line); color: var(--on-accent); }
.menu-btn { display: none; }
@media (max-width: 1039px) {
  .logo-link { margin-right: auto; }
  .logo { width: 158px; height: calc(158px * 56 / 659); }
  .menu-btn { display: grid; }
  .tools .btn-login { display: none; }
  .nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; margin: 0; padding-bottom: 12px; border-top: 1px solid var(--rule); }
  .top.open .nav { display: flex; }
  .nav a { padding: 13px 2px; font-size: 16px; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--line); padding-left: 12px; }
  .nav .nav-login { display: block; color: var(--line); }
}
@media (max-width: 1039px) {
  .nav-brands { display: block; height: auto; margin: 0; padding: 0; }
  .nav-brands::after, .nav .bn + .bn::before { content: none; }
  .nav .bn {
    display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; align-items: center; justify-content: normal;
    min-height: 60px; padding: 8px 2px; border-bottom: 1px solid var(--rule);
  }
  .bn-mark { justify-self: start; }
  .bn-label { display: block; font-size: 16px; line-height: 1.3; }
  .nav .bn[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); padding-left: 12px; }
}

/* Sub navigation (CSP section) */
.subnav { border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--bg-raise) 55%, transparent); }
/* Brand sections (CSP): the sub-navigation sticks under the header; scrolling down hides the header so only the
   brand bar stays on top, scrolling up brings the header back (site.js adds html.hdr-hidden, --hdr-h = header height). */
.subnav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hdr-h, 64px)); z-index: 19; transition: top .25s ease; }
@supports (backdrop-filter: blur(8px)) { .subnav { background: color-mix(in srgb, var(--bg-raise) 80%, var(--bg)); backdrop-filter: blur(10px); } }
@supports not (backdrop-filter: blur(8px)) { .subnav { background: var(--bg-raise); } }
.top { transition: transform .25s ease; }
html.hdr-hidden .top { transform: translateY(-100%); }
html.hdr-hidden .subnav { top: env(safe-area-inset-top, 0px); }
html.has-subnav [id] { scroll-margin-top: 140px; }
@media (prefers-reduced-motion: reduce) { .top, .subnav { transition: none; } }
.subnav-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; padding-block: 10px; }
.subnav-brand { display: inline-flex; align-items: center; margin-right: 10px; text-decoration: none; }
.subnav a.chip { padding: 6px 10px; font-size: 13.5px; color: var(--muted); text-decoration: none; border: 1px solid transparent; }
.subnav a.chip:hover { color: var(--fg); }
.subnav a.chip[aria-current="page"] { color: var(--fg); border-color: var(--csp); }
@media (max-width: 699px) {
  .subnav-in { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .subnav-in::-webkit-scrollbar { display: none; }
  .subnav a.chip { flex: none; white-space: nowrap; }
}
/* VISION sub-navigation (VISION page and the portal at /portal/, via site/assets/portal/header.<lang>.html):
   same bar as CSP, VISION word mark and the VISION accent (--brand = --line from .is-vision) for the current item */
.vision-word.sm { height: 13px; width: calc(13px * 404 / 56); max-width: none; }
.subnav.is-vision .subnav-brand { flex: none; }
.subnav.is-vision a.chip[aria-current="page"] { border-color: var(--brand); }

/* Brand marks */
.csp-logo {
  display: block; width: 92px; height: calc(92px * 222 / 640); background: var(--csp);
  -webkit-mask: url(/assets/brand/csp-logo.png) center / contain no-repeat;
  mask: url(/assets/brand/csp-logo.png) center / contain no-repeat;
}
.csp-logo.sm { width: 54px; height: calc(54px * 222 / 640); }
.csp-logo.lg { width: 150px; height: calc(150px * 222 / 640); }
.vision-word {
  display: block; height: 26px; width: calc(26px * 404 / 56); max-width: 100%; background: var(--line);
  -webkit-mask: url(/assets/brand/vh-vision-logo.png) right center / auto 100% no-repeat;
  mask: url(/assets/brand/vh-vision-logo.png) right center / auto 100% no-repeat;
}
.vision-word.lg { height: 38px; width: calc(38px * 404 / 56); }
.wy-mark { display: block; height: 64px; width: auto; }
.brand-scale .csp-logo    { flex: none; width: calc(var(--cap, 16px) * 2.9907); height: calc(var(--cap, 16px) * 1.0374); }
.brand-scale .vision-word { flex: none; width: calc(var(--cap, 16px) * 5.0939); height: calc(var(--cap, 16px) * .7061); max-width: none; }
.brand-scale .wy-mark     { flex: none; width: calc(var(--cap, 16px) * 1.92); height: calc(var(--cap, 16px) * 2.4); }
/* Vexion: mark + word mark, one line, as on vexion.app */
.vx-logo { display: inline-flex; align-items: center; gap: .3em; color: var(--fg); white-space: nowrap; }
.vx-mark { display: block; width: auto; height: 1.05em; }
.vx-word { font: 750 1em/1 var(--font-display); letter-spacing: -.01em; }
.brand-scale .vx-logo { flex: none; font-size: calc(var(--cap, 16px) * 1.1); }

/* ---------- Heroes ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 64px);
  align-items: center; padding-block: clamp(36px, 6vw, 88px) clamp(24px, 4vw, 48px);
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
.hero-meta { margin: 0; font: 400 13px/1.5 var(--font-mono); color: var(--muted); }
.sheet { margin: 0; padding: clamp(8px, 1.6vw, 14px); min-width: 0; }
.sheet img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.sheet figcaption { margin-top: 8px; font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
.crumbs { margin: 0; font: 400 12.5px/1.4 var(--font-mono); color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
@media (max-width: 899px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero-solo { grid-template-columns: minmax(0, 46rem); padding-bottom: clamp(8px, 2vw, 20px); }
/* home hero: heading left, company text right (one column below 900px); short, so the brand plates show in the first screen */
.hero-home { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: end;
             padding-block: clamp(28px, 4.5vw, 64px) clamp(16px, 2.6vw, 32px); }
.hero-head { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero-head h1 { margin: 0; max-width: 14ch; }
.hero-home .hero-text { gap: 14px; }
.hero-home .lead { max-width: 58ch; }
.hero-sub { margin: 0; max-width: 58ch; color: var(--muted); }
@media (max-width: 899px) { .hero-home { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 18px; } }
/* home: the grandstand section drawing as a faint background detail behind the brand plates */
.has-bg { position: relative; isolation: isolate; }
.plates-bg { position: absolute; z-index: -1; top: clamp(8px, 2vw, 28px); right: 0; width: min(720px, 62%); opacity: .16; pointer-events: none; }
.plates-bg svg { display: block; width: 100%; height: auto; }
.plates-bg .cap, .plates-bg .cap2 { display: none; }
@media (max-width: 939px) { .plates-bg { width: 100%; opacity: .1; } }

/* Hero with background video (optional, see BG_VIDEO in src/pages.py) */
.hero-band { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero-band .hero { min-height: clamp(440px, 60vh, 620px); }
.bgv { position: absolute; inset: 0; z-index: -2; background: var(--bg-raise); }
.bgv video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(var(--grid-major) 1px, transparent 1px) 0 0 / 100px 100px,
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px) 0 0 / 100px 100px,
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 38%, color-mix(in srgb, var(--bg) 45%, transparent) 72%, color-mix(in srgb, var(--bg) 25%, transparent) 100%);
}
.bgv-toggle {
  position: absolute; z-index: 1;
  right: max(16px, env(safe-area-inset-right, 0px)); bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--rule); background: color-mix(in srgb, var(--bg) 75%, transparent); color: var(--fg);
  font: 500 12px/1 var(--font-mono); letter-spacing: .06em; cursor: pointer;
}
.bgv-toggle:hover { border-color: var(--fg); }
.bgv-toggle svg { width: 14px; height: 14px; }
.bgv-toggle .i-pause { display: none; }
.bgv-toggle[aria-pressed="true"] .i-pause { display: inline; }
.bgv-toggle[aria-pressed="true"] .i-play { display: none; }
@media (max-width: 899px) {
  .hero-band .hero { min-height: 0; padding-bottom: 72px; }
  .hero-band::before {
    background:
      linear-gradient(var(--grid-major) 1px, transparent 1px) 0 0 / 100px 100px,
      linear-gradient(90deg, var(--grid-major) 1px, transparent 1px) 0 0 / 100px 100px,
      color-mix(in srgb, var(--bg) 84%, transparent);
  }
}

/* Grandstand section drawing */
.drawing { display: block; width: 100%; height: auto; }
.drawing text { font-family: var(--font-mono); font-size: 10px; fill: var(--line); }
.drawing .cap { fill: var(--fg); font-size: 10.5px; letter-spacing: .12em; }
.drawing .cap2 { fill: var(--muted); letter-spacing: .04em; }
.drawing .ground { stroke: var(--fg); stroke-width: 1.2; }
.drawing .hatch-l { stroke: var(--muted); stroke-width: 1; opacity: .55; }
.drawing .dim path { fill: none; stroke: var(--line); stroke-width: .8; }
.drawing .dim .tick { stroke-width: 1.3; }
.drawing .ghost { stroke: var(--fg); stroke-width: 1.6; opacity: .25; }
.drawing .ink { stroke: var(--fg); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 2.4s cubic-bezier(.55, .1, .2, 1) .25s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .drawing .ink { animation: none; } }

/* ---------- Brand plates (home) ---------- */
.plate-link { color: var(--brand); font-size: 14px; font-weight: 500; }
.plates { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.plate {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 28px clamp(18px, 2vw, 24px) 24px; transition: border-color .2s;
}
.plate:hover { border-color: var(--brand); }
/* the whole card is the link: the h3 link's ::after covers the card (.plate is its containing block) */
.plate-go { color: inherit; text-decoration: none; }
.plate-go::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.plate-go:focus-visible { outline: none; }
.plate:has(.plate-go:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
/* "open" arrow in the top right corner of the card (inside the corner marks), filled with the brand colour on hover */
.plate-arrow { position: absolute; top: 22px; right: 22px; z-index: 3; display: grid; place-items: center; width: 36px; height: 36px;
               border: 1px solid color-mix(in srgb, var(--brand) 75%, transparent); background: color-mix(in srgb, var(--bg) 72%, transparent);
               color: var(--fg); font: 400 18px/1 var(--font-body); pointer-events: none; transition: background .2s, color .2s; }
.plate:hover .plate-arrow, .plate:has(.plate-go:focus-visible) .plate-arrow { background: var(--brand); color: var(--on-accent); }
.plate:hover .plate-media video.on { filter: brightness(1.12); }
@media (prefers-reduced-motion: reduce) { .plate-arrow { transition: none; } }
.plate-mark {
  --cap: 30px;
  display: flex; align-items: center; box-sizing: content-box; height: calc(var(--cap) * 2.4);
  margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px dashed var(--rule);
}
.plate h3 { margin: 0 0 10px; }
.plate-text { margin: 0 0 16px; color: var(--muted); }
.plate .ticks { gap: 0; margin: 0 0 20px; }
.plate .ticks li { padding-block: 4px; }
.plate-facts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 12px; align-items: baseline;
  margin: auto 0 0; padding-top: 12px; border-top: 1px dashed var(--rule);
}
.plate-facts dt { font: 500 10.5px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.plate-facts dd { margin: 0; font: 400 12.5px/1.5 var(--font-mono); color: var(--fg); overflow-wrap: anywhere; }
/* four brands: 1 column on phones, 2 × 2 on tablets and small laptops, 4 in a row from 1200 px */
@media (min-width: 700px) and (max-width: 1199px) { .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .plates { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } .plate { padding-inline: 18px; } .plate-mark { --cap: 26px; } }
@media (max-width: 599px) { .plate-mark { --cap: 26px; } }
/* plates with a story in the background: a muted loop over its poster, faded into the card under the text */
/* The size container is .plates, not .plate: containment on a plate would stop it being a subgrid.
   --pw is one card's width (1 column below 700 px, 2 with a 20 px gap up to 1199 px, 4 with 16 px gaps above). */
.plates { container-type: inline-size; --pw: 100cqi; }
@media (min-width: 700px) { .plates { --pw: calc((100cqi - 20px) / 2); } }
@media (min-width: 1200px) { .plates { --pw: calc((100cqi - 48px) / 4); } }
.plate.has-media { position: relative; overflow: hidden; isolation: isolate; }
/* the logo sits on the lower, faded part of the 16:9 clip (40% of the card width ≈ 70% of the clip height) */
.plate.has-media .plate-mark { padding-top: calc(var(--pw) * .40); border-bottom-color: color-mix(in srgb, var(--fg) 25%, transparent); }
/* align/justify-self: stretch – the plates' "align-self: start" would shrink this abspos layer to its (empty) content */
.plate > .plate-media { position: absolute; inset: 0; grid-area: 1 / 1 / -1 / -1; align-self: stretch; justify-self: stretch; z-index: -1;
                        background: var(--bg-raise) center top / 100% auto no-repeat; }
.plate-media video { position: absolute; inset: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; opacity: 0; transition: opacity .8s ease; }
.plate-media video.on { opacity: 1; }
.plate-media::after { content: ""; position: absolute; inset: 0 0 auto; aspect-ratio: 16 / 9.2;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-raise) 18%, transparent) 0%, color-mix(in srgb, var(--bg-raise) 30%, transparent) 40%,
                                      color-mix(in srgb, var(--bg-raise) 82%, transparent) 78%, var(--bg-raise) 99%); }
.plate-code { position: absolute; z-index: 1; inset: 10px 12px auto; max-height: calc(var(--pw) * .42); margin: 0; overflow: hidden;
              font: 400 10px/1.45 var(--font-mono); color: var(--line); opacity: .8; white-space: pre; pointer-events: none;
              mask-image: linear-gradient(180deg, #000 55%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); }
.plate-code code { display: block; animation: code-scroll 26s linear infinite; }
@keyframes code-scroll { from { transform: translateY(0); } to { transform: translateY(-45%); } }
@media (prefers-reduced-motion: reduce) { .plate-code code { animation: none; } .plate-media video { transition: none; } }
/* static blueprint picture instead of a video (Vexion: a sheet-metal nesting layout), same place as the clips */
.plate-svg svg { position: absolute; inset: 0 0 auto; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
/* one row of cards only (4 columns): the subgrid lines the titles, texts and lists up across the cards */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1200px) {
    .plates {
      row-gap: 0;
      grid-template-rows: [mark] auto [title] auto [text] auto [list] auto auto auto [facts] auto [end];
    }
    .plate { display: grid; grid-row: mark / end; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .plate > * { align-self: start; }
    .plate-mark { grid-row: mark; }
    .plate h3 { grid-row: title; }
    .plate-text { grid-row: text; }
    .plate .ticks { grid-row: list / facts; grid-template-rows: subgrid; row-gap: 0; }
    .plate-facts { grid-row: facts; margin-top: 0; }
  }
}

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ticks li { display: flex; align-items: baseline; gap: 10px; }
.ticks li::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--brand, var(--line)); transform: translateY(-1px); }
.pill { padding: 3px 8px; border: 1px dashed var(--muted); color: var(--muted); font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Photo strip / product cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; min-width: 0; text-decoration: none; background: var(--bg-raise); border: 1px solid var(--rule); transition: border-color .2s; }
.card:hover { border-color: var(--brand, var(--line)); }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.card-body p { margin: 0; color: var(--muted); font-size: 15px; }
.card-go { margin-top: auto; padding-top: 6px; color: var(--brand, var(--line)); font: 600 13px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 939px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Specs / title block ---------- */
.tblock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1.5px solid var(--fg); }
.tblock.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tblock.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; background: var(--bg-raise); }
.cell.w2 { grid-column: span 2; }
.cell.w3 { grid-column: span 3; }
.k { font: 500 10.5px/1.25 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.v { font-size: 15px; overflow-wrap: anywhere; }
.v.mono { font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.v.strong { font-family: var(--font-display); font-stretch: 112%; font-weight: 750; font-size: 1.05rem; }
.v.big { font-family: var(--font-display); font-stretch: 108%; font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
@media (max-width: 759px) {
  .tblock, .tblock.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell.w3 { grid-column: span 2; }
}
@media (max-width: 459px) {
  .tblock, .tblock.cols-3, .tblock.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .cell.w2, .cell.w3 { grid-column: auto; }
}

/* Product features: photo with numbered pins + numbered legend */
.feat { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.feat-fig { margin: 0; padding: clamp(8px, 1.6vw, 14px); min-width: 0; }
.feat-img { position: relative; }
.feat-img img { display: block; width: 100%; height: auto; }
.feat-fig figcaption { margin-top: 8px; font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
.feat-pin, .feat-list li::before {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand, var(--line)); color: var(--on-accent); font: 600 14px/1 var(--font-mono);
}
.feat-pin { position: absolute; transform: translate(-50%, -50%); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand, var(--line)) 35%, transparent), 0 2px 8px rgba(0, 0, 0, .45); }
.feat-list { list-style: none; counter-reset: feat; margin: 0; padding: 0; display: grid; gap: 14px; }
.feat-list li { counter-increment: feat; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px dashed var(--rule); }
.feat-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.feat-list li::before { content: counter(feat); }
@media (max-width: 899px) { .feat { grid-template-columns: minmax(0, 1fr); } .feat-pin { width: 24px; height: 24px; font-size: 12px; } }
/* Tabs */
.tab-list { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: thin; }
.tabs:not(.js) .tab-list { display: none; }
.tabs.js .tab-h { display: none; }
.tab-list [role="tab"]:focus-visible { outline-offset: -3px; }
.tab-list [role="tab"] { flex: none; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted);
  font: 500 14px/1.2 var(--font-body); cursor: pointer; white-space: nowrap; }
.tab-list [role="tab"]:hover { color: var(--fg); }
.tab-list [role="tab"][aria-selected="true"] { color: var(--fg); border-bottom-color: var(--brand, var(--line)); }
.tab-panel { padding-top: 16px; }
.tab-h { margin: 14px 0 6px; font-size: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.split.wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
@media (max-width: 859px) { .split, .split.wide-left { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.note { margin: 0; padding: 16px 18px; border-left: 3px solid var(--line); background: color-mix(in srgb, var(--bg-raise) 80%, transparent); }
.note strong { display: block; margin-bottom: 4px; font: 600 12px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--line); }

/* Product variants (backstops, curtains) */
.variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.variant { display: flex; flex-direction: column; min-width: 0; background: var(--bg-raise); border: 1px solid var(--rule); }
.variant .shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 2px; }
.variant .shots button { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.variant .shots img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.variant-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; }
.variant-body .std { margin: 0; font: 400 12.5px/1.5 var(--font-mono); color: var(--muted); }
@media (max-width: 759px) { .variants { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Galleries ---------- */
.projects { display: grid; gap: clamp(28px, 4vw, 44px); }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 12px; }
.project-head h3 { font-size: 1.12rem; }
.cc { display: inline-block; min-width: 34px; padding: 4px 6px; border: 1px solid var(--csp); color: var(--csp); font: 600 11.5px/1 var(--font-mono); letter-spacing: .08em; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gallery button { display: block; padding: 0; border: 1px solid var(--rule); background: var(--bg-raise); cursor: zoom-in; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery button:hover img { opacity: .88; }
@media (max-width: 859px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 539px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.refgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.refgrid figure { margin: 0; min-width: 0; }
.refgrid button { display: block; width: 100%; padding: 0; border: 1px solid var(--rule); background: var(--bg-raise); cursor: zoom-in; }
.refgrid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.refgrid figcaption { margin-top: 6px; font-size: 13.5px; line-height: 1.35; }
.refgrid figcaption span { display: block; font: 400 11px/1.3 var(--font-mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 939px) { .refgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .refgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.reflists { display: grid; gap: 28px; }
.reflist-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 1.05rem; }
.reflist-h span { font: 500 12px/1 var(--font-mono); color: var(--muted); }
.reflist { columns: 5 168px; column-gap: 24px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.reflist.intl { columns: 3 260px; }
.reflist li { break-inside: avoid; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 4px 0; border-bottom: 1px solid var(--rule); font-size: 14px; line-height: 1.4; }
.reflist li .cc { min-width: 28px; padding: 2px 4px; font-size: 10.5px; }
.reflist li small { color: var(--muted); font-size: 11.5px; }
.ref-countries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ref-countries li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); }

/* YouTube click-to-play cards and native video cards */
.ytgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.yt { margin: 0; min-width: 0; }
.yt-play { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--rule); background: #000; cursor: pointer; aspect-ratio: 16 / 9; overflow: hidden; }
.yt-play img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .2s; }
.yt-play:hover img { transform: scale(1.03); opacity: .9; }
.yt-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 66px; height: 46px; border-radius: 12px; background: rgba(0, 0, 0, .66); color: #fff; transition: background .2s; }
.yt-icon svg { width: 26px; height: 26px; }
.yt-play:hover .yt-icon, .yt-play:focus-visible .yt-icon { background: #e00; }
.yt-dur { position: absolute; right: 8px; bottom: 8px; padding: 3px 6px; background: rgba(0, 0, 0, .78); color: #fff; font: 500 12px/1 var(--font-mono); }
.yt iframe, .yt video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--rule); background: #000; }
.yt figcaption { margin-top: 8px; font-size: 14.5px; line-height: 1.35; }
.yt figcaption span { display: block; margin-top: 3px; font: 400 11.5px/1.3 var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.yt figcaption .yt-note { font: 400 12px/1.4 var(--font-body); letter-spacing: 0; }
.yt figcaption .yt-note a { color: var(--muted); }

/* ---------- CSP story: numbers, timeline, process ---------- */
.story .band-head .sub { max-width: 70ch; }
.story-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 26px 0 34px; padding: 0; border: 1px solid var(--rule); }
.story-num { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.story-num + .story-num { border-left: 1px solid var(--rule); }
.story-num .n { font: 700 clamp(2rem, 4.2vw, 3.2rem)/1 var(--font-display); font-stretch: 112%; color: var(--csp, var(--line)); }
.story-num .k { font: 400 12.5px/1.4 var(--font-mono); letter-spacing: .04em; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7.5rem; top: 6px; bottom: 6px; width: 1px; background: var(--line); opacity: .45; }
.timeline li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0 28px; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(7.5rem - 4px); top: 17px; width: 9px; height: 9px; border-radius: 50%;
                       background: var(--bg); border: 2px solid var(--line); }
.tl-year { font: 500 13px/1.6 var(--font-mono); letter-spacing: .06em; color: var(--line); padding-top: 3px; text-align: right; padding-right: 22px; }
.tl-body h3 { margin: 0 0 3px; font-size: 1.12rem; }
.cs-1991 { display: block; width: clamp(96px, 11vw, 132px); aspect-ratio: 430 / 189; margin: 2px 0 10px; background: var(--csp, var(--line));
           -webkit-mask: url(/assets/brand/cs-1991-logo.png) center / contain no-repeat; mask: url(/assets/brand/cs-1991-logo.png) center / contain no-repeat; }
@media (forced-colors: active) { .cs-1991 { background: CanvasText; } }
.tl-body p { margin: 0; color: var(--muted); max-width: 64ch; }
.story-sub { margin: 40px 0 14px; font-size: 1.3rem; }
.innov { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.innov li { padding: 14px 16px; border: 1px solid var(--rule); border-top: 2px solid var(--csp, var(--line)); background: var(--bg-raise); }
.innov h3 { margin: 0 0 6px; font-size: 1rem; }
.innov p { margin: 0; font-size: 14.5px; color: var(--muted); }
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.process li { padding: 14px 16px 6px 0; position: relative; }
.process li + li { padding-left: 16px; border-left: 1px dashed var(--rule); }
.pr-no { font: 500 12px/1 var(--font-mono); color: var(--line); letter-spacing: .1em; }
.process h3 { margin: 8px 0 4px; font-size: 1.02rem; }
.process p { margin: 0; font-size: 14.5px; color: var(--muted); }
@media (max-width: 899px) {
  .story-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-num:nth-child(3) { border-left: 0; }
  .story-num:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .process { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .process li, .process li + li { padding: 12px 0 12px 16px; border-left: 1px solid var(--line); }
}
@media (max-width: 599px) {
  .timeline::before { left: 4px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); padding-left: 24px; }
  .timeline li::before { left: 0; }
  .tl-year { text-align: left; padding-right: 0; }
}

/* ---------- Legal pages ---------- */
.legal h1 { margin: 10px 0 12px; }
.legal .lead { max-width: 66ch; }
.legal-toc ol { margin: 18px 0 8px; padding: 12px 16px 12px 34px; border: 1px solid var(--rule); background: var(--bg-raise); max-width: 66ch;
                columns: 2; column-gap: 28px; font-size: 14.5px; }
.legal-toc li { break-inside: avoid; padding: 2px 0; }
.legal-body { max-width: 76ch; }
.legal-sec { padding-top: 18px; scroll-margin-top: 90px; }
.legal-sec h2 { font-size: 1.35rem; margin: 10px 0 8px; }
.legal-dl { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0; margin: 0 0 14px; border-top: 1px solid var(--rule); }
.legal-dl dt, .legal-dl dd { margin: 0; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); }
.legal-dl dt { color: var(--muted); font: 400 12.5px/1.5 var(--font-mono); letter-spacing: .04em; }
.tbl-scroll { overflow-x: auto; margin: 6px 0 14px; }
.legal-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.legal-table th, .legal-table td { padding: 9px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.legal-table th { font: 500 11px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 599px) {
  .legal-toc ol { columns: 1; }
  .legal-dl { grid-template-columns: minmax(0, 1fr); }
  .legal-dl dt { border-bottom: 0; padding-bottom: 0; }
}
.foot-bottom a { color: inherit; }
@media (max-width: 939px) { .ytgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .ytgrid { grid-template-columns: minmax(0, 1fr); } }

/* Numbered steps (a real sequence: VISION activation) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.steps li { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 14px; border-top: 2px solid var(--line); }
.steps .step-n { font: 600 13px/1 var(--font-mono); letter-spacing: .1em; color: var(--line); }
.steps h3 { font-size: 1.08rem; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 939px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 539px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Video / download */
.video { margin: 0; }
.video video { display: block; width: 100%; height: auto; background: #000; border: 1px solid var(--rule); }
.video figcaption { margin-top: 8px; font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
.download { display: flex; align-items: center; gap: 16px; padding: 16px 18px; text-decoration: none; }
.download .ext { flex: none; display: grid; place-items: center; width: 48px; height: 58px; border: 1.5px solid var(--line); color: var(--line); font: 600 12px/1 var(--font-mono); }
.download strong { display: block; }
.download span { color: var(--muted); font-size: 14px; }
/* document sent by e-mail */
.dl-form { display: grid; gap: 10px; align-items: stretch; }
.dl-head { display: flex; align-items: center; gap: 16px; }
.dl-label { font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-row input { flex: 1 1 180px; min-width: 0; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 0; background: var(--bg); color: var(--fg); font: 16px/1.4 var(--font-body); }
.dl-row input:focus { outline: 2px solid var(--line); outline-offset: 0; border-color: var(--line); }
.dl-more summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.dl-more .dl-row { margin-top: 8px; }
.dl-field { display: grid; gap: 6px; flex: 1 1 180px; min-width: 0; }
.dl-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* News */
.news { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 48px); }
.news li { display: flex; flex-direction: column; gap: 8px; padding: 20px 0 22px; border-top: 1px solid var(--rule); min-width: 0; }
.news h3 { font-family: var(--font-body); font-stretch: 100%; font-size: 1.06rem; font-weight: 600; line-height: 1.35; }
.news p { margin: 0; color: var(--muted); font-size: 15px; }
.tag { align-self: flex-start; padding: 5px 7px; border: 1px solid var(--brand); color: var(--brand); font: 600 11px/1 var(--font-mono); letter-spacing: .1em; }
@media (max-width: 759px) { .news { grid-template-columns: minmax(0, 1fr); } }

.post { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); padding-block: clamp(28px, 4vw, 44px); border-top: 1px solid var(--rule); align-items: start; }
.post-media img, .post-media video { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: var(--bg-raise); }
.post-body { display: flex; flex-direction: column; gap: 12px; }
.post-body p { margin: 0; }
@media (max-width: 799px) { .post { grid-template-columns: minmax(0, 1fr); } }
/* news: link card to the CSP Instagram profile (plain link, no embed); scoped to .ig-band, the feed cards below share class names */
.ig-band { padding-top: 0; }
.ig-band .ig-card { display: flex; align-items: center; gap: 16px 20px; padding: 18px 22px; color: var(--fg); text-decoration: none; transition: border-color .2s; }
.ig-band .ig-card:hover { border-color: var(--brand); }
.ig-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--brand); color: var(--brand); }
.ig-icon svg { width: 28px; height: 28px; }
.ig-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ig-band .ig-title { font: 600 1.12rem/1.3 var(--font-body); }
.ig-sub { font: 400 12.5px/1.5 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.ig-band .ig-go { flex: none; min-width: 0; padding: 10px 14px; border: 1px solid var(--brand); font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.ig-band .ig-card:hover .ig-go { background: var(--brand); color: var(--on-accent); }
@media (max-width: 599px) { .ig-band .ig-card { flex-wrap: wrap; } .ig-band .ig-go { width: 100%; white-space: normal; text-align: center; } }

/* ---------- Contact ---------- */
.c-lines { display: grid; gap: 22px; }
.c-item { display: flex; flex-direction: column; gap: 6px; }
.c-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.c-big { font-family: var(--font-display); font-stretch: 106%; font-weight: 650; font-size: clamp(1.12rem, 2.1vw, 1.45rem); overflow-wrap: anywhere; text-decoration: none; }
a.c-big:hover { color: var(--line); }
.copy { padding: 7px 9px; border: 1px solid var(--rule); background: transparent; color: var(--muted); font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.copy:hover { color: var(--fg); border-color: var(--fg); }
.c-small { color: var(--muted); font-size: 14px; }
/* contact card: head office, phone/e-mail cells, contact person with "Save contact" (vCard) */
.c-card { margin: 0; padding: 0; border: 1px solid var(--rule); background: var(--bg-raise); }
.c-head { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px 20px; border-bottom: 1px solid var(--rule); }
.c-head .c-big { margin-top: 4px; }
.c-addr { font-size: 1.05rem; }
.c-head .c-small { margin-top: 6px; }
.c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--rule); }
.c-cell { padding: 18px 24px; min-width: 0; }
.c-cell + .c-cell { border-left: 1px solid var(--rule); }
.c-cell dt { font: 500 11px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.c-cell dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.c-val { font-family: var(--font-display); font-stretch: 104%; font-weight: 650; font-size: clamp(1.05rem, 1.6vw, 1.22rem); text-decoration: none; overflow-wrap: anywhere; }
a.c-val:hover { color: var(--line); }
.c-person { display: flex; gap: 18px; align-items: center; padding: 20px 24px; }
.c-person img { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--rule); flex: none; }
.c-person-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.c-person-txt strong { font-size: 1.1rem; }
.c-vcard { margin-top: 10px; }
.c-head .k, .c-person-txt .k { font: 500 11px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 599px) {
  .c-grid { grid-template-columns: minmax(0, 1fr); }
  .c-cell + .c-cell { border-left: 0; border-top: 1px solid var(--rule); }
  .c-head, .c-cell, .c-person { padding-inline: 18px; }
}
.person { display: flex; gap: 16px; align-items: center; }
.person img { width: 84px; height: 84px; object-fit: cover; border: 1px solid var(--rule); }
.qr { width: 132px; height: auto; border: 1px solid var(--rule); background: #fff; padding: 6px; }
.form { display: grid; gap: 14px; padding: clamp(18px, 3vw, 28px); }
.form label { display: grid; gap: 6px; font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--rule); border-radius: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.4 var(--font-body); letter-spacing: normal; text-transform: none;
}
.form textarea { min-height: 128px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--line); outline-offset: 0; border-color: var(--line); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form .btn { justify-self: start; }
.form-status { margin: 0; font: 400 13.5px/1.5 var(--font-mono); color: var(--line); }
.form-status.err { color: var(--wy); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 479px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.form-row { align-items: end; }            /* a label on two lines does not push its field out of line */
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 479px) { .form-row-3 { grid-template-columns: minmax(0, 1fr); } }
/* checkbox groups in forms (standards analysis) */
.chk-group { display: grid; gap: 10px; margin: 0; padding: 12px 16px 16px; border: 1px solid var(--rule); min-width: 0; }
.chk-group legend { padding: 0 6px; font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.form label.chk { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px;
                  font: 400 15px/1.45 var(--font-body); letter-spacing: normal; text-transform: none; color: var(--fg); cursor: pointer; }
.form label.chk input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--line); }
.form label.chk small { display: block; font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
.form label.chk input:disabled + span { opacity: .55; cursor: default; }
/* drawings sent for a check (standards-analysis form) */
.form input[type=file] { padding: 9px 10px; font-size: 14px; }
.an-files { margin: -6px 0 0; padding-left: 18px; font: 400 13px/1.5 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }

/* Standards analysis (paid service) */
.an-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.an-card { display: grid; align-content: start; gap: 10px; padding: clamp(18px, 2.4vw, 24px); }
.an-card h3 { margin: 0; }
.an-card .std { margin: 0; font: 400 12.5px/1.5 var(--font-mono); color: var(--muted); }
.an-card .ticks { gap: 6px; }
/* the three services (#usluge): text on top, button at the bottom of each card */
.an-svc { display: flex; flex-direction: column; gap: 10px; }
.an-svc .an-svc-act { margin-top: auto; }
/* numbered steps (routes in the services tab, "how to get an offer") */
.an-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: 15px; }
.an-steps li::marker { color: var(--csp); font: 500 13px var(--font-mono); }
.an-foot { margin: 14px 0 0; }
.an-sub { margin: 0 0 16px; max-width: 80ch; }
/* inquiry tab: steps + contact on the left, the form on the right */
.an-inquiry { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 899px) { .an-inquiry { grid-template-columns: minmax(0, 1fr); } .an-inquiry .an-side { order: 2; } }
.an-side { gap: 16px; }
.an-contact a { font-weight: 500; }
.an-contact p + p { color: inherit; }
.an-parts { display: grid; gap: 10px; padding-left: 28px; }
.an-svc p { margin: 0; }
.an-svc .eyebrow { margin: 0; }
.an-svc-act { align-self: end; padding-top: 6px; }
.an-pkg { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.an-pkg li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule, rgba(127,127,127,.25)); font-size: 14.5px; }
.an-pkg strong { white-space: nowrap; font-weight: 500; }
.an-note { padding: 16px 18px; }
.an-note p { margin: 0; }
.an-note p + p { margin-top: 6px; color: var(--muted); }
.nojs-msg:not(:target) { display: none; }   /* server redirect without JavaScript: #an-ok / #an-err */
.konf-an { display: grid; gap: 10px; justify-items: start; margin-top: 4px; padding: 14px 16px; }
.konf-an p { margin: 0; font-size: 14.5px; }
.konf-pay { display: grid; gap: 10px; justify-items: start; padding: 12px 0 2px; border-top: 1px solid var(--rule); width: 100%; }
/* payment pages (payment_pages.py): order form, success / cancel */
.pay .lead { max-width: 62ch; }
.pay-grid { display: grid; gap: 18px; max-width: 760px; margin-top: 8px; }
.pay-sum { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.pay-prod { margin: 0; font-size: 1.05rem; }
.pay-status { max-width: 760px; margin-top: 8px; }
.pay-status .lead { margin: 0; }

/* CTA band */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: clamp(22px, 4vw, 36px); }
.cta-band h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.cta-band p { margin: 8px 0 0; color: var(--muted); max-width: 56ch; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); padding-block: 36px 30px; margin-top: clamp(24px, 4vw, 48px); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot-grid h2 { font-size: .8rem; font-family: var(--font-mono); font-weight: 500; font-stretch: 100%; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.foot-grid a { text-decoration: none; color: var(--fg); }
.foot-grid a:hover { color: var(--line); }
.foot-co { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }
.foot-co .logo { background: var(--fg); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.foot-ctrls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.foot-ctrl { display: flex; align-items: center; gap: 10px; }
@media (max-width: 859px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-co { grid-column: 1 / -1; } }
@media (max-width: 459px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }

/* WhatsApp floating button */
.wa-float {
  position: fixed; z-index: 25;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px 12px 13px; border-radius: 999px;
  background: var(--wa); color: #06210f; text-decoration: none; font: 600 14.5px/1 var(--font-body);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
}
.wa-float svg { width: 24px; height: 24px; flex: none; }
.wa-float:hover { filter: brightness(1.05); }
@media (max-width: 599px) { .wa-float span { display: none; } .wa-float { padding: 13px; } }

/* Lightbox */
.lb { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--shade); color: #fff; }
.lb::backdrop { background: transparent; }
.lb[open] { display: grid; grid-template-rows: 1fr auto; }
/* grid-template: a definite cell, so the photo's max-height/height:100% resolve (an auto row grew with the photo,
   which then ran under the caption and made the dialog scroll) */
.lb-stage { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; min-height: 0; padding: calc(56px + env(safe-area-inset-top, 0px)) max(56px, env(safe-area-inset-right, 0px)) 8px max(56px, env(safe-area-inset-left, 0px)); }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* caption: page (product) / element (country · project, variant or venue) and "n / total" of the element's photos */
.lb-cap { padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); text-align: center; color: #c9d6e4; }
.lb-cap p { margin: 0; }
.lb-sec { margin-bottom: 4px !important; font: 500 11px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: #8fb6dc; }
.lb-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px; }
.lb-t { font: 500 15px/1.4 var(--font-body); color: #fff; overflow-wrap: anywhere; }
.lb-n { flex: none; padding: 1px 8px; border: 1px solid rgba(255, 255, 255, .32); font: 400 12.5px/1.4 var(--font-mono); color: #dbe6f1; white-space: nowrap; }
.lb button { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .35); color: #fff; cursor: pointer; font: 400 22px/1 var(--font-body); }
.lb .lb-close { top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
.lb .lb-prev { left: calc(6px + env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb .lb-next { right: calc(6px + env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
.lb { touch-action: none; overscroll-behavior: contain; }
.lb-stage img { will-change: transform; user-select: none; -webkit-user-drag: none; }
/* phones and tablets (and narrow windows): photo edge to edge on black, caption over the photo on a dark scrim
   that is solid behind the text (readable over white walls) and fades out only above it */
@media (hover: none) and (pointer: coarse), (max-width: 699px) {
  .lb { background: #000; }
  .lb[open] { grid-template-rows: 1fr; }
  .lb-stage { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
  .lb-stage img { width: 100%; height: 100%; }
  .lb-cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 28px 16px calc(14px + env(safe-area-inset-bottom, 0px));
            background: linear-gradient(to top, rgba(0, 0, 0, .8) 65%, transparent); text-shadow: 0 1px 2px #000; pointer-events: none; }
  .lb .lb-close { background: rgba(0, 0, 0, .45); border-color: rgba(255, 255, 255, .25); }
}
/* narrow window with a mouse: arrows stay, and the photo keeps its own size so a click beside it closes */
@media (hover: hover) and (pointer: fine) and (max-width: 699px) {
  .lb-stage img { width: auto; height: auto; }
}
/* touch screens: no visible arrows (swipe instead), but the buttons stay for screen readers (VoiceOver/TalkBack
   use swipes for their own navigation, so the photo swipe never reaches the page) */
@media (hover: none) and (pointer: coarse) {
  .lb .lb-prev, .lb .lb-next { width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); border: 0; }
}

@media (forced-colors: active) {
  .logo, .csp-logo, .vision-word, .nav .bn .csp-logo, .nav .bn .vision-word { forced-color-adjust: none; background: CanvasText; }
}

/* Admin preview: hidden parts are visible to the signed-in owner, marked with a band */
.vh-preview body::after {
  content: "ADMIN PREGLED · isključeni dijelovi su vidljivi samo vama";
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  background: #b45309; color: #fff; font: 600 11px/1.3 var(--font-mono); letter-spacing: .08em; text-align: center; pointer-events: none;
}
.vh-preview .wa-float { bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }

/* ---------- CSP 3D configurator ---------- */
.konf-head { padding-block: clamp(28px, 4vw, 52px) 18px; display: flex; flex-direction: column; gap: 14px; }
.konf-prod { align-self: flex-start; flex-wrap: wrap; }
.konf-prod > a { padding: 10px 14px; font-size: 12.5px; }
.konf-prod > a:hover { color: var(--fg); }
.konf { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.konf-stage { position: relative; padding: 0; min-width: 0; }
#konf-view { position: relative; width: 100%; height: clamp(360px, 62vh, 640px); overflow: hidden; touch-action: none; }
#konf-view canvas { display: block; }
.konf-labels { position: absolute; inset: 0; pointer-events: none; }
.konf-dim { padding: 2px 6px; background: color-mix(in srgb, var(--bg) 82%, transparent); color: var(--line); font: 500 11.5px/1.2 var(--font-mono); white-space: nowrap; border: 1px solid var(--rule); }
.konf-dim.muted { color: var(--muted); }
.konf-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; pointer-events: none; }
.konf-bar .seg { pointer-events: auto; background: color-mix(in srgb, var(--bg) 85%, transparent); }
.konf-panel { display: grid; gap: 14px; min-width: 0; max-height: clamp(360px, 62vh, 640px); overflow: auto; padding-right: 4px; }
.konf-panel fieldset { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--rule); background: var(--bg-raise); display: grid; gap: 12px; min-width: 0; }
.konf-panel legend { padding: 0 6px; font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--line); }
.kf { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.kf > input[type=range], .kf > select { grid-column: 1 / -1; width: 100%; }
.kf select { padding: 8px 10px; border: 1px solid var(--rule); background: var(--bg); color: var(--fg); font: 14.5px var(--font-body); }
.kf-val { font: 500 13px/1 var(--font-mono); color: var(--fg); font-variant-numeric: tabular-nums; }
.kf input[type=range] { accent-color: var(--line); }
.kf-check { grid-template-columns: auto minmax(0, 1fr); }
.kf-check input { accent-color: var(--line); width: 18px; height: 18px; }
.konf-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kc { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 12px; border: 1px solid var(--rule); background: var(--bg-raise); font-size: 14.5px; }
.kc-ic { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--muted); }
.kc-ok .kc-ic { background: #2fbf71; }
.kc-warning .kc-ic { background: #f0a500; }
.kc-error { border-color: var(--wy); }
.kc-error .kc-ic { background: var(--wy); }
.kc-info .kc-ic { background: var(--line); }
@media (max-width: 999px) {
  .konf { grid-template-columns: minmax(0, 1fr); }
  .konf-panel { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  #konf-view { height: clamp(320px, 56vh, 520px); }
}
/* "?" on the 3D stage: how to control the model (details/summary, works without JavaScript) */
.konf-help { position: absolute; top: 12px; right: 12px; z-index: 2; }
.konf-help > summary { list-style: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--rule); border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 85%, transparent); color: var(--fg); font: 600 16px/1 var(--font-body); cursor: pointer; }
.konf-help > summary::-webkit-details-marker { display: none; }
.konf-help > summary:hover, .konf-help[open] > summary { border-color: var(--line); color: var(--line); }
.konf-help-box { position: absolute; top: 42px; right: 0; width: min(330px, calc(100vw - 56px)); max-height: min(60vh, 420px); overflow: auto;
  padding: 14px 16px; border: 1px solid var(--line); background: var(--bg-raise); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); font-size: 14px; line-height: 1.45; }
.konf-help-box strong { display: block; margin-bottom: 8px; font-size: 14.5px; }
.konf-help-box dl { display: grid; gap: 8px; margin: 0; }
.konf-help-box dt { font: 500 11px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--line); }
.konf-help-box dd { margin: 2px 0 0; color: var(--fg); }
/* No flash before site.js makes the tabs: html.js is set in the head, the untabbed panel keeps its space but stays
   invisible; if site.js never runs, the animation shows it after 3 s (no-JS visitors never get html.js) */
@keyframes konf-show { to { visibility: visible; } }
html.js #konf-form:not(.is-tabbed):not(.no-tabs) { visibility: hidden; animation: konf-show 0s 3s forwards; }
/* Compact settings (site.js): the groups become small tabs, one group at a time */
.konf-panel.is-tabbed { gap: 0; align-content: start; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--rule); background: var(--bg-raise); padding: 0;
  overflow-x: hidden; overflow-y: auto; }   /* never sideways: tabs wrap, only up/down if it must */
.konf-panel.is-tabbed > fieldset { border: 0; background: none; padding: 12px 14px 14px; gap: 12px; }
.konf-panel.is-tabbed > fieldset > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.konf-sheet-head { position: sticky; top: 0; z-index: 1; background: var(--bg-raise); border-bottom: 1px solid var(--rule); }
.konf-sheet-top { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 4px; }
.konf-sheet-top strong { font: 600 15px/1.2 var(--font-body); }
.konf-sheet-x { display: grid; place-items: center; width: 40px; height: 40px; margin: -6px -8px -6px 0; padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer; }
/* the groups as clear buttons: bordered chips, the open one filled with the accent colour */
.konf-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; min-width: 0; }
.konf-tabs button { flex: 1 1 auto; max-width: 100%; white-space: normal; text-align: center; padding: 7px 12px; border: 1px solid var(--rule);
  border-radius: 999px; background: var(--bg); color: var(--fg); font: 500 13.5px/1.25 var(--font-body); cursor: pointer; transition: border-color .15s, background-color .15s; }
.konf-tabs button:hover { border-color: var(--line); }
.konf-tabs button[aria-selected="true"] { background: var(--line); border-color: var(--line); color: var(--on-accent); }
.konf-tabs button:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; }
.konf-open { display: none; }
/* phones and tablets: the settings are a bottom sheet over the page, the model fits in the space above it */
@media (max-width: 999px) {
  .konf.js-sheet { --sheet-h: min(52svh, 460px); }
  .konf.js-sheet .konf-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: var(--sheet-h); max-height: none;
    grid-template-columns: minmax(0, 1fr); border-width: 1px 0 0; border-color: var(--line); padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -14px 34px rgba(0, 0, 0, .35); transform: translateY(105%); visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s; }
  .konf.js-sheet.sheet-open .konf-panel { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
  .konf.js-sheet .konf-sheet-top { display: flex; }
  /* open: the model fills the screen above the sheet (over the page header), the page behind does not scroll */
  .konf.js-sheet.sheet-open .konf-stage { position: fixed; z-index: 44; left: 0; right: 0; top: 0; margin: 0;
    height: calc(100svh - var(--sheet-h)); padding-top: env(safe-area-inset-top, 0px); background: var(--bg); border: 0; }
  .konf.js-sheet.sheet-open #konf-view { height: 100%; }
  html.konf-lock, html.konf-lock body { overflow: hidden; }
  .konf.js-sheet.in-view:not(.sheet-open) .konf-open { display: inline-flex; }
  .konf-open { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 26; transform: translateX(-50%);
    align-items: center; gap: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, .3); }
  .vh-preview .konf-open { bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  /* "?" help: a card at the bottom of the screen, above the Settings button, WhatsApp and the open sheet
     (site.js sets .help-open so the fixed stage rises over the sheet); a tap outside or "?" again closes it */
  .konf-help[open] { z-index: auto; }   /* no stacking context: the card's own z-index counts, the "?" stays under the header */
  .konf-help-box { position: fixed; z-index: 47; top: auto; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto;
    max-height: min(70svh, 460px); overscroll-behavior: contain; }
  .vh-preview .konf-help-box { bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
  .konf.js-sheet.sheet-open.help-open .konf-stage { z-index: 46; }
}
@media (prefers-reduced-motion: reduce) { .konf.js-sheet .konf-panel { transition: none !important; } }

/* Novosti: dynamic items from /admin/ and Instagram (rendered by /api/novosti.php into the news page) */
.nv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.nv-meta time { font: 500 12.5px/1 var(--font-mono); color: var(--muted); letter-spacing: .04em; }
.nv-ig { font: 600 12.5px/1 var(--font-mono); color: var(--brand); text-decoration: none; padding: 5px 0; }
.nv-ig:hover, .nv-ig:focus-visible { text-decoration: underline; }
.nv-post .post-media { display: grid; gap: 12px; min-width: 0; }
.nv-shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.nv-shots button { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; min-width: 0; }
.nv-shots button:first-child { grid-column: 1 / -1; background: var(--bg-raise); border: 1px solid var(--rule); }
.nv-post .nv-shots img { border: 0; }
.nv-shots button:first-child img { width: 100%; height: auto; max-height: min(72vh, 600px); object-fit: contain; }
.nv-shots button:not(:first-child) img { aspect-ratio: 1; object-fit: cover; border: 1px solid var(--rule); }
.nv-post video { max-height: min(80vh, 720px); }
.nv-yt .yt-play { aspect-ratio: 16 / 9; }
/* Instagram posts in Novosti: square cards, the whole card opens the post (scoped to .ig-grid, see the profile card above) */
.ig-feed { padding-block: clamp(20px, 3vw, 36px) clamp(28px, 4vw, 44px); border-top: 1px solid var(--rule); }
.ig-feed-h { margin: 0 0 16px; font-size: clamp(1.2rem, 2vw, 1.5rem); }
.ig-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ig-grid .ig-card { display: flex; flex-direction: column; gap: 8px; height: 100%; min-width: 0; padding: 10px; border: 1px solid var(--rule); background: var(--bg-raise);
  color: var(--fg); text-decoration: none; transition: border-color .2s; --brand: var(--csp); }
.ig-grid .ig-card:hover, .ig-grid .ig-card:focus-visible { border-color: var(--brand); }
.ig-thumb { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--bg); }
.ig-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ig-card:hover .ig-thumb img { transform: scale(1.03); }
.ig-play { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; }
.ig-play svg { width: 16px; height: 16px; }
.ig-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; min-width: 0; font: 500 12px/1.2 var(--font-mono); color: var(--muted); }
.ig-grid .ig-go { color: var(--brand); }
.ig-grid .ig-title { font-weight: 600; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 899px) { .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .ig-thumb img { transition: none; } }
.nv-blank { display: grid; place-items: center; min-height: 200px; --brand: var(--muted); }
