/* ============================================================================
   Consent surface — shipped DARK.

   With no consent-requiring tag on a page, js/consent.js creates none of these
   elements and a visitor never sees any of this. The styles exist so that the
   day something is added, the banner appears already matching the site.

   Every colour here is a theme token from site.css. A literal hex in this file
   would be a colour sitting outside the audited token blocks, which is exactly
   what tools/check_page.py refuses — and rightly: a colour the contrast audit
   cannot read is a colour nobody has checked.
   ========================================================================= */

.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--panel);
  color: var(--ink);
  border-top: var(--hair) solid var(--line-control);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .16);
}

.consent__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 28px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 28px;
}

.consent__copy { flex: 1 1 34ch; }

.consent h4 {
  font-family: var(--font-display);
  font-stretch: 72%;
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.consent p {
  margin: 0;
  font-size: .95rem;
  color: var(--ink-2);
  max-width: 62ch;
}

.consent__acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.consent__btn {
  font: inherit;
  font-size: .92rem;
  padding: 11px 18px;
  border-radius: var(--r);
  border: var(--hair) solid var(--line-control);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

/* Both actions carry the same visual weight on purpose. Refusing must be exactly
   as easy as accepting — a dim "reject" next to a bright "accept" is the dark
   pattern every regulator names first. Contrast is the audited pair
   --accent-2-ink on --accent-2. */
.consent__btn--primary {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: var(--accent-2-ink);
  font-weight: 600;
}

.consent__btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* The footer opens the banner again. Hidden until consent is actually live, so
   the shipped site carries no button that does nothing. */
.foot .linkbutton {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--foot-ink);
  cursor: pointer;
  text-align: left;
}

.foot .linkbutton:hover { text-decoration: underline; }

.foot .linkbutton:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .consent[data-open] { animation: consent-in .18s ease-out both; }
}

@keyframes consent-in {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
