/* ==========================================================================
   Announcement banner
   Fixed full-width bar above the floating navbar. Pushes .site-header and
   the page content down by its own height (--announcement-height, set by
   js/announcement-banner.js) so it never overlaps them. Dismissible; the
   choice is remembered in localStorage.
   ========================================================================== */

:root {
  --announcement-height: 0px;
}

body {
  padding-top: var(--announcement-height);
  transition: padding-top var(--transition-base);
}

.site-header {
  top: var(--announcement-height);
  transition: top var(--transition-base);
}

/* Set synchronously by the inline head script, before body paints, so a
   previously-dismissed banner never flashes on the next page load. */
.banner-dismissed .announcement-banner {
  display: none;
}

.announcement-banner {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: var(--gradient-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(10, 10, 12, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
  text-align: center;
}

.announcement-banner__text {
  font-size: var(--fs-xxs);
  font-weight: 600;
  color: #f5f5f7;
}

.announcement-banner__link {
  font-weight: 700;
  color: var(--color-red-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.announcement-banner__link:hover {
  color: var(--color-white);
}

.announcement-banner__close {
  position: absolute;
  right: var(--space-5);
  top: 50%;
  transform: translateY(-50%);
  padding: var(--space-2);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.announcement-banner__close:hover {
  color: var(--color-white);
}

@media (max-width: 640px) {
  .announcement-banner {
    padding: var(--space-3) var(--space-7);
  }

  .announcement-banner__text {
    font-size: 0.8125rem;
    line-height: 1.4;
  }

  .announcement-banner__close {
    right: var(--space-3);
  }
}
