/* Floating Terms notice (src/js/terms-bar.js inserts it, so without JS there is nothing here). Not a modal: it
   never covers the whole page, never traps focus, and the page gets bottom padding while it shows so the footer
   links stay reachable. House style: panel surface, alpha hairline, soft shadow, 8px radius. Reads tokens only. */
.terms-bar {
  position: fixed; z-index: 50;
  inset: auto var(--gutter) var(--space-4) auto;
  display: flex; align-items: center; gap: var(--space-3) var(--space-5);
  width: min(36rem, calc(100% - 2 * var(--gutter)));
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  border: 1px solid var(--line); border-radius: var(--radius-btn);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-1);
  font: 400 var(--text-sm)/var(--lh-body) var(--font-body);
  --ring: var(--focus);
}
.terms-bar--pending { opacity: 0; } /* instant: hidden only until its live text is filled in */
.terms-bar__text { flex: 1; margin: 0; }
.terms-bar__text a { color: var(--link); text-underline-offset: 0.2em; padding-block: var(--space-3); margin-block: calc(-1 * var(--space-3)); }
.terms-bar__ok { flex: none; min-height: var(--target); }
/* Default height before terms-bar.js measures it, so the hero reserves the space before first paint (early.js adds
   html.has-terms-bar). Measured: about 129px at 375px wide, 70px from 768px. */
html.has-terms-bar { --terms-bar-h: 129px; scroll-padding-bottom: calc(var(--terms-bar-h) + var(--space-4)); }
@media (min-width: 48em) { html.has-terms-bar { --terms-bar-h: 70px; } }
/* Room under the footer, in the footer's band colour, so the last links can scroll clear of the bar. */
html.has-terms-bar body::after { content: ""; display: block; height: calc(var(--terms-bar-h, 5rem) + 2 * var(--space-4)); background: var(--band); }

@media (max-width: 47.99em) {
  .terms-bar { inset: auto var(--gutter-phone) var(--space-3); width: auto; flex-wrap: wrap; padding: var(--space-3) var(--space-4); }
  .terms-bar__ok { flex: 1 1 100%; }
}
/* After "I agree" by keyboard, focus moves to <main>; don't ring the whole page. */
#main[tabindex="-1"]:focus { outline: none; }
@media print {
  .terms-bar { display: none; }
  html.has-terms-bar body::after { display: none; }
}
