/*
 * The analytics consent bar on the home site (tasks HS-1, HS-2; PO decisions 117.1, 144.5, 145.2), drawn by
 * ../js/consent.js. As in the app (apps/web/src/v2/analytics/analytics.css, AN-1 QA F2): FIXED AT THE BOTTOM of the
 * window, so nothing on the page moves when it appears; compact on phones; Accept and Decline carry equal weight.
 * It never covers the page for good: while it shows, consent.js publishes its height as --sh-consent-h on <html>
 * (0 otherwise), and the page keeps that much padding at its end, so the last line can always scroll clear of it.
 */
body { padding-bottom: var(--sh-consent-h, 0px); }
/* A control that takes focus (Tab, or a jump to an in-page target) is scrolled clear of the bar, never left under it
   (WCAG 2.2 SC 2.4.11 Focus Not Obscured; home-site QA MINOR-1). */
html { scroll-padding-bottom: var(--sh-consent-h, 0px); }
/* The case study's sticky contents rail ends above the bar too. */
.toc { max-height: calc(100vh - 120px - var(--sh-consent-h, 0px)); }

.consent {
  position: fixed; right: 0; bottom: 0; left: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 20px;
  padding: 10px clamp(16px, 3vw, 40px) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--sh-line-steel);
  background: linear-gradient(180deg, #1D1D23, var(--sh-raised));
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .55);
  color: var(--sh-text); font-size: .9375rem; line-height: 1.4;
}
.consent:focus { outline: none; }
.consent:focus-visible { outline: 2px solid var(--sh-focus); outline-offset: -4px; }
.consent__line { max-width: 46rem; }
.consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.consent__actions .btn { min-width: 6.5rem; font-family: inherit; cursor: pointer; } /* <button>s do not inherit the font */
.consent__privacy {
  display: inline-flex; align-items: center; min-height: var(--sh-tap); padding: 0 8px;
  color: var(--sh-text-2); font-size: .9375rem; text-decoration: underline;
}
.consent__privacy:hover { color: var(--sh-text); }
/* Compact on phones: a smaller line above one row of the three controls (each still a full 44 px tap target). */
@media (max-width: 760px) {
  .consent { justify-content: flex-start; gap: 6px 8px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); font-size: .8125rem; line-height: 1.3; }
  .consent__line { flex-basis: 100%; }
  .consent__actions { flex-wrap: nowrap; gap: 6px; }
  .consent__actions .btn { min-width: 0; padding: 0 16px; }
  .consent__privacy { font-size: .8125rem; }
}
