/* Privacy preferences: the consent dialog on every page (markup in each page, behaviour in /js/consent.js).
   A compact centred modal over a dimmed page. Restrained typography in Inter, the face of the site's own layer on every
   page (header, menus, language panel, footer; loaded by chrome.css, and by the home page itself): a 20px title at
   weight 500, 14px copy, 13px for descriptions and links. Chosen 2026-10-25 over IBM Plex Sans (the product pages'
   content face) and Arial (no medium weight; reads as a system fallback).
   Square 4px corners, hairline dividers, GROUP ink #1A1A1A / #242424 on white.
   - "Reject all" and "Accept all" carry exactly the same weight (the brand red #D2242A, same size, side by side), as EU
     regulators expect: neither choice is pushed; "Save preferences" is the outlined third choice. White on #D2242A 5.2:1.
   - Nothing is pre-ticked: analytics stays off until it is switched on or accepted.
   - The language menu is drawn here (no native pop-up list): a small panel under its button, keyboard operable.
   - Keyboard: focus moves into the dialog, Tab stays inside it, and returns where it was when the dialog closes.
   - prefers-reduced-motion: no movement.
   Everything is scoped to #consent with explicit values, so page styles (header, footer, h2, p, button) never leak in. */

#consent{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased;color:#242424}
#consent[hidden]{display:none}
#consent *,#consent *::before,#consent *::after{box-sizing:border-box}
#consent .vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#consent .cs-scrim{position:absolute;inset:0;background:rgba(12,12,14,.55);opacity:0;transition:opacity .28s ease}
#consent .cs-card{position:relative;display:flex;flex-direction:column;width:100%;max-width:520px;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);
  background:#FFFFFF;border-radius:6px;box-shadow:0 24px 64px rgba(0,0,0,.28),0 2px 6px rgba(0,0,0,.1);outline:none;
  opacity:0;transform:translateY(8px);transition:opacity .3s cubic-bezier(.16,1,.3,1),transform .3s cubic-bezier(.16,1,.3,1)}
#consent.on .cs-scrim{opacity:1}
#consent.on .cs-card{opacity:1;transform:none}

/* the head: the wordmark, and the language */
#consent .cs-head{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 28px;border-bottom:1px solid #E5E7EB;flex:none}
#consent .cs-mark{display:block;height:15px;width:auto}   /* the two-colour wordmark as supplied (never one colour on screen, AGENTS.md section 1), kept quiet */

/* the language: the current language's own name and a chevron; a small panel of the six under it */
#consent .cs-lang{position:relative}
#consent .cs-lang-btn{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 4px 0 8px;margin-right:-4px;border-radius:4px;
  font-family:inherit;font-size:13px;font-weight:500;line-height:1;color:#4B5563;cursor:pointer;transition:color .15s ease,background-color .15s ease}
#consent .cs-lang-btn::after{content:"";width:5px;height:5px;margin:-3px 4px 0 0;border-right:1.4px solid currentColor;border-bottom:1.4px solid currentColor;transform:rotate(45deg);transition:transform .2s ease}
#consent .cs-lang-btn[aria-expanded="true"]{color:#1A1A1A}
#consent .cs-lang-btn[aria-expanded="true"]::after{transform:rotate(-135deg);margin-top:3px}
#consent .cs-lang-list{position:absolute;right:-4px;top:calc(100% + 6px);min-width:148px;margin:0;padding:4px;list-style:none;background:#FFFFFF;
  border:1px solid #E5E7EB;border-radius:4px;box-shadow:0 12px 32px rgba(17,24,39,.12),0 2px 6px rgba(17,24,39,.06);outline:none}
#consent .cs-lang-list[hidden]{display:none}
#consent .cs-lang-list li{display:flex;align-items:center;justify-content:space-between;gap:16px;height:34px;padding:0 10px;margin:0;border-radius:3px;
  font-size:13.5px;font-weight:400;line-height:1;color:#374151;cursor:pointer}
#consent .cs-lang-list li[aria-selected="true"]{color:#1A1A1A;font-weight:500}
#consent .cs-lang-list li[aria-selected="true"]::after{content:"";width:9px;height:5px;margin-top:-3px;border-left:1.5px solid #1A1A1A;border-bottom:1.5px solid #1A1A1A;transform:rotate(-45deg)}
#consent .cs-lang-list li.is-active{background:#F3F4F6}

/* the body: title, two short paragraphs, the two categories */
#consent .cs-body{padding:24px 28px 4px;overflow-y:auto;-webkit-overflow-scrolling:touch;flex:1 1 auto;min-height:0}
#consent .cs-title{margin:0;font-family:inherit;font-size:20px;line-height:1.3;font-weight:500;letter-spacing:-.005em;color:#1A1A1A;text-align:left}
#consent .cs-intro p{margin:10px 0 0;max-width:none;font-family:inherit;font-size:14px;line-height:1.6;font-weight:400;color:#4B5563;text-align:left;text-wrap:pretty}
#consent .cs-cats{list-style:none;margin:20px 0 0;padding:0;border-top:1px solid #E5E7EB}
#consent .cs-cats li{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0;padding:13px 0;border-bottom:1px solid #E5E7EB}
#consent .cs-cats h3{margin:0;font-family:inherit;font-size:14px;line-height:1.4;font-weight:500;letter-spacing:0;color:#1A1A1A;text-align:left}
#consent .cs-cats p{margin:2px 0 0;max-width:none;font-family:inherit;font-size:13px;line-height:1.5;font-weight:400;color:#6B7280;text-align:left;text-wrap:pretty}
#consent .cs-always{flex:none;font-size:13px;font-weight:500;color:#4B5563;white-space:nowrap}
/* the switch: off grey, on ink; 36 x 20, a 44px hit area through the label */
#consent .cs-sw{position:relative;flex:none;display:block;width:36px;height:20px;cursor:pointer}
#consent .cs-sw::before{content:"";position:absolute;inset:-12px -4px}
#consent .cs-sw input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
#consent .cs-sw span{position:absolute;inset:0;border-radius:10px;background:#D1D5DB;pointer-events:none;transition:background-color .2s ease}
#consent .cs-sw span::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#FFFFFF;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .2s cubic-bezier(.16,1,.3,1)}
#consent .cs-sw input:checked + span{background:#1A1A1A}
#consent .cs-sw input:checked + span::after{transform:translateX(16px)}

/* the choices: three equal buttons; reject and accept identical, in the brand red */
#consent .cs-acts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:18px 28px 20px;flex:none}
#consent .cs-btn{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 12px;border:1px solid #D2242A;border-radius:4px;
  background:#D2242A;color:#FFFFFF;font-family:inherit;font-size:13.5px;font-weight:500;line-height:1.2;text-align:center;white-space:nowrap;cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease}
#consent .cs-btn.cs-line{background:#FFFFFF;border-color:#1A1A1A;color:#1A1A1A}
/* a language whose labels do not fit three across (consent.js measures them): the two equal choices side by side,
   "Save preferences" across the full width below */
#consent .cs-acts.cs-stack{grid-template-columns:1fr 1fr}
#consent .cs-acts.cs-stack .cs-line{grid-column:1 / -1;grid-row:2}

/* the foot: the policies, on the page's quiet grey */
#consent .cs-foot{display:flex;flex-wrap:wrap;gap:6px 20px;padding:12px 28px;background:#F6F7F9;border-top:1px solid #E5E7EB;border-radius:0 0 6px 6px;flex:none}
#consent .cs-foot a{font-size:13px;line-height:1.5;font-weight:400;color:#4B5563;text-decoration:underline;text-decoration-color:#C9CDD3;text-underline-offset:3px;transition:color .15s ease,text-decoration-color .15s ease}

/* focus: one 2px ink ring, 2px off, on everything that can take focus */
#consent button:focus-visible,#consent a:focus-visible,#consent .cs-sw input:focus-visible + span{outline:2px solid #1A1A1A;outline-offset:2px}
#consent .cs-card:focus-visible,#consent .cs-lang-list:focus-visible{outline:none}

@media (hover:hover){
  #consent .cs-btn:hover{background:#B31F24;border-color:#B31F24}
  #consent .cs-btn.cs-line:hover{background:#F3F4F6;border-color:#1A1A1A;color:#1A1A1A}
  #consent .cs-lang-btn:hover{color:#1A1A1A;background:#F3F4F6}
  #consent .cs-lang-list li:hover{background:#F3F4F6}
  #consent .cs-foot a:hover{color:#1A1A1A;text-decoration-color:#1A1A1A}
}
/* the page behind does not scroll while the dialog is open */
html.cs-lock,html.cs-lock body{overflow:hidden}

/* phones: full width at the foot of the screen; "Reject all" and "Accept all" side by side, "Save preferences" below */
@media (max-width:600px){
  /* phones: a sheet across the full width, flush with the bottom and side edges, square corners; it never covers the top 48px */
  #consent{padding:0;align-items:flex-end}
  #consent .cs-card{max-width:none;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);border-radius:0;box-shadow:0 -16px 48px rgba(0,0,0,.28);transform:translateY(24px)}
  #consent .cs-foot{border-radius:0;padding-top:10px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  #consent .cs-head{padding:10px 20px}
  #consent .cs-mark{height:15px}
  #consent .cs-body{padding:16px 20px 2px}
  #consent .cs-title{font-size:18px}
  #consent .cs-intro p{margin-top:6px;font-size:13.5px;line-height:1.5}
  #consent .cs-cats{margin-top:12px}
  #consent .cs-cats li{padding:9px 0;gap:16px}
  #consent .cs-acts{grid-template-columns:1fr 1fr;padding:12px 20px 14px}
  #consent .cs-acts .cs-line{grid-column:1 / -1;grid-row:2}
  #consent .cs-btn{min-height:44px}
  #consent .cs-foot{padding:12px 20px;gap:4px 18px}
}
/* short phones (iPhone SE and similar): a little more height and a tighter intro, so both categories stay in view */
@media (max-width:600px) and (max-height:740px){
  #consent .cs-card{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
  #consent .cs-intro p{line-height:1.45}
}
@media (prefers-reduced-motion:reduce){
  #consent .cs-scrim,#consent .cs-card,#consent .cs-sw span,#consent .cs-sw span::after,#consent .cs-lang-btn::after{transition:none}
  #consent .cs-card{transform:none}
}

/* ---------- 2026-10-27: the dialog in the home page's institutional system (home-inst.css) ----------
   Square corners everywhere; the title in the section-heading voice (Inter 800, -0.02em); 15px copy; 48px square
   buttons with 15px bold labels. "Reject all" and "Accept all" stay identical (the same red gradient as the home page's
   primary, the same pale-red hover with ink text), so neither choice is pushed; "Save preferences" is the solid sand
   secondary (no outline), as the home page's secondaries are solid fills. Sand #F3F4F6 replaces the cool grey foot.
   The switch, the language menu, focus and keyboard behaviour are unchanged. */
#consent .cs-card,#consent .cs-foot,#consent .cs-lang-btn,#consent .cs-lang-list,#consent .cs-lang-list li{border-radius:0}
#consent .cs-card{max-width:560px}
#consent .cs-head{padding:18px 32px;border-bottom-color:#E5E7EB}
#consent .cs-body{padding:28px 32px 4px}
#consent .cs-title{font-size:26px;font-weight:800;line-height:1.15;letter-spacing:-.02em;color:#242424}
#consent .cs-intro p{margin-top:12px;font-size:15px;line-height:1.55;color:#4B4B4B}
#consent .cs-cats{margin-top:24px;border-top-color:#E5E7EB}
#consent .cs-cats li{padding:16px 0;border-bottom-color:#E5E7EB}
#consent .cs-cats h3{font-size:15px;font-weight:700;color:#242424}
#consent .cs-cats p{font-size:14px;color:#666666}
#consent .cs-always{font-size:14px;font-weight:700;color:#242424}
#consent .cs-sw input:checked + span{background:#242424}
#consent .cs-acts{gap:8px;padding:22px 32px 24px}
#consent .cs-btn{min-height:48px;padding:0 14px;border:0;border-radius:0;font-size:15px;font-weight:700;
  background:linear-gradient(90deg,#E0262C 0%,#D2242A 45%,#C0182F 100%);color:#FFFFFF;transition:background .2s cubic-bezier(.16,1,.3,1),color .2s cubic-bezier(.16,1,.3,1)}
#consent .cs-btn.cs-line{background:#F3F4F6;color:#242424}
#consent .cs-foot{padding:14px 32px;background:#F3F4F6;border-top-color:#E5E7EB}
#consent .cs-foot a{font-size:13.5px;color:#4B4B4B;text-decoration-color:#C4C8CF}
#consent button:focus-visible,#consent a:focus-visible,#consent .cs-sw input:focus-visible + span{outline-color:#242424}
@media (hover:hover){
  #consent .cs-btn:hover{background:#FBE3E3;border-color:transparent;color:#242424}
  #consent .cs-btn.cs-line:hover{background:#E5E7EB;color:#242424}
  #consent .cs-lang-btn:hover,#consent .cs-lang-list li:hover{background:#F3F4F6}
}
#consent .cs-lang-list li.is-active{background:#F3F4F6}
@media (max-width:600px){
  #consent .cs-head{padding:12px 20px}
  #consent .cs-body{padding:18px 20px 2px}
  #consent .cs-title{font-size:22px}
  #consent .cs-intro p{margin-top:8px;font-size:14px;line-height:1.5}
  #consent .cs-cats li{padding:11px 0}
  #consent .cs-acts{padding:14px 20px 16px}
  #consent .cs-btn{min-height:46px;font-size:14.5px}
  #consent .cs-foot{padding:12px 20px calc(12px + env(safe-area-inset-bottom))}
}
/* client, 2026-10-27: the title a size down */
#consent .cs-title{font-size:21px;letter-spacing:-.015em}
@media (max-width:600px){#consent .cs-title{font-size:19px}}

/* ---------- 2026-11-10: compact first view on phones and short screens (client: "the cookies are really high") ----------
   Measured before: the sheet took 95-96% of a phone's visible screen and still scrolled. Now the first view is the title
   with the language beside it, one short sentence ending in the cookie policy, the two equal choices, and "Choose cookies",
   which opens the two categories, "Save preferences" and the policies (focus moves to the Analytics switch). Reopened from
   the footer's "Cookie settings" (hasCookies()), it opens expanded: that visitor came to change something.
   Larger screens are unchanged: the full intro, the categories and the three buttons, always shown.
   Equal weight is kept: "Reject all" and "Accept all" are the same style and size, side by side, on the first view. */
#consent .cs-short,#consent .cs-more{display:none}
@media (max-width:600px),(max-height:520px){
  #consent .cs-scrim{background:rgba(12,12,14,.42)}
  /* the head goes: the wordmark is already in the site header; the language moves up beside the title */
  #consent .cs-mark{display:none}
  #consent .cs-head{position:absolute;top:16px;right:14px;padding:0;border:0;background:none}
  #consent .cs-body{padding:20px 20px 0;overflow-y:auto}
  #consent .cs-title{padding-right:112px;font-size:19px;line-height:1.2;hyphens:manual}
  /* one short sentence, then the policy */
  #consent .cs-intro{display:none}
  #consent .cs-short{display:block;margin:10px 0 0;font-size:14.5px;line-height:1.5;font-weight:400;color:#4B4B4B;text-wrap:pretty}
  #consent .cs-short a{color:#242424;font-weight:500;text-decoration:underline;text-decoration-color:#9CA3AF;text-decoration-thickness:1px;text-underline-offset:3px;white-space:nowrap}
  /* closed: no categories, no "Save preferences", no policy row */
  #consent .cs-cats,#consent .cs-foot,#consent .cs-acts .cs-line{display:none}
  #consent .cs-acts{grid-template-columns:1fr 1fr;padding:18px 20px 0}
  #consent .cs-acts .cs-btn{grid-row:auto}
  #consent .cs-acts.cs-one{grid-template-columns:1fr}       /* two labels that cannot sit side by side (consent.js measures) */
  /* the toggle: a quiet text button, centred, a 48px tap target, clear of the home indicator */
  #consent .cs-more{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;
    min-height:52px;padding:4px 20px calc(6px + env(safe-area-inset-bottom));font-family:inherit;font-size:14.5px;font-weight:700;line-height:1.2;
    color:#242424;cursor:pointer;-webkit-tap-highlight-color:transparent}
  #consent .cs-more span{text-decoration:underline;text-decoration-color:#C4C8CF;text-decoration-thickness:1px;text-underline-offset:4px}
  #consent .cs-more::after{content:"";width:6px;height:6px;margin-top:-4px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(45deg)}
  #consent .cs-more:focus-visible{outline:2px solid #242424;outline-offset:-6px}
  /* open: the categories, "Save preferences" over the two choices, the policies at the foot */
  #consent.cs-open .cs-cats{display:block;margin-top:16px;animation:cs-in .24s cubic-bezier(.16,1,.3,1)}
  #consent.cs-open .cs-acts{padding-bottom:16px}
  #consent.cs-open .cs-acts .cs-line{display:inline-flex;grid-column:1 / -1;grid-row:1}
  #consent.cs-open .cs-acts .cs-btn:not(.cs-line){grid-row:2}
  #consent.cs-open .cs-acts.cs-one .cs-btn:not(.cs-line){grid-row:auto}
  #consent.cs-open .cs-more{display:none}
  #consent.cs-open .cs-foot{display:flex}
}
/* wider than a phone but short (a phone on its side): the compact card stays centred at the foot of the screen */
@media (min-width:601px) and (max-height:520px){
  #consent{align-items:flex-end;padding:0 24px}
  #consent .cs-card{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);box-shadow:0 -12px 40px rgba(0,0,0,.24)}
}
@keyframes cs-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){#consent.cs-open .cs-cats{animation:none}}
/* a phone on its side: the height is the constraint, so the compact card's spacing tightens */
@media (min-width:601px) and (max-height:520px){
  #consent .cs-head{top:14px}
  #consent .cs-body{padding-top:16px}
  #consent .cs-short{margin-top:8px}
  #consent .cs-acts{padding-top:14px}
  #consent .cs-more{min-height:46px;padding-bottom:calc(4px + env(safe-area-inset-bottom))}
}
/* expanded: the policy link is in the foot row, so the one in the sentence goes (no duplicate) */
@media (max-width:600px),(max-height:520px){#consent.cs-open .cs-short a{display:none}}
/* the narrowest phones (320-360 px): slightly tighter margins and labels, so the two choices still sit side by side */
@media (max-width:360px){
  #consent .cs-body{padding-left:16px;padding-right:16px}
  #consent .cs-head{right:10px}
  #consent .cs-title{padding-right:104px;font-size:18px}
  #consent .cs-acts{padding-left:16px;padding-right:16px}
  #consent .cs-acts .cs-btn{padding:0 10px;font-size:14px}
}
