/* ══════════════════════════════════════════════════════════════════
   Site styles. Only a minimal reset and the cookie banner, panel and
   fixed button (built by consent.js). Change colors, radii and fonts
   in the custom properties below; add the site's own styles after them.
   ══════════════════════════════════════════════════════════════════ */

:root{
  /* colors */
  --bg:#fff; --fg:#1a1a1a; --muted:#5c5c5c; --border:#dcdcdc;
  --switch-off:#767676; /* off switch: at least 3:1 against --surface (WCAG 1.4.11) */
  --accent:#1a56db; --accent-hover:#1446b4; --accent-fg:#fff;
  --surface:#fff; --shadow:0 12px 40px -12px rgba(0,0,0,.25);
  /* radii */
  --r-s:8px; --r-l:16px;
  /* type */
  --font:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --ease:cubic-bezier(.22,.8,.2,1);
}

*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--font);line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* ══════════════════════════════════════════════════════════════════
   COOKIES — banner on first visit, then dropdown panel
   ══════════════════════════════════════════════════════════════════ */
/* Banner and panel are <dialog popover>: reset the UA dialog/popover box (inset, margin),
   set display only while open (an unconditional display would keep them always visible)
   and scroll inside when the text is enlarged beyond the viewport height.
   :is() keeps the rule valid where :popover-open is unknown ([open] is the fallback). */
.ck-banner,.ck-panel{inset:auto;margin:0;overflow-y:auto;overscroll-behavior:contain}
.ck-banner{position:fixed;left:50%;bottom:16px;translate:-50% 0;z-index:90;
  width:min(720px,calc(100vw - 32px));max-height:calc(100dvh - 32px);border-radius:var(--r-l);padding:20px 24px;
  grid-template-columns:minmax(0,1fr) auto;gap:12px 24px;align-items:center;
  background:var(--surface);color:var(--fg);border:1px solid var(--border);box-shadow:var(--shadow)}
.ck-banner:is(:popover-open,[open]){display:grid}
.ck-fab[hidden]{display:none}
.ck-b-txt{padding-right:24px}
.ck-t{font-size:.8125rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);margin:0}
.ck-d{font-size:.875rem;line-height:1.6;color:var(--muted);margin:8px 0 0}
.ck-d a,.ck-link{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.ck-act{display:flex;gap:8px;flex-wrap:nowrap}
.ck-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:6px 16px;
  font:600 .875rem/1 var(--font);border-radius:var(--r-s);border:1px solid transparent;cursor:pointer;text-align:center;
  transition:background .2s,border-color .2s,color .2s}
.ck-btn-p{background:var(--accent);color:var(--accent-fg)}
.ck-btn-p:hover{background:var(--accent-hover)}
.ck-btn-s{background:transparent;border-color:var(--border);color:var(--fg)}
.ck-btn-s:hover{border-color:var(--accent);color:var(--accent)}
.ck-more{grid-column:1/-1;justify-self:start;background:none;border:none;padding:0;cursor:pointer;
  font:500 .8125rem/1.4 var(--font);color:var(--muted);text-decoration:underline;text-underline-offset:4px}
.ck-more:hover{color:var(--accent)}
.ck-x{position:absolute;top:8px;right:8px;width:32px;height:32px;border-radius:50%;border:none;background:none;
  color:var(--muted);font-size:22px;line-height:1;cursor:pointer;display:grid;place-items:center}
.ck-x:hover{color:var(--fg);background:rgba(0,0,0,.06)}
.ck-fab{position:fixed;left:16px;bottom:16px;z-index:88;min-height:40px;padding:0 16px;border-radius:999px;
  font:600 .8125rem/1 var(--font);cursor:pointer;color:var(--fg);background:var(--surface);
  border:1px solid var(--border);box-shadow:var(--shadow);transition:border-color .2s,color .2s}
.ck-fab:hover{border-color:var(--accent);color:var(--accent)}
.ck-panel{position:fixed;left:16px;bottom:68px;z-index:91;width:min(380px,calc(100vw - 32px));
  max-height:calc(100dvh - 84px);border-radius:var(--r-l);padding:20px;flex-direction:column;gap:16px;
  background:var(--surface);color:var(--fg);border:1px solid var(--border);box-shadow:var(--shadow);
  transform-origin:bottom left}
.ck-panel:is(:popover-open,[open]){display:flex}
.ck-panel .ck-t{padding-right:24px}
@keyframes ckIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
.ck-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.ck-list li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;
  border-bottom:1px solid var(--border)}
.ck-list li:last-child{border-bottom:none}
.ck-list div{display:flex;flex-direction:column;gap:4px;min-width:0}
.ck-list label{font-size:.875rem;font-weight:600;cursor:pointer}
.ck-list span{font-size:.8125rem;line-height:1.5;color:var(--muted)}
/* Switch: <input type="checkbox" switch> drawn with appearance:none, so it looks the
   same in every browser (native switch in Safari, checkbox with role=switch elsewhere) */
.ck-sw{appearance:none;flex:none;width:44px;height:24px;margin:0;border-radius:999px;cursor:pointer;position:relative;
  background:var(--surface);border:1px solid var(--switch-off);transition:background .2s,border-color .2s}
.ck-sw::before{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:var(--switch-off)}
.ck-sw:checked{background:var(--accent);border-color:var(--accent)}
.ck-sw:checked::before{translate:20px 0;background:var(--accent-fg)}
.ck-sw:disabled{opacity:.6;cursor:not-allowed}
.ck-link{font-size:.8125rem;align-self:flex-start}

/* Invisible hit areas: at least 24px for every control, 44px on touch screens
   (WCAG 2.5.8), without changing the visible size */
.ck-more{position:relative}
.ck-more::after{content:"";position:absolute;left:0;right:0;top:50%;height:24px;translate:0 -50%}
@media (pointer:coarse){
  .ck-x::after{content:"";position:absolute;inset:-6px}
  .ck-fab::after{content:"";position:absolute;inset:-3px}
}

/* Forced Colors (e.g. Windows High Contrast) replaces backgrounds with system colors:
   draw the switch thumb and its on state with system color keywords */
@media (forced-colors:active){
  .ck-sw::before{background:GrayText}
  .ck-sw:checked{border-color:Highlight}
  .ck-sw:checked::before{background:Highlight}
}

/* Movement only for users who have not asked for reduced motion:
   the panel slides in and the switch thumb slides across */
@media (prefers-reduced-motion:no-preference){
  .ck-panel{animation:ckIn .24s var(--ease)}
  .ck-sw::before{transition:translate .2s var(--ease)}
}

/* cookies on a narrow screen */
@media (max-width:43.75em){
  .ck-banner{grid-template-columns:1fr;padding:16px;bottom:12px;gap:12px;max-height:calc(100dvh - 24px)}
  .ck-act .ck-btn{flex:1 1 0;min-width:0;padding:6px 8px;font-size:.8125rem}
  .ck-fab{left:12px;bottom:12px}
  .ck-panel{left:12px;bottom:60px;width:calc(100vw - 24px);max-height:calc(100dvh - 72px)}
}
