/* HOLYTICS — cookie consent banner and preference panel.

   One stylesheet for both designs: index.html loads lv2.css, the other pages
   load holytics.css, and the two name some tokens differently. Where they do,
   the var() chain tries lv2's name, then holytics', then a literal. Everything
   else below is self-contained apart from .btn / .btn-primary / .btn-ghost /
   .btn-sm, which both stylesheets define.

   z-index 95 sits above the fixed header (90) and below the scroll progress bar
   (100) and both modals (120 in holytics.css, 200 in lv2.css), so the banner
   never covers a dialog the visitor opened. */

.ck { position: fixed; inset: auto 0 0 0; z-index: 95; display: flex; justify-content: center; padding: clamp(12px, 3vw, 24px); }
.ck[hidden] { display: none !important; }
.ck-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: clamp(20px, 3vw, 28px);
  border-radius: 22px;
  background: rgba(11, 14, 18, .96);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 60px rgba(0, 0, 0, .5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ck-open .ck-card { max-width: 640px; max-height: calc(100vh - 48px); overflow-y: auto; }
.ck-card h2 {
  margin: 0 0 10px;
  padding-right: 28px;
  font-family: var(--disp, var(--display, var(--sans)));
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: var(--ink, var(--ink-0, #fff));
}
.ck-body { margin: 0 0 18px; font-family: var(--sans); font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.ck-body a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.ck-x {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06);
  color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer;
}
.ck-x:hover { background: rgba(255, 255, 255, .12); color: var(--ink, var(--ink-0, #fff)); }
.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ck-actions .btn { flex: 1 1 auto; justify-content: center; }

.ck-cats { display: grid; gap: 14px; margin-bottom: 20px; }
.ck-cat {
  padding: 14px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 0 1px var(--line, var(--line-1, rgba(255, 255, 255, .1)));
}
.ck-cat-h {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 6px;
  font: 600 14px/1.2 var(--sans);
  color: var(--ink, var(--ink-0, #fff));
}
.ck-cat p { margin: 0; font-family: var(--sans); font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.ck-always { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mint); }
.ck-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Switch: the checkbox stays focusable, the span is only its skin. */
.ck-sw { position: relative; display: inline-flex; flex: 0 0 auto; width: 46px; height: 26px; cursor: pointer; }
.ck-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ck-sw span[aria-hidden] {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  transition: background .25s var(--ease);
}
.ck-sw span[aria-hidden]::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink, var(--ink-0, #fff));
  transition: transform .25s var(--ease);
}
.ck-sw input:checked + span[aria-hidden] { background: var(--grad); }
.ck-sw input:checked + span[aria-hidden]::after { transform: translateX(20px); background: #05110c; }
.ck-sw input:focus-visible + span[aria-hidden] { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Footer legal links. index.html colours every <a> mint by default, so the two
   here are pulled back to the muted colour the other footer links use. */
.ftr-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ftr-legal a { color: var(--ink-2); text-decoration: none; }
.ftr-legal a:hover { color: var(--mint); }

/* The footer link that reopens the panel: a button that reads as a footer link. */
.foot-cookies {
  background: none; border: 0; padding: 0;
  font: inherit; color: inherit;
  text-decoration: none; cursor: pointer;
}
.foot-cookies:hover { color: var(--mint); }

@media (hover: none) {
  .ck-actions .btn { height: 44px; }
  .ck-x { width: 44px; height: 44px; top: 10px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-sw span[aria-hidden], .ck-sw span[aria-hidden]::after { transition: none; }
}
