# Header Announcement

> A site header with a strip of news on top: messages roll and pause on hover or focus; the cross folds the strip, the header slides up without a jump, and it stays closed. Below 900 px, a shutter menu.

Header · header, announcement bar, top bar, banner, promo bar, dismissible, localStorage, mobile menu, popover, wp_nav_menu · HTML, CSS, vanilla JS · no dependencies · updated 2026-10-28
Demo: https://kodza.dev/components/header-announcement/
Source on GitHub: https://github.com/kodza-dev/kodza/tree/main/components/header-announcement

Takes the whole screen (or reacts to the page scroll): give it a page, not a small box.

## Files

The code below, served as files: byte for byte what the Kodza site copies (the CSS includes its theme guard).

- [`kodza-header-announcement.css`](https://kodza.dev/registry/header-announcement/kodza-header-announcement.css) · 43.3 KB
- [`kodza-header-announcement.js`](https://kodza.dev/registry/header-announcement/kodza-header-announcement.js) · 17.0 KB
- [`kodza-header-announcement.html`](https://kodza.dev/registry/header-announcement/kodza-header-announcement.html) · 2.6 KB · the markup, to adapt and paste into your page

**Can you run shell commands? Download the CSS and the JS, don't retype them.** Retyping costs thousands of tokens and can drop or change lines of the CSS. Put the files where your stack expects them (Use it says where: change the `-o` paths):

```bash
curl -fsSL --create-dirs -o kodza/kodza-header-announcement.css https://kodza.dev/registry/header-announcement/kodza-header-announcement.css
curl -fsSL --create-dirs -o kodza/kodza-header-announcement.js https://kodza.dev/registry/header-announcement/kodza-header-announcement.js
```

Then load the files from your page as Use it shows, instead of pasting the content. The HTML is the part you adapt (text, links, modifiers): paste it from the Code section. Copy the CSS and the JS from the Code section only if you can't run commands, exactly as they are. (Windows PowerShell: `curl.exe`.)

## API

- Root: `.kodza-header-announcement`
- Variables (set them on the root element itself: it declares its own defaults):
  - `--kz-header-announcement-bg: transparent`
  - `--kz-header-announcement-fg: #0a0a0a`
  - `--kz-header-announcement-muted: rgba(10, 10, 10, 0.62)`
  - `--kz-header-announcement-soft: rgba(10, 10, 10, 0.06)` — the Menu button
  - `--kz-header-announcement-ink: #0a0a0a` — the call to action
  - `--kz-header-announcement-on-ink: #ffffff`
  - `--kz-header-announcement-height: 72px`
  - `--kz-header-announcement-width: 1200px` — the row, centred
  - `--kz-header-announcement-pad: 24px`
  - `--kz-header-announcement-strip-bg: #0a0a0a` — the strip of news
  - `--kz-header-announcement-strip-fg: #f2f2f0`
  - `--kz-header-announcement-strip-muted: rgba(242, 242, 240, 0.62)`
  - `--kz-header-announcement-strip-height: 40px`
  - `--kz-header-announcement-interval: 4.5s` — how long each message stays
  - `--kz-header-announcement-roll: 0.7s` — one message rolling to the next
  - `--kz-header-announcement-fold: 0.6s` — the strip folding away
  - `--kz-header-announcement-menu-bg: #0a0a0a` — the shutter, below 900 px
  - `--kz-header-announcement-menu-fg: #f2f2f0`
  - `--kz-header-announcement-menu-muted: rgba(242, 242, 240, 0.62)`
  - `--kz-header-announcement-menu-line: rgba(242, 242, 240, 0.16)`
  - `--kz-header-announcement-menu-top: auto` — where the shutter starts; auto = the bottom of the header
  - `--kz-header-announcement-menu-side: 24px`
  - `--kz-header-announcement-menu-size: clamp(34px, min(10cqw, calc((100cqh - 240px) / 6)), 96px)`
  - `--kz-header-announcement-menu-duration: 0.8s`
  - `--kz-header-announcement-menu-ease: cubic-bezier(0.76, 0, 0.24, 1)`
- Attributes:
  - `data-key`
  - `data-remember`
- Lifecycle: `kodza:init` / `kodza:destroy` on `document`, with `{ detail: { root } }` to target a container.

## Keyboard

What each key does, by where the focus is. Keep it working when you adapt the HTML: same elements, same classes.

- On the cross of the strip (focus in `.kodza-header-announcement__dismiss`):
  - `Enter` / `Space`: Folds the strip away, focus moves on to the logo
- On the Menu button, below 900 px (focus in `.kodza-header-announcement__toggle`):
  - `Enter` / `Space`: Opens or closes the shutter
- In the shutter (focus in `.kodza-header-announcement__panel a`):
  - `Escape`: Rolls it back up, focus back on Menu
  - `Tab`: Past the last link, rolls it up and goes on with the page

## Dark mode

The values Kodza uses on a dark background (`#0a0a0a`). For a page that follows the system theme, add them after the component's CSS:

```css
@media (prefers-color-scheme: dark) {
  .kodza-header-announcement {
    --kz-header-announcement-strip-bg: #f2f2f0;
    --kz-header-announcement-strip-fg: #0a0a0a;
    --kz-header-announcement-strip-muted: rgba(10, 10, 10, 0.62);
    --kz-header-announcement-fg: #f2f2f0;
    --kz-header-announcement-muted: rgba(242, 242, 240, 0.62);
    --kz-header-announcement-soft: rgba(255, 255, 255, 0.08);
    --kz-header-announcement-ink: #f2f2f0;
    --kz-header-announcement-on-ink: #0a0a0a;
    --kz-header-announcement-menu-bg: #f2f2f0;
    --kz-header-announcement-menu-fg: #0a0a0a;
    --kz-header-announcement-menu-muted: rgba(10, 10, 10, 0.62);
    --kz-header-announcement-menu-line: rgba(10, 10, 10, 0.14);
  }
}
```

A site with its own theme switch puts the same rules under its dark selector instead (`[data-theme="dark"] .kodza-header-announcement { … }`); a single dark section, under that section's class.

Every colour is a variable on the header. The strip has its own three (--kz-header-announcement-strip-bg, -strip-fg, -strip-muted): the demo's dark band turns it to paper. Set -fg, -muted, -soft, -ink and -on-ink for a light bar on a dark site, and the --kz-header-announcement-menu-* set (bg, fg, muted, line) for the shutter.

## Use it

### Plain HTML page

- CSS: `kodza/kodza-header-announcement.css` next to the page (the Files commands as they are), linked in `<head>`: `<link rel="stylesheet" href="kodza/kodza-header-announcement.css">`. Without a shell, paste it in a `<style>` in `<head>` instead. It only touches `kodza-` classes.
- HTML: where the component goes. Paste it as many times as you need: instances never interfere.
- Where it goes, step by step. (1) At the top of the page, as its only header: the strip spans the width, the row is centred at --kz-header-announcement-width. (2) Write one to three messages in the strip, each a p, with a link or not; they take turns every --kz-header-announcement-interval, and a single one stays put. (3) Name the announcement with data-key="spring-sale" on the header: change the key and it shows again to everyone who closed it. Without a key, the text of the messages is the key, so new words bring it back on their own. data-remember="session" forgets at the next visit, "off" never remembers. (4) Load the script right after the header rather than at the end of the page, so a strip closed on a past visit does not show for an instant. (5) Mark the current page with aria-current="page" (it gets the underline); below 900 px the Menu button and the shutter take over, from the same links.
- JS: `kodza/kodza-header-announcement.js`, loaded with `<script src="kodza/kodza-header-announcement.js" defer></script>` in `<head>`. Without a shell, paste it in a `<script>` before `</body>` (or in `<head>`: it waits for the page). One copy per page, whatever the number of instances.
- Restyle with the `--kz-…` variables, set on the component's root element itself (the root declares its own defaults, so a value on an ancestor is ignored), and with the modifiers / attributes listed under API.
- Font: it takes the page's own. The Kodza look is Geist: `<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap">`.
- Content added later (AJAX navigation, a SPA route, a builder preview): start it with `document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: container } }))`; before removing it, the same call with `'kodza:destroy'` stops it and puts the original markup back.

### Claude artifact (claude.ai)

- Paste the CSS in a `<style>` and the JS in a `<script>` at the end, in the artifact itself: it loads stylesheets only from Google Fonts and scripts only from a few CDNs, so no `<link>` or `<script src>` to Kodza.
- Writing the artifact file with a shell? Insert the downloaded files (Files) with a command instead of retyping them: a line `KODZA-CSS` alone inside the `<style>`, `KODZA-JS` inside the `<script>`, then `sed -e '/^KODZA-CSS$/{r kodza/kodza-header-announcement.css' -e 'd' -e '}' -e '/^KODZA-JS$/{r kodza/kodza-header-announcement.js' -e 'd' -e '}' page.html > artifact.html`.
- Font: load Geist from Google Fonts (allowed): `<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap">`.
- Dark mode: the viewer sets `data-theme="dark"` or `"light"` on `<html>`, or nothing when it follows the system. Write the Dark mode rules twice: inside `@media (prefers-color-scheme: dark)` with `:root:not([data-theme="light"])` in front of each selector, and with `:root[data-theme="dark"]` in front of each selector.
- Where it goes, step by step. (1) At the top of the page, as its only header: the strip spans the width, the row is centred at --kz-header-announcement-width. (2) Write one to three messages in the strip, each a p, with a link or not; they take turns every --kz-header-announcement-interval, and a single one stays put. (3) Name the announcement with data-key="spring-sale" on the header: change the key and it shows again to everyone who closed it. Without a key, the text of the messages is the key, so new words bring it back on their own. data-remember="session" forgets at the next visit, "off" never remembers. (4) Load the script right after the header rather than at the end of the page, so a strip closed on a past visit does not show for an instant. (5) Mark the current page with aria-current="page" (it gets the underline); below 900 px the Menu button and the shutter take over, from the same links.

### WordPress

- HTML: a **Custom HTML** block (or a pattern / template part). WordPress keeps this markup as it is only for users allowed to post unfiltered HTML (Administrators; Super Admins on multisite): for anyone else it strips tags such as `<svg>`, `<input>` or `<dialog>`, so add it from the theme (a pattern or template part) instead.
- This one spans the page: a block theme keeps a Custom HTML block to the width of the text column, so put it inside a **Group** block set to **Full width**, with **Inner blocks use content width** turned off.
- CSS and JS: the downloaded files go in the theme, under `wp-content/themes/<your-theme>/kodza/` (the child theme if there is one), enqueued from its functions.php (or a code-snippets plugin):
  ```php
  add_action('wp_enqueue_scripts', function () {
    $dir = get_stylesheet_directory() . '/kodza/';
    $uri = get_stylesheet_directory_uri() . '/kodza/';
    wp_enqueue_style('kodza-header-announcement', $uri . 'kodza-header-announcement.css', [], filemtime($dir . 'kodza-header-announcement.css'));
    wp_enqueue_script('kodza-header-announcement', $uri . 'kodza-header-announcement.js', [], filemtime($dir . 'kodza-header-announcement.js'), true);
  });
  ```
  Scoped to `kodza-` classes, the CSS never touches the theme. One copy of the JS, whatever the number of blocks.
- No access to the theme files? The CSS can also go, as it is, in **Appearance → Customize → Additional CSS** (classic theme) or **Styles → Additional CSS** in the Site Editor (block theme).
- Theme with AJAX page transitions: fire `kodza:init` on the new content after each swap (and `kodza:destroy` on the old one).
- Performance plugin (WP Rocket, LiteSpeed Cache, Perfmatters…) with **Delay JavaScript execution** turned on: add `kodza` to the scripts it must not delay. Otherwise the component waits for the visitor's first scroll, tap or mouse move, and that first click can be lost.
- Colours: it takes the colour of the text around it (or keeps its own monochrome): nothing to point at the theme.
- WordPress turns straight quotes and `--` into typographic ones in the text of a Custom HTML block (not inside `<code>` or `<pre>`).
- Put it in the site header (Site Editor → Patterns → Header, or the theme's header.php) in place of the theme's own header. The links can come from wp_nav_menu(['theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s']) inside the ul, with the link class added by the nav_menu_link_attributes filter; the shutter is written from them. The messages are plain paragraphs in the strip: edit them in the HTML. The dismissal lives in the visitor's browser, so page caching plugins change nothing.

#### With Elementor

- HTML: an **HTML** widget (Elementor shows it to administrators only). It keeps the code exactly as pasted, straight quotes included.
- This one spans the page: give the widget its own container, **Content Width: Full Width**, padding 0.
- CSS and JS: as above. Elementor's Site Settings → Theme Style styles every button, field, link and image of the page, components included; the theme guard at the end of the CSS keeps the component's buttons, fields and link colours as they are.
- The Elementor editor redraws each widget after the page has loaded: without the script below, the component stays still in the editor preview (the published page works). Add it once per site, in the footer like the component's script (`kodza/elementor-editor.js`, or a code-snippets plugin):

```js
// Kodza in the Elementor editor: the editor redraws each HTML widget after the page has loaded.
// Start Kodza in what it draws, stop it in what it replaces or removes. Once per site.
window.addEventListener('elementor/frontend/init', () => {
  if (!elementorFrontend.isEditMode()) return;
  class KodzaWidget extends elementorModules.frontend.handlers.Base {
    onInit() {
      super.onInit();
      this.kodza = [...this.$element[0].children];
      document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: this.$element[0] } }));
    }
    onDestroy() {
      super.onDestroy();
      this.kodza.forEach((root) => document.dispatchEvent(new CustomEvent('kodza:destroy', { detail: { root } })));
    }
  }
  elementorFrontend.elementsHandler.attachHandler('html', KodzaWidget);
});
```

- No child theme: everything can go in the HTML widget instead, `<style>` with the CSS, the HTML, then `<script>` with the JS. It works on the page and in the editor without the script above.

### Shopify

- Files: `assets/kodza-header-announcement.css` and `assets/kodza-header-announcement.js` (the Files commands with `-o assets/…`).
- In the section: `{{ 'kodza-header-announcement.css' | asset_url | stylesheet_tag }}` and `<script src="{{ 'kodza-header-announcement.js' | asset_url }}" defer></script>`, then the HTML.
- The theme editor re-renders sections: restart them with
  `document.addEventListener('shopify:section:load', (e) => document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: e.target } })));`
  and the same with `shopify:section:unload` → `kodza:destroy`.
- Where it goes, step by step. (1) At the top of the page, as its only header: the strip spans the width, the row is centred at --kz-header-announcement-width. (2) Write one to three messages in the strip, each a p, with a link or not; they take turns every --kz-header-announcement-interval, and a single one stays put. (3) Name the announcement with data-key="spring-sale" on the header: change the key and it shows again to everyone who closed it. Without a key, the text of the messages is the key, so new words bring it back on their own. data-remember="session" forgets at the next visit, "off" never remembers. (4) Load the script right after the header rather than at the end of the page, so a strip closed on a past visit does not show for an instant. (5) Mark the current page with aria-current="page" (it gets the underline); below 900 px the Menu button and the shutter take over, from the same links.

### React / Next.js

- Files, side by side (e.g. in `components/kodza/`): `HeaderAnnouncement.tsx` (below), the CSS block under Code saved as `header-announcement.css` and the JS block as `header-announcement.js`, both as they are. The HTML block is already inside the component: skip it.
- Use it: `import { HeaderAnnouncement } from '@/components/kodza/HeaderAnnouncement';` then `<HeaderAnnouncement />`. Props: `vars` (the `--kz-…` variables listed under API, e.g. `vars={{ '--kz-header-announcement-bg': … }}`), `className`, `style` and the other props of its `<header>` (`onClick`, `aria-…`).
- Next.js App Router: it is a Client Component already (`'use client'`). Pages Router: Next.js takes global CSS only in `pages/_app`, so move the `import './header-announcement.css'` line there.
- Safe under StrictMode, client-side navigation and prop changes: when a prop changes, the `key` gives React a fresh element, `kodza:destroy` stops the script on the old one and `kodza:init` starts it on the new one.
- Built from your data (tabs, rows, options)? Add what the markup is made of to the `key`, as plain values (ids, text, numbers). What the visitor changes (the open tab, the sort, what they type) is the script's: follow it with `onClick` or `onInput` on the root, and change it from your code as a visitor would (click the tab; set the field's value, then dispatch a bubbling `input` event). Fields stay uncontrolled (`defaultValue`, `name`).

```tsx
'use client';
// Kodza — Header Announcement, for React. From https://kodza.dev/components/header-announcement/
// Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license
// Next to this file: header-announcement.css and header-announcement.js, the component's CSS and JS from Kodza, as they are.
// Yours to edit: the markup is plain JSX below.
// The script changes this markup once React has rendered it (it adds layers, splits text, moves
// nodes), so React must not patch it afterwards. When a prop changes, the key gives React a fresh
// element: kodza:destroy stops the script on the old one, kodza:init starts it on the new one.
// Built from your data (tabs, rows, options)? Put what the markup is made of in the key, as plain
// values (ids, text, numbers): a change starts the script again on fresh markup. What the visitor
// changes (the open tab, the sort, what they type) is the script's: keep it out of the key, follow
// it with onClick or onInput on the root, and change it from your code as a visitor would (click
// the tab; set the field's value, then dispatch a bubbling input event).
import { useRef, useEffect, type ComponentPropsWithoutRef, type ComponentRef, type CSSProperties } from 'react';
import './header-announcement.css';

export type HeaderAnnouncementProps = Omit<ComponentPropsWithoutRef<'header'>, "children" | "vars"> & {
  /** Settings, as CSS variables on the root */
  vars?: {
    /** default: transparent */
    "--kz-header-announcement-bg"?: string | number;
    /** default: #0a0a0a */
    "--kz-header-announcement-fg"?: string | number;
    /** default: rgba(10, 10, 10, 0.62) */
    "--kz-header-announcement-muted"?: string | number;
    /** the Menu button — default: rgba(10, 10, 10, 0.06) */
    "--kz-header-announcement-soft"?: string | number;
    /** the call to action — default: #0a0a0a */
    "--kz-header-announcement-ink"?: string | number;
    /** default: #ffffff */
    "--kz-header-announcement-on-ink"?: string | number;
    /** default: 72px */
    "--kz-header-announcement-height"?: string | number;
    /** the row, centred — default: 1200px */
    "--kz-header-announcement-width"?: string | number;
    /** default: 24px */
    "--kz-header-announcement-pad"?: string | number;
    /** the strip of news — default: #0a0a0a */
    "--kz-header-announcement-strip-bg"?: string | number;
    /** default: #f2f2f0 */
    "--kz-header-announcement-strip-fg"?: string | number;
    /** default: rgba(242, 242, 240, 0.62) */
    "--kz-header-announcement-strip-muted"?: string | number;
    /** default: 40px */
    "--kz-header-announcement-strip-height"?: string | number;
    /** how long each message stays — default: 4.5s */
    "--kz-header-announcement-interval"?: string | number;
    /** one message rolling to the next — default: 0.7s */
    "--kz-header-announcement-roll"?: string | number;
    /** the strip folding away — default: 0.6s */
    "--kz-header-announcement-fold"?: string | number;
    /** the shutter, below 900 px — default: #0a0a0a */
    "--kz-header-announcement-menu-bg"?: string | number;
    /** default: #f2f2f0 */
    "--kz-header-announcement-menu-fg"?: string | number;
    /** default: rgba(242, 242, 240, 0.62) */
    "--kz-header-announcement-menu-muted"?: string | number;
    /** default: rgba(242, 242, 240, 0.16) */
    "--kz-header-announcement-menu-line"?: string | number;
    /** where the shutter starts; auto = the bottom of the header — default: auto */
    "--kz-header-announcement-menu-top"?: string | number;
    /** default: 24px */
    "--kz-header-announcement-menu-side"?: string | number;
    /** default: clamp(34px, min(10cqw, calc((100cqh - 240px) / 6)), 96px) */
    "--kz-header-announcement-menu-size"?: string | number;
    /** default: 0.8s */
    "--kz-header-announcement-menu-duration"?: string | number;
    /** default: cubic-bezier(0.76, 0, 0.24, 1) */
    "--kz-header-announcement-menu-ease"?: string | number;
  };
  className?: string;
};

export function HeaderAnnouncement({ vars, className, style, ...rest }: HeaderAnnouncementProps) {
  const ref = useRef<ComponentRef<'header'>>(null);
  const classes = ["kodza-header-announcement", className].filter(Boolean).join(' ');
  // Everything the markup is made of: when it changes, React gets a fresh element (see the top)
  const key = JSON.stringify([classes, vars, style, rest]);

  // Starts the script on this element once React has rendered it, stops it when it goes
  useEffect(() => {
    const root = ref.current;
    let live = true;
    // @ts-ignore: a plain script, no types to find
    import('./header-announcement.js').then(() => {
      if (live) document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root } }));
    });
    return () => {
      live = false;
      document.dispatchEvent(new CustomEvent('kodza:destroy', { detail: { root } }));
    };
  }, [key]);

  return (
    <header key={key} {...rest} className={classes} style={{ ...vars, ...style } as CSSProperties} ref={ref}>
      <div className="kodza-header-announcement__strip">
        <div className="kodza-header-announcement__fold">
          <div className="kodza-header-announcement__news">
            <p className="kodza-header-announcement__message">
              <a href="#">Tern 2.0: cron checks, zero YAML <span aria-hidden="true">→</span></a>
            </p>
            <p className="kodza-header-announcement__message">Free for side projects. No card asked.</p>
            <p className="kodza-header-announcement__message">
              <a href="#">Status pages now weigh 9 kB <span aria-hidden="true">→</span></a>
            </p>
          </div>
          <button className="kodza-header-announcement__dismiss" type="button" aria-label="Dismiss the announcement">
            <span className="kodza-header-announcement__x" aria-hidden="true" />
          </button>
        </div>
      </div>
      <div className="kodza-header-announcement__row">
        <a className="kodza-header-announcement__logo" href="#" aria-label="Tern, home">
          <svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true">
            <path d="M2 7.5 12 12l10-4.5L12 3z" />
            <path d="M2 12.5 12 17l10-4.5V16l-10 5-10-5z" />
          </svg>
          <span>tern</span>
        </a>
        <nav className="kodza-header-announcement__menu" aria-label="Main">
          <ul className="kodza-header-announcement__links">
            <li>
              <a className="kodza-header-announcement__link" href="#" aria-current="page">Product</a>
            </li>
            <li>
              <a className="kodza-header-announcement__link" href="#">Pricing</a>
            </li>
            <li>
              <a className="kodza-header-announcement__link" href="#">Docs</a>
            </li>
            <li>
              <a className="kodza-header-announcement__link" href="#">Changelog</a>
            </li>
          </ul>
        </nav>
        <div className="kodza-header-announcement__end">
          <a className="kodza-header-announcement__sign" href="#">Sign in</a>
          {' '}
          <a className="kodza-header-announcement__cta" href="#">Start free</a>
          {' '}
          <button className="kodza-header-announcement__toggle" type="button" aria-expanded="false">
            <span className="kodza-header-announcement__lines" aria-hidden="true" />
            <span className="kodza-header-announcement__label">
              <span className="kodza-header-announcement__say">Menu</span>
              <span className="kodza-header-announcement__say" aria-hidden="true">Close</span>
            </span>
          </button>
          <div className="kodza-header-announcement__panel" popover="" aria-label="Menu">
            <nav className="kodza-header-announcement__list" aria-label="Main" />
            <div className="kodza-header-announcement__info">
              <p className="kodza-header-announcement__more">
                <a className="kodza-header-announcement__action" href="#">Start free</a>
              </p>
              <p className="kodza-header-announcement__socials">
                <a href="#">Sign in</a>
                <a href="#">GitHub</a>
                <a href="#">Status</a>
              </p>
            </div>
          </div>
        </div>
      </div>
    </header>
  );
}
```

- Where it goes, step by step. (1) At the top of the page, as its only header: the strip spans the width, the row is centred at --kz-header-announcement-width. (2) Write one to three messages in the strip, each a p, with a link or not; they take turns every --kz-header-announcement-interval, and a single one stays put. (3) Name the announcement with data-key="spring-sale" on the header: change the key and it shows again to everyone who closed it. Without a key, the text of the messages is the key, so new words bring it back on their own. data-remember="session" forgets at the next visit, "off" never remembers. (4) Load the script right after the header rather than at the end of the page, so a strip closed on a past visit does not show for an instant. (5) Mark the current page with aria-current="page" (it gets the underline); below 900 px the Menu button and the shutter take over, from the same links.

## Code

```html
<header class="kodza-header-announcement">
  <div class="kodza-header-announcement__strip">
    <div class="kodza-header-announcement__fold">
      <div class="kodza-header-announcement__news">
        <p class="kodza-header-announcement__message"><a href="#">Tern 2.0: cron checks, zero YAML <span aria-hidden="true">→</span></a></p>
        <p class="kodza-header-announcement__message">Free for side projects. No card asked.</p>
        <p class="kodza-header-announcement__message"><a href="#">Status pages now weigh 9 kB <span aria-hidden="true">→</span></a></p>
      </div>
      <button class="kodza-header-announcement__dismiss" type="button" aria-label="Dismiss the announcement"><span class="kodza-header-announcement__x" aria-hidden="true"></span></button>
    </div>
  </div>
  <div class="kodza-header-announcement__row">
    <a class="kodza-header-announcement__logo" href="#" aria-label="Tern, home"><svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true"><path d="M2 7.5 12 12l10-4.5L12 3z"/><path d="M2 12.5 12 17l10-4.5V16l-10 5-10-5z"/></svg><span>tern</span></a>
    <nav class="kodza-header-announcement__menu" aria-label="Main">
      <ul class="kodza-header-announcement__links">
        <li><a class="kodza-header-announcement__link" href="#" aria-current="page">Product</a></li>
        <li><a class="kodza-header-announcement__link" href="#">Pricing</a></li>
        <li><a class="kodza-header-announcement__link" href="#">Docs</a></li>
        <li><a class="kodza-header-announcement__link" href="#">Changelog</a></li>
      </ul>
    </nav>
    <div class="kodza-header-announcement__end">
      <a class="kodza-header-announcement__sign" href="#">Sign in</a>
      <a class="kodza-header-announcement__cta" href="#">Start free</a>
      <button class="kodza-header-announcement__toggle" type="button" aria-expanded="false"><span class="kodza-header-announcement__lines" aria-hidden="true"></span><span class="kodza-header-announcement__label"><span class="kodza-header-announcement__say">Menu</span><span class="kodza-header-announcement__say" aria-hidden="true">Close</span></span></button>
      <div class="kodza-header-announcement__panel" popover aria-label="Menu">
        <nav class="kodza-header-announcement__list" aria-label="Main"></nav>
        <div class="kodza-header-announcement__info">
          <p class="kodza-header-announcement__more"><a class="kodza-header-announcement__action" href="#">Start free</a></p>
          <p class="kodza-header-announcement__socials"><a href="#">Sign in</a><a href="#">GitHub</a><a href="#">Status</a></p>
        </div>
      </div>
    </div>
  </div>
</header>
```

```css
/* Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license */
/* Kodza — Header Announcement
   A header with a strip of news on top. The messages roll one after the other (the old one goes
   up, the next one comes from below) and wait while you read; the cross folds the strip away,
   the header slides up in its place, and the site remembers. A new message comes back on its own.
   Below 900 px the links give way to a Menu button and a shutter that comes down under the
   header, written from the same links. Everything is tuned with the --kz-header-announcement-*
   variables (--kz-header-announcement-strip-* for the strip, -menu-* for the shutter). */
.kodza-header-announcement {
  --kz-header-announcement-bg: transparent;
  --kz-header-announcement-fg: #0a0a0a;
  --kz-header-announcement-muted: rgba(10, 10, 10, 0.62);
  --kz-header-announcement-soft: rgba(10, 10, 10, 0.06); /* the Menu button */
  --kz-header-announcement-ink: #0a0a0a; /* the call to action */
  --kz-header-announcement-on-ink: #ffffff;
  --kz-header-announcement-height: 72px;
  --kz-header-announcement-width: 1200px; /* the row, centred */
  --kz-header-announcement-pad: 24px;
  --kz-header-announcement-strip-bg: #0a0a0a; /* the strip of news */
  --kz-header-announcement-strip-fg: #f2f2f0;
  --kz-header-announcement-strip-muted: rgba(242, 242, 240, 0.62);
  --kz-header-announcement-strip-height: 40px;
  --kz-header-announcement-interval: 4.5s; /* how long each message stays */
  --kz-header-announcement-roll: 0.7s; /* one message rolling to the next */
  --kz-header-announcement-fold: 0.6s; /* the strip folding away */
  --kz-header-announcement-menu-bg: #0a0a0a; /* the shutter, below 900 px */
  --kz-header-announcement-menu-fg: #f2f2f0;
  --kz-header-announcement-menu-muted: rgba(242, 242, 240, 0.62);
  --kz-header-announcement-menu-line: rgba(242, 242, 240, 0.16);
  --kz-header-announcement-menu-top: auto; /* where the shutter starts; auto = the bottom of the header */
  --kz-header-announcement-menu-side: 24px;
  --kz-header-announcement-menu-size: clamp(34px, min(10cqw, calc((100cqh - 240px) / 6)), 96px);
  --kz-header-announcement-menu-duration: 0.8s;
  --kz-header-announcement-menu-ease: cubic-bezier(0.76, 0, 0.24, 1);

  position: relative;
  z-index: 60;
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--kz-header-announcement-bg);
  color: var(--kz-header-announcement-fg);
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  container-type: inline-size;
}

/* The strip: a grid row that folds from 1fr to 0fr, so the header under it slides up as it goes,
   never jumps. Its content clips from the bottom, like a blind rolled up */
.kodza-header-announcement__strip {
  display: grid;
  grid-template-rows: 1fr;
  margin: 0;
  padding: 0;
  background: var(--kz-header-announcement-strip-bg);
  color: var(--kz-header-announcement-strip-fg);
  -webkit-font-smoothing: antialiased;
  transition: grid-template-rows var(--kz-header-announcement-fold) cubic-bezier(0.65, 0, 0.35, 1);
}

.kodza-header-announcement__strip.is-dismissed {
  grid-template-rows: 0fr;
}

.kodza-header-announcement__strip[hidden] {
  display: none;
}

/* The message in the middle, the cross on the right: the same width either side keeps the
   message in the true centre */
.kodza-header-announcement__fold {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--kz-header-announcement-width);
  min-height: 0;
  margin: 0 auto;
  padding: 0 calc(var(--kz-header-announcement-pad) - 8px);
  overflow: hidden;
}

/* Folding away: the message lifts a little and dims while the strip closes over it */
.kodza-header-announcement__fold > * {
  transition:
    translate var(--kz-header-announcement-fold) cubic-bezier(0.65, 0, 0.35, 1),
    opacity calc(var(--kz-header-announcement-fold) * 0.6);
}

.kodza-header-announcement__strip.is-dismissed .kodza-header-announcement__fold > * {
  translate: 0 -10px;
  opacity: 0;
}

/* The messages share one cell; the strip's own height is their mask */
.kodza-header-announcement__news {
  display: grid;
  grid-column: 2;
  height: var(--kz-header-announcement-strip-height);
  overflow: hidden;
}

.kodza-header-announcement__message {
  grid-area: 1 / 1;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  line-height: var(--kz-header-announcement-strip-height);
  letter-spacing: -0.005em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Without the script, the first message alone; with it, the one it shows */
.kodza-header-announcement__message + .kodza-header-announcement__message,
.kodza-header-announcement.is-ready .kodza-header-announcement__message {
  visibility: hidden;
}

.kodza-header-announcement.is-ready .kodza-header-announcement__message.is-shown {
  visibility: visible;
}

.kodza-header-announcement__message a {
  color: inherit;
  text-decoration: none;
  border-radius: 2px;
}

.kodza-header-announcement__message a span {
  display: inline-block;
  margin-left: 2px;
  transition: translate 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  .kodza-header-announcement__message a:hover span {
    translate: 3px 0;
  }
}

.kodza-header-announcement__message a:focus-visible {
  outline: 2px solid var(--kz-header-announcement-strip-fg);
  outline-offset: 2px;
}

/* The cross: two strokes, dim until pointed at */
.kodza-header-announcement__dismiss {
  position: relative;
  display: block;
  grid-column: 3;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--kz-header-announcement-strip-muted);
  cursor: pointer;
  /* Its own colours, and the fold it shares with the messages */
  transition:
    color 0.2s,
    background-color 0.2s,
    translate var(--kz-header-announcement-fold) cubic-bezier(0.65, 0, 0.35, 1),
    opacity calc(var(--kz-header-announcement-fold) * 0.6);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .kodza-header-announcement__dismiss:hover {
    background: color-mix(in srgb, var(--kz-header-announcement-strip-fg) 12%, transparent);
    color: var(--kz-header-announcement-strip-fg);
  }
}

.kodza-header-announcement__dismiss:focus-visible {
  color: var(--kz-header-announcement-strip-fg);
  outline: 2px solid var(--kz-header-announcement-strip-fg);
  outline-offset: 0;
}

.kodza-header-announcement__x {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
}

.kodza-header-announcement__x::before,
.kodza-header-announcement__x::after {
  content: "";
  position: absolute;
  top: 5.25px;
  left: 0;
  width: 12px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  rotate: 45deg;
}

.kodza-header-announcement__x::after {
  rotate: -45deg;
}

/* Three columns, the middle one as wide as the links: they sit in the true centre, whatever the
   width of the logo and of the button */
.kodza-header-announcement__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  max-width: var(--kz-header-announcement-width);
  height: var(--kz-header-announcement-height);
  margin: 0 auto;
  padding: 0 var(--kz-header-announcement-pad);
}

.kodza-header-announcement__logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  height: 40px;
  margin: 0;
  border-radius: 6px;
  color: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.kodza-header-announcement__logo svg {
  display: block;
  flex: none;
  fill: currentColor;
}

.kodza-header-announcement__menu {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
}

.kodza-header-announcement__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kodza-header-announcement__links > li {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kodza-header-announcement__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--kz-header-announcement-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.kodza-header-announcement__link:hover,
.kodza-header-announcement__link:focus-visible,
.kodza-header-announcement__link[aria-current="page"] {
  color: var(--kz-header-announcement-fg);
}

/* A hairline under the word: drawn from the left when pointed at, gone to the right after.
   The page you are on keeps it */
.kodza-header-announcement__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  scale: 0 1;
  transform-origin: right center;
  transition: scale 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.kodza-header-announcement__link:hover::after,
.kodza-header-announcement__link[aria-current="page"]::after {
  scale: 1 1;
  transform-origin: left center;
}

.kodza-header-announcement__link:focus-visible,
.kodza-header-announcement__logo:focus-visible {
  outline: 2px solid var(--kz-header-announcement-fg);
  outline-offset: 2px;
}

.kodza-header-announcement__end {
  display: flex;
  grid-column: 3;
  align-items: center;
  justify-self: end;
  gap: 8px;
  margin: 0;
}

.kodza-header-announcement__sign {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--kz-header-announcement-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.kodza-header-announcement__sign:hover {
  color: var(--kz-header-announcement-fg);
}

.kodza-header-announcement__sign:focus-visible {
  outline: 2px solid var(--kz-header-announcement-fg);
  outline-offset: 2px;
}

.kodza-header-announcement__cta {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--kz-header-announcement-ink);
  color: var(--kz-header-announcement-on-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s;
}

@media (hover: hover) {
  .kodza-header-announcement__cta:hover {
    background: color-mix(in srgb, var(--kz-header-announcement-ink) 84%, transparent);
  }
}

.kodza-header-announcement__cta:focus-visible {
  outline: 2px solid var(--kz-header-announcement-ink);
  outline-offset: 3px;
}

/* The Menu button: two lines meet, then cross; the label rolls without changing the width */
.kodza-header-announcement__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 18px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--kz-header-announcement-soft);
  color: var(--kz-header-announcement-fg);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.kodza-header-announcement__toggle:focus-visible {
  outline: 2px solid var(--kz-header-announcement-fg);
  outline-offset: 3px;
}

.kodza-header-announcement__lines {
  position: relative;
  flex: none;
  width: 14px;
  height: 8px;
}

.kodza-header-announcement__lines::before,
.kodza-header-announcement__lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  /* On its own layer: drawn the same way at rest and while turning, so no snap at the end */
  will-change: transform;
  /* Closing: they uncross first, then part */
  transition:
    rotate 0.22s cubic-bezier(0.65, 0, 0.35, 1),
    translate 0.22s cubic-bezier(0.65, 0, 0.35, 1) 0.18s,
    clip-path 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.kodza-header-announcement__lines::before {
  top: 0;
}

.kodza-header-announcement__lines::after {
  top: 6px; /* whole pixels: both lines sit on the pixel grid the same way */
}

/* Whole at rest, as an inset: the pointer slides it to a shorter one (from none it would jump) */
.kodza-header-announcement__lines::after {
  clip-path: inset(0 0 0 0);
}

.kodza-header-announcement__toggle:hover .kodza-header-announcement__lines::after {
  clip-path: inset(0 45% 0 0);
}

.kodza-header-announcement__toggle[aria-expanded="true"] .kodza-header-announcement__lines::before,
.kodza-header-announcement__toggle[aria-expanded="true"] .kodza-header-announcement__lines::after {
  clip-path: inset(0 0 0 0);
  transition:
    translate 0.2s cubic-bezier(0.65, 0, 0.35, 1),
    rotate 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.17s,
    clip-path 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.kodza-header-announcement__toggle[aria-expanded="true"] .kodza-header-announcement__lines::before {
  translate: 0 3px;
  rotate: 45deg;
}

.kodza-header-announcement__toggle[aria-expanded="true"] .kodza-header-announcement__lines::after {
  translate: 0 -3px;
  rotate: -45deg;
}

.kodza-header-announcement__label {
  display: grid;
  margin: -3px 0;
  padding: 3px 0;
  overflow: hidden;
}

/* The script rolls the words both ways: the old one goes up, the new one comes up from below */
.kodza-header-announcement__say {
  grid-area: 1 / 1;
}

.kodza-header-announcement__say + .kodza-header-announcement__say {
  translate: 0 115%;
}

.kodza-header-announcement__toggle[aria-expanded="true"] .kodza-header-announcement__say {
  translate: 0 -115%;
}

.kodza-header-announcement__toggle[aria-expanded="true"] .kodza-header-announcement__say + .kodza-header-announcement__say {
  translate: 0 0;
}

/* The shutter: from the bottom of the header to the bottom of the screen, rolled up until it
   opens. A native popover, so Escape, a click outside and the focus going back to Menu are the
   browser's own */
.kodza-header-announcement__panel {
  position: fixed;
  inset: var(--kz-header-announcement-from, 0px) 0 0 0;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0 var(--kz-header-announcement-menu-side);
  border: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  background: var(--kz-header-announcement-menu-bg);
  color: var(--kz-header-announcement-menu-fg);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  container-type: size;
  z-index: 99990;
  /* Here and not on the open state: the panel keeps its rows while it rolls back up */
  grid-template-rows: 1fr auto;
  -webkit-font-smoothing: antialiased;
  clip-path: inset(0 0 100% 0);
  /* Closing: quicker than it came down */
  transition:
    clip-path calc(var(--kz-header-announcement-menu-duration) * 0.7) var(--kz-header-announcement-menu-ease),
    display calc(var(--kz-header-announcement-menu-duration) * 0.7) allow-discrete,
    overlay calc(var(--kz-header-announcement-menu-duration) * 0.7) allow-discrete;
}

.kodza-header-announcement__panel:popover-open {
  display: grid;
  clip-path: inset(0 0 0 0);
  transition:
    clip-path var(--kz-header-announcement-menu-duration) var(--kz-header-announcement-menu-ease),
    display var(--kz-header-announcement-menu-duration) allow-discrete,
    overlay var(--kz-header-announcement-menu-duration) allow-discrete;
}

@starting-style {
  .kodza-header-announcement__panel:popover-open {
    clip-path: inset(0 0 100% 0);
  }
}

.kodza-header-announcement__list {
  align-self: center;
  display: grid;
  margin: 0;
  padding: 28px 0;
}

/* Each row: its hairline draws in, then the word rises from its mask */
.kodza-header-announcement__item {
  position: relative;
  display: grid;
  grid-template-columns: clamp(44px, 9cqw, 132px) minmax(0, 1fr);
  align-items: start;
  margin: 0;
  padding: 14px 0 10px;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.kodza-header-announcement__item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--kz-header-announcement-menu-line);
  scale: 0 1;
  transform-origin: left center;
  transition: scale 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.kodza-header-announcement__index {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 0.4em;
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--kz-header-announcement-menu-muted);
  opacity: 0;
  transition: opacity 0.2s, color 0.25s;
}

/* The page you are on: its number lights up, with a dot */
.kodza-header-announcement__item[aria-current="page"] .kodza-header-announcement__index {
  color: var(--kz-header-announcement-menu-fg);
}

.kodza-header-announcement__item[aria-current="page"] .kodza-header-announcement__index::after {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* The mask has the size of its word, so its room for descenders (g, j, p, q, y) and its step
   aside are measured on the word */
.kodza-header-announcement__mask {
  display: block;
  margin: -0.06em 0 -0.24em;
  padding: 0.06em 0 0.24em;
  overflow: hidden;
  font-size: var(--kz-header-announcement-menu-size);
  transition: translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.kodza-header-announcement__word {
  display: block;
  font-size: var(--kz-header-announcement-menu-size);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
  translate: 0 135%;
  /* Closing: the words drop back into their masks while the shutter rolls up */
  transition: translate 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}

.kodza-header-announcement__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 16px 0 22px;
  border-top: 1px solid var(--kz-header-announcement-menu-line);
  opacity: 0;
  translate: 0 8px;
  transition: opacity 0.2s, translate 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.kodza-header-announcement__info p {
  margin: 0;
}

.kodza-header-announcement__action {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--kz-header-announcement-menu-fg);
  color: var(--kz-header-announcement-menu-bg);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.kodza-header-announcement__action:focus-visible {
  outline: 2px solid var(--kz-header-announcement-menu-fg);
  outline-offset: 3px;
}

.kodza-header-announcement__socials {
  display: flex;
  gap: 20px;
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--kz-header-announcement-menu-muted);
}

.kodza-header-announcement__socials a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

/* Open: each part starts when the edge reaches it (the script sets --kz-header-announcement-delay) */
.kodza-header-announcement__panel.is-open .kodza-header-announcement__item::before {
  scale: 1 1;
  transition: scale 0.9s cubic-bezier(0.22, 1, 0.36, 1) var(--kz-header-announcement-delay, 0s);
}

.kodza-header-announcement__panel.is-open .kodza-header-announcement__index {
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--kz-header-announcement-delay, 0s) + 0.12s), color 0.25s;
}

.kodza-header-announcement__panel.is-open .kodza-header-announcement__word {
  translate: 0 0;
  transition: translate 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--kz-header-announcement-delay, 0s);
}

.kodza-header-announcement__panel.is-open .kodza-header-announcement__info {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--kz-header-announcement-delay, 0s),
    translate 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--kz-header-announcement-delay, 0s);
}

/* Pointed at: the word steps aside and its number lights up */
.kodza-header-announcement__item:hover .kodza-header-announcement__mask,
.kodza-header-announcement__item:focus-visible .kodza-header-announcement__mask {
  translate: 0.14em 0;
}

.kodza-header-announcement__item:hover .kodza-header-announcement__index,
.kodza-header-announcement__item:focus-visible .kodza-header-announcement__index,
.kodza-header-announcement__socials a:hover {
  color: var(--kz-header-announcement-menu-fg);
}

.kodza-header-announcement__item:focus-visible .kodza-header-announcement__word {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.12em;
}

.kodza-header-announcement__socials a:focus-visible {
  outline: 2px solid var(--kz-header-announcement-menu-fg);
  outline-offset: 4px;
}

/* Below 900 px the links give way to the Menu button; below 520 px only Menu stays */
@container (max-width: 899px) {
  .kodza-header-announcement__menu {
    display: none;
  }
}

@container (min-width: 900px) {
  .kodza-header-announcement__toggle {
    display: none;
  }
}

@container (max-width: 519px) {
  .kodza-header-announcement__row {
    padding: 0 16px;
  }

  .kodza-header-announcement__fold {
    padding: 0 8px;
  }

  .kodza-header-announcement__sign,
  .kodza-header-announcement__cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kodza-header-announcement__strip,
  .kodza-header-announcement__fold > *,
  .kodza-header-announcement__link::after,
  .kodza-header-announcement__panel,
  .kodza-header-announcement__panel *,
  .kodza-header-announcement__panel *::before,
  .kodza-header-announcement__toggle *,
  .kodza-header-announcement__toggle *::before,
  .kodza-header-announcement__toggle *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* kodza-guard 513a8e19758b — generated by Kodza, do not edit.
   Theme guard: keeps a site's own CSS (WordPress themes, Bootstrap, CSS resets…) off this
   component. :not(#_) is always true and weighs as much as an id, so these lines win over
   theme rules made of classes and tags. Customise the component through its --kz-* variables. */

/* What the browser gives, where the component sets it only in some states: at the lowest weight, so its own rules below put it back */

:where(.kodza-header-announcement__dismiss):not(#_),
:where(.kodza-header-announcement__logo):not(#_),
:where(.kodza-header-announcement__link):not(#_),
:where(.kodza-header-announcement__sign):not(#_),
:where(.kodza-header-announcement__cta):not(#_),
:where(.kodza-header-announcement__toggle):not(#_),
:where(.kodza-header-announcement__message a:where(:not([class*="kodza-"]))):not(#_),
:where(.kodza-header-announcement__socials a:where(:not([class*="kodza-"]))):not(#_) {
  outline: revert;
  outline-offset: revert;
}

:where(.kodza-header-announcement__list):not(#_),
:where(.kodza-header-announcement__item):not(#_),
:where(.kodza-header-announcement__more):not(#_),
:where(.kodza-header-announcement__socials):not(#_) {
  transition-duration: revert;
  transition-delay: revert;
}

:where(.kodza-header-announcement__action):not(#_) {
  outline: revert;
  outline-offset: revert;
  transition-duration: revert;
  transition-delay: revert;
}

/* What the browser gives, on everything the component leaves to it */

.kodza-header-announcement:not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-height: revert;
  font-family: revert;
  font-weight: revert;
  font-style: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__strip:not(#_),
.kodza-header-announcement__news:not(#_),
.kodza-header-announcement__x:not(#_),
.kodza-header-announcement__end:not(#_),
.kodza-header-announcement__lines:not(#_),
.kodza-header-announcement__label:not(#_),
.kodza-header-announcement__say:not(#_),
.kodza-header-announcement__index:not(#_),
.kodza-header-announcement__mask:not(#_),
.kodza-header-announcement__word:not(#_),
.kodza-header-announcement__info:not(#_),
.kodza-header-announcement__message span:where(:not([class*="kodza-"])):not(#_),
.kodza-header-announcement__logo span:where(:not([class*="kodza-"])):not(#_) {
  box-sizing: revert;
}

.kodza-header-announcement__message:not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  color: revert;
  font-family: revert;
  font-style: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__dismiss:not(#_) {
  text-decoration: revert;
  list-style: revert;
  float: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  white-space: revert;
  min-height: revert;
}

.kodza-header-announcement__logo:not(#_) {
  border: revert;
  padding: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-style: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__menu:not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  color: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__links:not(#_),
.kodza-header-announcement__links li:where(:not([class*="kodza-"]):not(.kodza-header-announcement__links [class*="kodza-"] *)):not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  color: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__link:not(#_) {
  border: revert;
  list-style: revert;
  float: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-style: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__sign:not(#_) {
  border: revert;
  list-style: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-style: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__cta:not(#_) {
  border: revert;
  list-style: revert;
  float: revert;
  position: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-style: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__toggle:not(#_) {
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  float: revert;
  position: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  min-height: revert;
}

.kodza-header-announcement__list:not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  color: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
}

.kodza-header-announcement__item:not(#_) {
  border: revert;
  border-radius: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
}

.kodza-header-announcement__more:not(#_) {
  border: revert;
  padding: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  color: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
}

.kodza-header-announcement__action:not(#_) {
  border: revert;
  margin: revert;
  list-style: revert;
  float: revert;
  position: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-style: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
}

.kodza-header-announcement__socials:not(#_) {
  border: revert;
  padding: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-weight: revert;
  font-style: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  transition-property: revert;
  transition-timing-function: revert;
}

.kodza-header-announcement__message a:where(:not([class*="kodza-"])):not(#_) {
  border: revert;
  margin: revert;
  padding: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__logo svg:where(:not([class*="kodza-"])):not(#_) {
  border: revert;
  margin: revert;
  padding: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  color: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__socials a:where(:not([class*="kodza-"])):not(#_) {
  border: revert;
  margin: revert;
  padding: revert;
  border-radius: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-header-announcement__message:not(#_):where(:not([hidden])),
.kodza-header-announcement__more:not(#_):where(:not([hidden])),
.kodza-header-announcement__message a:where(:not([class*="kodza-"])):not(#_):where(:not([hidden])),
.kodza-header-announcement__socials a:where(:not([class*="kodza-"])):not(#_):where(:not([hidden])) {
  display: revert;
}

.kodza-header-announcement__message:not(#_):where([hidden]),
.kodza-header-announcement__more:not(#_):where([hidden]),
.kodza-header-announcement__message a:where(:not([class*="kodza-"])):not(#_):where([hidden]),
.kodza-header-announcement__socials a:where(:not([class*="kodza-"])):not(#_):where([hidden]) {
  display: none;
}

.kodza-header-announcement__x:not(#_)::before,
.kodza-header-announcement__x:not(#_)::after,
.kodza-header-announcement__link:not(#_)::after,
.kodza-header-announcement__lines:not(#_)::before,
.kodza-header-announcement__lines:not(#_)::after,
.kodza-header-announcement__item:not(#_)::before,
.kodza-header-announcement__index:not(#_)::after {
  box-sizing: revert;
}

/* The component's own rules, one step stronger: real buttons and fields, what it sets on tags themes style (links, lists, headings, images…), and the root width (a theme may narrow it, never widen it) */

.kodza-header-announcement:not(#_) {
  position: relative;
  display: block;
  box-sizing: border-box;
  padding: 0;
  background: var(--kz-header-announcement-bg);
  color: var(--kz-header-announcement-fg);
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
}

.kodza-header-announcement__fold > *:not(#_) {
  transition: translate var(--kz-header-announcement-fold) cubic-bezier(0.65, 0, 0.35, 1),
    opacity calc(var(--kz-header-announcement-fold) * 0.6);
}

.kodza-header-announcement__strip.is-dismissed .kodza-header-announcement__fold > *:not(#_) {
  translate: 0 -10px;
  opacity: 0;
}

.kodza-header-announcement__message:not(#_) {
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: var(--kz-header-announcement-strip-height);
  letter-spacing: -0.005em;
  text-align: center;
}

.kodza-header-announcement__message a:not(#_) {
  color: inherit;
  text-decoration: none;
  border-radius: 2px;
}

.kodza-header-announcement__message a:focus-visible:not(#_) {
  outline: 2px solid var(--kz-header-announcement-strip-fg);
  outline-offset: 2px;
}

.kodza-header-announcement__dismiss:not(#_) {
  position: relative;
  display: block;
  grid-column: 3;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--kz-header-announcement-strip-muted);
  cursor: pointer;
  transition: color 0.2s,
    background-color 0.2s,
    translate var(--kz-header-announcement-fold) cubic-bezier(0.65, 0, 0.35, 1),
    opacity calc(var(--kz-header-announcement-fold) * 0.6);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .kodza-header-announcement__dismiss:hover:not(#_) {
    background: color-mix(in srgb, var(--kz-header-announcement-strip-fg) 12%, transparent);
    color: var(--kz-header-announcement-strip-fg);
  }
}

.kodza-header-announcement__dismiss:focus-visible:not(#_) {
  color: var(--kz-header-announcement-strip-fg);
  outline: 2px solid var(--kz-header-announcement-strip-fg);
  outline-offset: 0;
}

.kodza-header-announcement__logo:not(#_) {
  display: inline-flex;
  margin: 0;
  border-radius: 6px;
  color: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.kodza-header-announcement__logo svg:not(#_) {
  display: block;
}

.kodza-header-announcement__menu:not(#_) {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
}

.kodza-header-announcement__links:not(#_) {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kodza-header-announcement__links > li:not(#_) {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kodza-header-announcement__link:not(#_) {
  position: relative;
  display: inline-flex;
  box-sizing: border-box;
  margin: 0;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--kz-header-announcement-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.2s;
}

.kodza-header-announcement__link:hover:not(#_),
.kodza-header-announcement__link:focus-visible:not(#_),
.kodza-header-announcement__link[aria-current="page"]:not(#_) {
  color: var(--kz-header-announcement-fg);
}

.kodza-header-announcement__link:focus-visible:not(#_),
.kodza-header-announcement__logo:focus-visible:not(#_) {
  outline: 2px solid var(--kz-header-announcement-fg);
  outline-offset: 2px;
}

.kodza-header-announcement__sign:not(#_) {
  display: inline-flex;
  box-sizing: border-box;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--kz-header-announcement-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.2s;
}

.kodza-header-announcement__sign:hover:not(#_) {
  color: var(--kz-header-announcement-fg);
}

.kodza-header-announcement__sign:focus-visible:not(#_) {
  outline: 2px solid var(--kz-header-announcement-fg);
  outline-offset: 2px;
}

.kodza-header-announcement__cta:not(#_) {
  display: inline-flex;
  box-sizing: border-box;
  margin: 0;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--kz-header-announcement-ink);
  color: var(--kz-header-announcement-on-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.2s;
}

@media (hover: hover) {
  .kodza-header-announcement__cta:hover:not(#_) {
    background: color-mix(in srgb, var(--kz-header-announcement-ink) 84%, transparent);
  }
}

.kodza-header-announcement__cta:focus-visible:not(#_) {
  outline: 2px solid var(--kz-header-announcement-ink);
  outline-offset: 3px;
}

.kodza-header-announcement__toggle:not(#_) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 18px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--kz-header-announcement-soft);
  color: var(--kz-header-announcement-fg);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.kodza-header-announcement__toggle:focus-visible:not(#_) {
  outline: 2px solid var(--kz-header-announcement-fg);
  outline-offset: 3px;
}

.kodza-header-announcement__list:not(#_) {
  display: grid;
  margin: 0;
  padding: 28px 0;
}

.kodza-header-announcement__item:not(#_) {
  position: relative;
  display: grid;
  margin: 0;
  padding: 14px 0 10px;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.kodza-header-announcement__info p:not(#_) {
  margin: 0;
}

.kodza-header-announcement__action:not(#_) {
  display: inline-flex;
  box-sizing: border-box;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--kz-header-announcement-menu-fg);
  color: var(--kz-header-announcement-menu-bg);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.kodza-header-announcement__action:focus-visible:not(#_) {
  outline: 2px solid var(--kz-header-announcement-menu-fg);
  outline-offset: 3px;
}

.kodza-header-announcement__socials:not(#_) {
  display: flex;
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--kz-header-announcement-menu-muted);
}

.kodza-header-announcement__socials a:not(#_) {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.kodza-header-announcement__socials a:hover:not(#_) {
  color: var(--kz-header-announcement-menu-fg);
}

.kodza-header-announcement__socials a:focus-visible:not(#_) {
  outline: 2px solid var(--kz-header-announcement-menu-fg);
  outline-offset: 4px;
}

@container (max-width: 899px) {
  .kodza-header-announcement__menu:not(#_) {
    display: none;
  }
}

@container (min-width: 900px) {
  .kodza-header-announcement__toggle:not(#_) {
    display: none;
  }
}

@container (max-width: 519px) {
  .kodza-header-announcement__sign:not(#_),
  .kodza-header-announcement__cta:not(#_) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kodza-header-announcement__fold > *:not(#_) {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kodza-header-announcement__panel *:where(nav, a, p):not(#_) {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
```

```js
// Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license
// Kodza — Header Announcement
// A strip of news over the header. Its messages roll one after the other every
// --kz-header-announcement-interval, and wait while the pointer or the focus is on the strip, or
// the tab is hidden. The cross folds the strip away and the site remembers it (data-remember:
// "local" by default, "session", or "off"), under data-key or, without one, under the text of the
// messages: a new announcement shows again on its own. kodza:replay on the header brings it back.
// Below 900 px the links give way to a Menu button: the shutter (a native popover) comes down
// under the header, written by the script from the same links, so a menu changed in the CMS
// changes both.
(() => {
  const SELECTOR = '.kodza-header-announcement';
  const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
  const c = (name) => `.kodza-header-announcement__${name}`;

  // A duration variable, in ms
  const ms = (style, name, fallback) => {
    const raw = style.getPropertyValue(name).trim();
    const n = parseFloat(raw);
    return Number.isFinite(n) ? n * (/ms$/.test(raw) ? 1 : 1000) : fallback;
  };

  // Where the strip's dismissal is kept: the browser may refuse storage (private mode, policies)
  const store = (root) => {
    const kind = root.dataset.remember || 'local';
    try {
      return kind === 'off' ? null : kind === 'session' ? window.sessionStorage : window.localStorage;
    } catch {
      return null;
    }
  };
  // Without data-key, the messages themselves are the key
  const keyOf = (root, messages) => {
    if (root.dataset.key) return `kodza-header-announcement:${root.dataset.key}`;
    const text = messages.map((m) => m.textContent.trim()).join('|');
    let hash = 5381;
    for (let i = 0; i < text.length; i++) hash = (hash * 33) ^ text.charCodeAt(i);
    return `kodza-header-announcement:${(hash >>> 0).toString(36)}`;
  };

  // When (0 to 1 of the duration) a cubic-bezier curve gets to the progress p
  const timeAt = ([x1, y1, x2, y2], p) => {
    const at = (a, b, s) => 3 * a * s * (1 - s) ** 2 + 3 * b * s * s * (1 - s) + s ** 3;
    let lo = 0;
    let hi = 1;
    for (let i = 0; i < 24; i++) {
      const mid = (lo + hi) / 2;
      if (at(y1, y2, mid) < p) lo = mid;
      else hi = mid;
    }
    return at(x1, x2, (lo + hi) / 2);
  };

  // A wheel or a swipe only scrolls what can scroll in the panel, under the pointer
  const scrollsInside = (panel, target, x, y, dy) => {
    for (let el = target; el instanceof Element && panel.contains(el); el = el.parentElement) {
      const box = el.getBoundingClientRect();
      if (x < box.left || x > box.right || y < box.top || y > box.bottom) continue;
      if (!/(auto|scroll)/.test(getComputedStyle(el).overflowY) || el.scrollHeight <= el.clientHeight + 1) continue;
      if (dy > 0 ? el.scrollTop + el.clientHeight < el.scrollHeight - 1 : el.scrollTop > 0) return true;
    }
    return false;
  };

  // One instance, with its own state: two copies on a page never interfere. Everything it
  // starts is tied to `signal`, so kodza:destroy stops it all.
  function mount(root, signal) {
    const links = [...root.querySelectorAll(c('link'))];

    // ---------- The strip ----------
    const strip = root.querySelector(c('strip'));
    const messages = strip ? [...strip.querySelectorAll(c('message'))] : [];
    const dismiss = strip?.querySelector(c('dismiss'));
    const storage = strip ? store(root) : null;
    const key = strip ? keyOf(root, messages) : '';
    let shown = 0;
    let timer = 0;
    const holds = new Set(); // what holds the rotation: the pointer, the focus, a hidden tab
    const runs = new Set();

    const show = (i) => {
      messages.forEach((m, j) => {
        m.classList.toggle('is-shown', j === i);
        m.inert = j !== i; // only the message on screen can be reached
      });
      shown = i;
    };

    // The old message goes up, the next comes from below, glued to it
    const next = () => {
      const from = messages[shown];
      const to = messages[(shown + 1) % messages.length];
      show(messages.indexOf(to));
      if (reduceMotion || from === to) return;
      from.classList.add('is-shown');
      const style = getComputedStyle(root);
      const timing = { duration: ms(style, '--kz-header-announcement-roll', 700), easing: 'cubic-bezier(0.65, 0, 0.35, 1)' };
      const out = from.animate({ translate: ['0 0', '0 -100%'] }, timing);
      const into = to.animate({ translate: ['0 100%', '0 0'] }, timing);
      [out, into].forEach((run) => {
        runs.add(run);
        run.finished.then(() => runs.delete(run), () => runs.delete(run));
      });
      out.finished.then(() => from !== messages[shown] && from.classList.remove('is-shown'), () => {});
    };

    const stop = () => {
      clearTimeout(timer);
      timer = 0;
    };
    const go = () => {
      stop();
      if (messages.length < 2 || holds.size || strip.hidden || strip.classList.contains('is-dismissed')) return;
      timer = setTimeout(() => {
        next();
        go();
      }, ms(getComputedStyle(root), '--kz-header-announcement-interval', 4500));
    };
    // Each hold has a name, so the same one twice counts once
    const wait = (why, on) => {
      if (on) holds.add(why);
      else holds.delete(why);
      if (holds.size) stop();
      else if (!timer) go();
    };

    const remember = () => {
      try {
        storage?.setItem(key, '1');
      } catch {}
    };
    const forget = () => {
      try {
        storage?.removeItem(key);
      } catch {}
    };
    const gone = () => {
      try {
        return storage?.getItem(key) === '1';
      } catch {
        return false;
      }
    };

    // Folded away: the header slides up in its place, then the strip leaves the page for good
    let folding = 0;
    const fold = (keyboard) => {
      if (strip.classList.contains('is-dismissed')) return;
      stop();
      remember();
      // The pointer and the focus leave with the strip: nothing holds it when it comes back
      holds.delete('pointer');
      holds.delete('focus');
      if (strip.contains(document.activeElement) && keyboard) root.querySelector(c('logo'))?.focus();
      strip.classList.add('is-dismissed');
      const leave = () => {
        clearTimeout(folding);
        if (strip.classList.contains('is-dismissed')) strip.hidden = true;
      };
      if (reduceMotion) return leave();
      folding = setTimeout(leave, ms(getComputedStyle(root), '--kz-header-announcement-fold', 600) + 80);
    };
    // Back, from the first message: it unfolds and the header slides down
    const unfold = () => {
      forget();
      clearTimeout(folding);
      runs.forEach((run) => run.cancel());
      show(0);
      if (strip.hidden) {
        strip.hidden = false;
        void strip.offsetHeight; // folded first, so it opens from nothing
      }
      strip.classList.remove('is-dismissed');
      go();
    };

    if (strip && messages.length) {
      show(0);
      if (gone()) {
        strip.classList.add('is-dismissed');
        strip.hidden = true;
      }
      dismiss?.addEventListener('click', (event) => fold(event.detail === 0), { signal });
      strip.addEventListener('pointerenter', () => wait('pointer', true), { signal });
      strip.addEventListener('pointerleave', () => wait('pointer', false), { signal });
      strip.addEventListener('focusin', () => wait('focus', true), { signal });
      strip.addEventListener('focusout', (event) => !strip.contains(event.relatedTarget) && wait('focus', false), { signal });
      document.addEventListener('visibilitychange', () => wait('tab', document.hidden), { signal });
      root.addEventListener('kodza:replay', unfold, { signal });
      if (document.hidden) holds.add('tab');
      go();
      signal.addEventListener('abort', () => {
        stop();
        clearTimeout(folding);
        runs.forEach((run) => run.cancel());
      });
    }

    // ---------- The shutter, below 900 px ----------
    const toggle = root.querySelector(c('toggle'));
    const panel = root.querySelector(c('panel'));
    const list = root.querySelector(c('list'));
    if (!toggle || !panel || !list || !('popover' in panel)) return;
    toggle.popoverTargetElement = panel;

    // The menu is written from the links of the bar: one source for both
    links.forEach((link, i) => {
      const item = document.createElement('a');
      item.className = 'kodza-header-announcement__item';
      ['href', 'target', 'rel', 'aria-current'].forEach((name) => {
        if (link.hasAttribute(name)) item.setAttribute(name, link.getAttribute(name));
      });
      const index = document.createElement('span');
      index.className = 'kodza-header-announcement__index';
      index.setAttribute('aria-hidden', 'true');
      index.textContent = String(i + 1).padStart(2, '0');
      const mask = document.createElement('span');
      mask.className = 'kodza-header-announcement__mask';
      const word = document.createElement('span');
      word.className = 'kodza-header-announcement__word';
      word.textContent = link.textContent.trim();
      mask.append(word);
      item.append(index, mask);
      list.append(item);
    });

    const words = [...toggle.querySelectorAll(c('say'))];
    const parts = [...panel.querySelectorAll(`${c('item')}, ${c('info')}`)];
    let open = false;
    let started = 0;
    let held = null;
    const rolls = new Map();

    // The shutter starts under the header (or at --kz-header-announcement-menu-top)
    const place = () => {
      const top = getComputedStyle(root).getPropertyValue('--kz-header-announcement-menu-top').trim();
      if (top && top !== 'auto') {
        panel.style.setProperty('--kz-header-announcement-from', top);
        return;
      }
      const edge = Math.max(root.getBoundingClientRect().bottom, toggle.getBoundingClientRect().bottom);
      panel.style.setProperty('--kz-header-announcement-from', `${Math.max(0, Math.round(edge))}px`);
    };

    // Each row starts when the edge of the shutter gets to it
    const time = () => {
      const style = getComputedStyle(root);
      const raw = style.getPropertyValue('--kz-header-announcement-menu-duration').trim();
      const duration = reduceMotion ? 0 : parseFloat(raw) * (/ms$/.test(raw) ? 1 : 1000) || 800;
      const match = style.getPropertyValue('--kz-header-announcement-menu-ease').match(/cubic-bezier\(([^)]+)\)/);
      const curve = match ? match[1].split(',').map(Number) : [0.76, 0, 0.24, 1];
      const box = panel.getBoundingClientRect();
      const late = performance.now() - started;
      parts.forEach((part) => {
        const p = Math.min(1, Math.max(0, (part.getBoundingClientRect().top - box.top) / (box.height || 1)));
        const delay = Math.max(0, duration * timeAt(curve, p) - late - 40);
        part.style.setProperty('--kz-header-announcement-delay', `${Math.round(delay)}ms`);
      });
    };

    // Menu rolls to Close and back the same way: the old word goes up, the new one comes from below.
    // A click during the roll turns it back from where the words are
    const roll = () => {
      if (reduceMotion || words.length < 2) return;
      words.forEach((word, i) => {
        const coming = i === Number(open);
        const from = rolls.has(word) ? getComputedStyle(word).translate : coming ? '0 115%' : '0 0';
        rolls.get(word)?.cancel();
        const run = word.animate(
          { translate: [from, coming ? '0 0' : '0 -115%'] },
          { duration: 500, easing: 'cubic-bezier(0.22, 1, 0.36, 1)' },
        );
        rolls.set(word, run);
        run.finished.then(() => rolls.get(word) === run && rolls.delete(word), () => {});
      });
    };

    // While it is open the page stays where it is
    const hold = () => {
      held = new AbortController();
      const s = held.signal;
      const spot = [scrollX, scrollY];
      let last = 0;
      document.addEventListener('wheel', (event) => {
        if (!scrollsInside(panel, event.target, event.clientX, event.clientY, event.deltaY)) event.preventDefault();
      }, { passive: false, signal: s });
      document.addEventListener('touchstart', (event) => (last = event.touches[0].clientY), { passive: true, signal: s });
      document.addEventListener('touchmove', (event) => {
        const touch = event.touches[0];
        const dy = last - touch.clientY;
        last = touch.clientY;
        if (!scrollsInside(panel, event.target, touch.clientX, touch.clientY, dy)) event.preventDefault();
      }, { passive: false, signal: s });
      // A scrollbar dragged anyway: the page goes back to where it was
      window.addEventListener('scroll', () => {
        if (scrollX !== spot[0] || scrollY !== spot[1]) window.scrollTo({ left: spot[0], top: spot[1], behavior: 'instant' });
      }, { signal: s });
      // Wide enough for the links again: the shutter has no button left, it goes
      window.addEventListener('resize', () => {
        if (!toggle.getClientRects().length) panel.hidePopover();
        else place();
      }, { signal: s });
    };
    const release = () => {
      held?.abort();
      held = null;
    };

    panel.addEventListener('beforetoggle', (event) => {
      open = event.newState === 'open';
      toggle.setAttribute('aria-expanded', String(open));
      words.forEach((word, i) => (i === Number(open) ? word.removeAttribute('aria-hidden') : word.setAttribute('aria-hidden', 'true')));
      roll();
      if (open) {
        started = performance.now();
        place();
        hold();
      } else {
        panel.classList.remove('is-open');
        release();
      }
    }, { signal });

    panel.addEventListener('toggle', (event) => {
      if (event.newState !== 'open' || !open) return;
      time();
      panel.classList.add('is-open');
    }, { signal });

    // Tab past the last link, or a link followed: the shutter rolls back up
    panel.addEventListener('focusout', (event) => {
      const next = event.relatedTarget;
      if (open && next && !panel.contains(next) && next !== toggle) panel.hidePopover();
    }, { signal });
    panel.addEventListener('click', (event) => {
      if (open && event.target.closest('a[href]')) panel.hidePopover();
    }, { signal });

    signal.addEventListener('abort', () => {
      rolls.forEach((run) => run.cancel());
      release();
      if (open) panel.hidePopover();
    });
  }

  // Kodza lifecycle, the same in every component: `kodza:init` starts the instances inside
  // event.detail.root (the whole page by default), `kodza:destroy` stops them and puts their
  // markup back. For themes and apps that swap content without a page load. Each running root
  // keeps its markup as written under KODZA, shared by every Kodza script on the page: a Kodza
  // component inside another one is saved as written, not half-started, and stopped with it.
  const KODZA = Symbol.for('kodza');
  const instances = new WeakMap();
  const find = (scope = document) => [scope, ...scope.querySelectorAll(SELECTOR)].filter((el) => el.matches?.(SELECTOR));
  const attrsOf = (el) => [...el.attributes].map((a) => [a.name, a.value]);
  const put = (el, saved) => {
    [...el.attributes].forEach((a) => el.removeAttribute(a.name));
    saved.attrs.forEach(([name, value]) => el.setAttribute(name, value));
    el.innerHTML = saved.html;
  };
  // The markup inside a root as written: Kodza components already running in it give back their own
  const written = (root) => {
    const all = [...root.querySelectorAll('*')];
    if (!all.some((el) => el[KODZA])) return root.innerHTML;
    const copy = root.cloneNode(true);
    const twins = copy.querySelectorAll('*');
    let last = null;
    all.forEach((el, i) => {
      if (!el[KODZA] || last?.contains(el)) return;
      last = el;
      put(twins[i], el[KODZA]);
    });
    return copy.innerHTML;
  };
  const init = (scope) => find(scope).forEach((root) => {
    if (root.classList.contains('is-ready')) return; // already running, maybe from another copy of this script
    const controller = new AbortController();
    const saved = { html: written(root), attrs: attrsOf(root), stop: () => destroy(root) };
    instances.set(root, { controller, saved });
    root[KODZA] = saved;
    mount(root, controller.signal);
    root.classList.add('is-ready');
  });
  const destroy = (scope) => find(scope).forEach((root) => {
    const instance = instances.get(root);
    if (!instance) return;
    instances.delete(root);
    // The Kodza components running inside it stop first: once its markup is put back, their own
    // script could not find them any more
    root.querySelectorAll('*').forEach((el) => el[KODZA]?.stop());
    instance.controller.abort();
    delete root[KODZA];
    put(root, instance.saved);
  });
  document.addEventListener('kodza:init', (event) => init(event.detail?.root));
  document.addEventListener('kodza:destroy', (event) => destroy(event.detail?.root));
  init();
  // Loaded in <head>, the script runs before the markup exists: once more when it is parsed
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => init(), { once: true });
})();
```

Free to use, from Kodza (https://kodza.dev).
