/* HYPERCRATE consent banner. Self-contained: it doesn't rely on the page's own tokens. */
.hcc {
  --hcc-text: #f0f0f3;
  --hcc-sec: #b4b4bd;
  --hcc-accent: #e3fc02;
  --hcc-ink: #171719;
  --hcc-glass: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)), linear-gradient(rgba(20,20,22,.76), rgba(20,20,22,.76));
  --hcc-well: rgba(255,255,255,.045);
  --hcc-ease: cubic-bezier(.22, 1, .36, 1);
  position: fixed; right: 24px; bottom: 24px; z-index: 96;
  width: min(440px, calc(100vw - 48px));
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--hcc-text); line-height: 1.5; text-align: left;
  opacity: 0; transform: translateY(16px);
  transition: opacity .35s var(--hcc-ease), transform .45s var(--hcc-ease);
}
.hcc[hidden], .hcc [hidden] { display: none !important; }
.hcc.hcc-in { opacity: 1; transform: none; }
.hcc.hcc-open { width: min(500px, calc(100vw - 48px)); }
.hcc:focus { outline: none; }
.hcc:focus-visible .hcc-panel { box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 60px -18px rgba(227,252,2,.45); }
.hcc *, .hcc *::before, .hcc *::after { box-sizing: border-box; margin: 0; padding: 0; }

.hcc-panel {
  position: relative;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 48px); max-height: calc(100svh - 48px); overflow: hidden;
  padding: 22px 22px 18px; border: 0; border-radius: 14px;
  background: var(--hcc-glass);
  -webkit-backdrop-filter: blur(40px) saturate(1.9); backdrop-filter: blur(40px) saturate(1.9);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 2px 8px rgba(0,0,0,.3);
}
/* Text and categories scroll; the buttons below them always stay in view. */
.hcc-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -8px; padding: 0 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.hcc-acts { flex: none; }
.hcc-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; padding-right: 36px; }
.hcc-desc { margin-top: 8px; font-size: 14px; color: var(--hcc-sec); }
.hcc-desc a { color: var(--hcc-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); border-radius: 3px; }
.hcc-desc a:hover { text-decoration-color: var(--hcc-accent); }
.hcc-gpc { margin-top: 10px; font-size: 13.5px; color: var(--hcc-text); padding: 10px 12px; border-radius: 8px; background: rgba(2,229,252,.08); }

.hcc-cats { list-style: none; display: grid; gap: 8px; margin-top: 16px; }
.hcc-cat { padding: 13px 14px; border-radius: 10px; background: var(--hcc-well); }
.hcc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hcc-cat h3 { font-size: 14.5px; font-weight: 650; }
.hcc-cat p { margin-top: 4px; font-size: 13.5px; color: var(--hcc-sec); }
.hcc-who { color: var(--hcc-text); opacity: .8; }
.hcc-always { font-size: 13px; color: var(--hcc-sec); white-space: nowrap; }

/* Switch: square-cornered track, no stroke. On = lime fill. */
.hcc-switch {
  flex: none; position: relative; width: 46px; height: 26px; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(0,0,0,.45); box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
  transition: background .2s, box-shadow .2s;
}
.hcc-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 4px; background: #8d8d97; transition: transform .25s var(--hcc-ease), background .2s; }
.hcc-switch[aria-checked="true"] { background: var(--hcc-accent); }
.hcc-switch[aria-checked="true"] .hcc-knob { transform: translateX(20px); background: var(--hcc-ink); }
.hcc-switch[aria-disabled="true"] { cursor: not-allowed; opacity: .45; }

.hcc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.hcc-open .hcc-acts { grid-template-columns: 1fr 1fr 1fr; }
/* Accept all, Reject all and Save choices share one style: same size, colour and weight. */
.hcc-btn {
  height: 44px; padding: 0 12px; border: 0; border-radius: 6px; cursor: pointer;
  font: 700 14.5px/1 Inter, system-ui, sans-serif; letter-spacing: -.005em; white-space: nowrap;
  background: var(--hcc-accent); color: var(--hcc-ink);
  transition: transform .2s var(--hcc-ease), box-shadow .25s, background .2s;
}
.hcc-btn:hover { box-shadow: 0 8px 30px -8px rgba(227,252,2,.5); }
.hcc-btn:active { transform: scale(.98); }
.hcc-btn[hidden], .hcc-choose[hidden], .hcc-x[hidden] { display: none; }
.hcc-choose {
  grid-column: 1 / -1; justify-self: center; height: 36px; padding: 0 14px; border: 0; border-radius: 6px; cursor: pointer;
  background: none; color: var(--hcc-text); font: 600 14px/1 Inter, system-ui, sans-serif;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.35);
  transition: background .2s, color .2s;
}
.hcc-choose:hover { background: rgba(255,255,255,.06); }
.hcc-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 6px; cursor: pointer;
  display: grid; place-items: center; background: none; color: var(--hcc-sec); transition: background .2s, color .2s;
}
.hcc-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.hcc-x:hover { background: rgba(255,255,255,.07); color: var(--hcc-text); }

/* Keyboard focus: a lime glow and tint, never an outline ring. */
.hcc button:focus, .hcc a:focus { outline: none; }
.hcc-btn:focus-visible { background: #f1ff6b; box-shadow: 0 0 26px 4px rgba(227,252,2,.6); transform: translateY(-1px); }
.hcc-choose:focus-visible, .hcc-x:focus-visible { background: rgba(227,252,2,.14); color: var(--hcc-accent); text-decoration-color: var(--hcc-accent); }
.hcc-switch:focus-visible { background: rgba(227,252,2,.22); box-shadow: 0 0 24px 3px rgba(227,252,2,.6); }
.hcc-switch[aria-checked="true"]:focus-visible { background: #f1ff6b; }
.hcc-switch:focus-visible .hcc-knob { background: #f0f0f3; }
.hcc-switch[aria-checked="true"]:focus-visible .hcc-knob { background: var(--hcc-ink); }
.hcc-desc a:focus-visible { background: rgba(227,252,2,.16); color: var(--hcc-accent); text-decoration-color: var(--hcc-accent); }
/* Windows contrast themes drop shadows and backgrounds, so focus needs the system colour there. */
@media (forced-colors: active) {
  .hcc button:focus-visible, .hcc a:focus-visible { outline: 2px solid CanvasText; outline-offset: 2px; }
  .hcc-switch[aria-checked="true"] { background: Highlight; }
}

.hcc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 560px) {
  .hcc, .hcc.hcc-open { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: auto; }
  .hcc-panel { padding: 18px 16px 14px; max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); }
  .hcc-title { font-size: 16px; }
  .hcc-desc { font-size: 13.5px; }
  .hcc-open .hcc-acts { grid-template-columns: 1fr 1fr; }
  .hcc-open .hcc-acts [data-act="save"] { grid-column: 1 / -1; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .hcc, .hcc-knob, .hcc-btn, .hcc-switch { transition: none; }
}
