/* Cookie banner (design handover 2026-09-16): a centred box over a dimmed
   page on desktop, a bottom sheet on mobile. One box carries two layers,
   [data-consent-layer="choice"] and [data-consent-layer="settings"]; banner.js
   toggles `hidden` between them. The dark values are the handover artboard;
   body.light-landing (the site's default theme) gets the light override at
   the bottom of this file, so the dialog follows the page it sits on. */
.cookie-banner[hidden], .cookie-banner [hidden] { display: none !important; }
.cookie-banner {
  position: fixed; inset: 0; z-index: 100001;
  display: grid; place-items: center; padding: 16px;
  background: rgba(24, 24, 24, 0.72);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  font: 400 17px/1.55 'IBM Plex Sans', sans-serif;
  color: #f5f5f5;
  animation: cookie-overlay-in 150ms ease-out;
}
.cookie-box {
  position: relative; box-sizing: border-box;
  width: 560px; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 40px 40px 32px; border-radius: 20px;
  background: #1f1f1f; border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  animation: cookie-box-in 200ms ease-out;
}
.cookie-box * { box-sizing: border-box; }
.cookie-title {
  margin: 0 0 14px; font-size: 28px; line-height: 1.2; font-weight: 600;
  letter-spacing: -0.01em; color: #f5f5f5; outline: none;
}
.cookie-text { margin: 0 0 28px; font-size: 17px; line-height: 1.55; color: #b3bac4; }
.cookie-box a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cookie-box a:hover { color: #E6CC80; }
.cookie-actions { display: flex; gap: 12px; } /* secondary left, green primary right */
.cookie-btn {
  flex: 1 1 0; min-width: 0; height: 52px; padding: 0 20px; border: 0; border-radius: 999px;
  font: inherit; font-size: 16px; cursor: pointer; transition: background-color 120ms;
}
.cookie-btn-primary { background: #2F7A3E; color: #ffffff; font-weight: 600; }
.cookie-btn-primary:hover { background: #3C9750; }
.cookie-btn-secondary { background: rgba(255, 255, 255, 0.12); color: #f5f5f5; font-weight: 500; }
.cookie-btn-secondary:hover { background: rgba(255, 255, 255, 0.18); }
.cookie-links { display: flex; justify-content: space-between; gap: 20px; margin: 14px 0 0; font-size: 14px; }
.cookie-links-center { justify-content: center; }
.cookie-link {
  padding: 0; border: 0; background: none; font: inherit; color: #8c949f; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.cookie-box a.cookie-link { color: #8c949f; }
.cookie-link:hover, .cookie-box a.cookie-link:hover { color: #E6CC80; }
.cookie-box :focus-visible { outline: 2px solid #E6CC80; outline-offset: 3px; }
/* The heading takes focus on open so screen readers announce it; no ring. */
.cookie-box .cookie-title:focus-visible { outline: none; }

/* Layer 2 */
.cookie-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  border: 0; border-radius: 999px; background: none; color: #8c949f;
  font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.cookie-close:hover { background: rgba(255, 255, 255, 0.12); color: #f5f5f5; }
.cookie-title-sm { font-size: 20px; padding-right: 40px; }
.cookie-text-sm { font-size: 14px; margin-bottom: 20px; }
.cookie-categories { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.cookie-category {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.cookie-category-name { display: block; font-size: 15px; font-weight: 600; color: #f5f5f5; }
.cookie-category-desc { display: block; font-size: 13px; line-height: 1.45; color: #b3bac4; }
.cookie-always { flex: none; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #8c949f; }
.cookie-switch {
  flex: none; position: relative; width: 46px; height: 26px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.18); cursor: pointer; transition: background-color 120ms;
}
.cookie-switch[aria-checked="true"] { background: #2F7A3E; }
.cookie-switch-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px;
  background: #f5f5f5; transition: transform 120ms;
}
.cookie-switch[aria-checked="true"] .cookie-switch-knob { transform: translateX(20px); }
.cookie-error { margin: 14px 0 0; font-size: 14px; color: #f5b8b8; }

@keyframes cookie-overlay-in { from { opacity: 0; } }
@keyframes cookie-box-in { from { opacity: 0; transform: scale(0.98); } }
@media (prefers-reduced-motion: reduce) {
  .cookie-banner, .cookie-box { animation: none; }
  .cookie-switch, .cookie-switch-knob, .cookie-btn { transition: none; }
}

/* Mobile: bottom sheet */
@media (max-width: 767px) {
  .cookie-banner { place-items: end stretch; padding: 0; }
  .cookie-box {
    width: 100%; max-height: 100vh; border-radius: 24px 24px 0 0; border-bottom: 0;
    padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
  }
  .cookie-title { font-size: 24px; }
  .cookie-title-sm { font-size: 20px; }
  .cookie-text { font-size: 16px; }
  .cookie-text-sm { font-size: 14px; }
  .cookie-actions { flex-direction: column-reverse; } /* Accept all on top when stacked */
  .cookie-btn { flex: none; width: 100%; }
  .cookie-links { justify-content: center; gap: 20px; }
}

/* Light theme: follows body.light-landing (prepaint/landing-theme.js). Same
   geometry, the light --mkt-* palette written out because this sheet loads
   before variables.css and on the standalone pages without it. */
body.light-landing .cookie-banner { background: rgba(26, 32, 44, 0.45); color: #1a202c; }
body.light-landing .cookie-box {
  background: #ffffff; border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}
body.light-landing .cookie-title, body.light-landing .cookie-category-name { color: #1a202c; }
body.light-landing .cookie-text, body.light-landing .cookie-category-desc { color: #4a5568; }
body.light-landing .cookie-box a:hover { color: #1a202c; }
body.light-landing .cookie-btn-secondary { background: rgba(0, 0, 0, 0.06); color: #1a202c; }
body.light-landing .cookie-btn-secondary:hover { background: rgba(0, 0, 0, 0.1); }
body.light-landing .cookie-link, body.light-landing .cookie-box a.cookie-link,
body.light-landing .cookie-always, body.light-landing .cookie-close { color: #5f6b7a; }
body.light-landing .cookie-link:hover, body.light-landing .cookie-box a.cookie-link:hover { color: #1a202c; }
body.light-landing .cookie-close:hover { background: rgba(0, 0, 0, 0.06); color: #1a202c; }
body.light-landing .cookie-box :focus-visible { outline-color: #2F7A3E; }
body.light-landing .cookie-categories, body.light-landing .cookie-category { border-color: rgba(0, 0, 0, 0.1); }
body.light-landing .cookie-switch { background: rgba(0, 0, 0, 0.18); }
body.light-landing .cookie-switch[aria-checked="true"] { background: #2F7A3E; }
body.light-landing .cookie-switch-knob { background: #ffffff; }
body.light-landing .cookie-error { color: #b42318; }
