/*! nava-ui v0.10.0 | Apache-2.0 | https://github.com/Allan-Nava/nava-ui */
@layer nv.tokens, nv.base, nv.components;

@layer nv.tokens {
/* GENERATED from src/tokens.css by scripts/build-tokens.mjs: edit the source, then run
   ./scripts/build.sh. https://github.com/Allan-Nava/nava-ui */

/*
 * nava-ui — design tokens
 *
 * The single source of truth for colour, spacing, radius, motion and type.
 * The source is src/tokens.css; css/tokens.css is generated from it by
 * scripts/build-tokens.mjs (part of scripts/build.sh), with the light palette
 * written twice. Edit the source, never the generated file.
 * Every component reads these custom properties and nothing else, so
 * re-theming means overriding tokens, never editing components.
 *
 * Two themes, same names:
 *   1. :root                                 dark, the default
 *   2. @media (prefers-color-scheme: light)  light, when the system asks for it,
 *      on :root:not([data-theme="dark"]) so an explicit "dark" choice wins
 *   3. :root[data-theme="light" | "dark"]    the user's explicit choice wins
 *
 * A colour added to one theme must be added to the other: a token defined
 * only for dark does not change in light and sooner or later is invisible.
 */

:root {
  color-scheme: dark;

  /* surfaces */
  --nv-bg: #050505;
  --nv-surface: #101215;
  --nv-surface-hover: #171a1f;
  --nv-border: rgba(255, 255, 255, 0.09);
  --nv-border-strong: rgba(255, 255, 255, 0.18);
  --nv-border-control: #6e737b; /* edge of a form control: 3:1 or better on bg and surface */
  --nv-row-hover: rgba(255, 255, 255, 0.035);

  /* text */
  --nv-fg: #eae4e4;
  --nv-fg-strong: #ffffff;
  --nv-fg-muted: #a9a9b0;

  /* accent */
  --nv-accent: #10cf53;
  --nv-accent-hover: #01ff5a;
  --nv-accent-soft: rgba(16, 207, 83, 0.12);
  --nv-accent-border: rgba(16, 207, 83, 0.35);
  --nv-accent-text: #7be8a6; /* text on --nv-accent-soft */
  --nv-on-accent: #04170c;   /* text on --nv-accent */

  /* danger: errors and destructive actions */
  --nv-danger: #ff8a80;
  --nv-danger-soft: rgba(248, 81, 73, 0.14);
  --nv-danger-border: rgba(248, 81, 73, 0.45);

  /* info and warning: the other two tones of a message */
  --nv-info: #79c0ff;
  --nv-info-soft: rgba(56, 139, 253, 0.14);
  --nv-info-border: rgba(56, 139, 253, 0.45);
  --nv-warning: #f2c14e;
  --nv-warning-soft: rgba(210, 153, 34, 0.14);
  --nv-warning-border: rgba(210, 153, 34, 0.45);

  /* glass and overlays: white lightens on dark, black darkens on light */
  --nv-glass: rgba(12, 13, 15, 0.72);
  --nv-glass-strong: rgba(12, 13, 15, 0.82);
  --nv-overlay-soft: rgba(255, 255, 255, 0.03);
  --nv-hover-overlay: rgba(255, 255, 255, 0.06);
  --nv-inset-line: rgba(255, 255, 255, 0.04);

  /* thumbnail tile: our own background under third-party images, plus a veil
     that takes the glare off white logos in the dark theme */
  --nv-thumb-bg: #0b0d10;
  --nv-thumb-veil: rgba(5, 6, 8, 0.22);

  /* elevation */
  --nv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --nv-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --nv-shadow-nav: 0 10px 30px rgba(0, 0, 0, 0.6);

  /* code */
  --nv-code-bg: #0f1216;
  --nv-code-fg: #e6edf3;
  --nv-code-border: rgba(255, 255, 255, 0.1);

  /* theme toggle: the button shows the theme it switches TO */
  --nv-icon-sun: block;
  --nv-icon-moon: none;

  /* ---- theme-independent tokens ------------------------------------- */

  /* success is the accent: the kit's green already means "go". The names
     exist so a component says what it means, and a re-theme can split them. */
  --nv-success: var(--nv-accent);
  --nv-success-soft: var(--nv-accent-soft);
  --nv-success-border: var(--nv-accent-border);
  --nv-success-text: var(--nv-accent-text);

  /* spacing (1rem = 16px) */
  --nv-space-1: 0.25rem;
  --nv-space-2: 0.5rem;
  --nv-space-3: 0.75rem;
  --nv-space-4: 1rem;
  --nv-space-5: 1.5rem;
  --nv-space-6: 2rem;
  --nv-space-7: 3rem;
  --nv-space-8: 4rem;
  --nv-space-9: 6rem;

  /* radius */
  --nv-radius-sm: 4px;
  --nv-radius-md: 8px;
  --nv-radius-lg: 14px;
  --nv-radius-pill: 999px;

  /* motion */
  --nv-dur-fast: 120ms;
  --nv-dur: 200ms;
  --nv-dur-slow: 360ms;
  --nv-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --nv-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* type */
  --nv-font-sans: "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nv-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --nv-text-xs: 0.75rem;
  --nv-text-sm: 0.875rem;
  --nv-text-base: clamp(1rem, 0.25vw + 0.96875rem, 1.09375rem);
  --nv-text-lg: clamp(1.125rem, 0.4vw + 1.0625rem, 1.25rem);
  --nv-text-xl: clamp(1.25rem, 0.8vw + 1.125rem, 1.5rem);
  --nv-text-2xl: clamp(1.5rem, 1.2vw + 1.3125rem, 1.875rem);
  --nv-text-3xl: clamp(1.75rem, 2.2vw + 1.375rem, 2.375rem);
  --nv-text-4xl: clamp(2.125rem, 3.4vw + 1.5625rem, 3.125rem);

  --nv-leading-tight: 1.15;
  --nv-leading-snug: 1.35;
  --nv-leading: 1.7;
  --nv-tracking-tight: -0.02em;
  --nv-tracking-wide: 0.08em;

  /* layout */
  --nv-measure: 68ch;        /* line length for running text */
  --nv-width-normal: 640px;  /* reading pages */
  --nv-width-large: 880px;
  --nv-width-wide: 1120px;   /* listings and grids */
  --nv-nav-height: 68px;     /* for scroll-margin-top under the floating nav */
}

/* Light palette. src/tokens.css states it once; the build (scripts/build-tokens.mjs)
   writes it twice in css/tokens.css: inside @media (prefers-color-scheme: light) on
   :root:not([data-theme="dark"]), and as it is here, on :root[data-theme="light"].
   CSS has no mixins, and those two selectors are what makes "system preference,
   unless the user chose" work without JavaScript. Every token here must also be in
   :root above. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --nv-bg: #f6f7f8;
    --nv-surface: #ffffff;
    --nv-surface-hover: #eef1f3;
    --nv-border: rgba(0, 0, 0, 0.11);
    --nv-border-strong: rgba(0, 0, 0, 0.22);
    --nv-border-control: #7d848e;
    --nv-row-hover: rgba(0, 0, 0, 0.03);
    --nv-fg: #1a1e23;
    --nv-fg-strong: #05070a;
    --nv-fg-muted: #515a65;
    --nv-accent: #086830;
    --nv-accent-hover: #085e2c;
    --nv-accent-soft: rgba(8, 104, 48, 0.1);
    --nv-accent-border: rgba(8, 104, 48, 0.3);
    --nv-accent-text: #075527;
    --nv-on-accent: #ffffff;
    --nv-danger: #a3121a;
    --nv-danger-soft: rgba(163, 18, 26, 0.08);
    --nv-danger-border: rgba(163, 18, 26, 0.35);
    --nv-info: #0b4fa2;
    --nv-info-soft: rgba(11, 79, 162, 0.08);
    --nv-info-border: rgba(11, 79, 162, 0.35);
    --nv-warning: #7a4a00;
    --nv-warning-soft: rgba(154, 103, 0, 0.1);
    --nv-warning-border: rgba(154, 103, 0, 0.4);
    --nv-glass: rgba(255, 255, 255, 0.78);
    --nv-glass-strong: rgba(255, 255, 255, 0.88);
    --nv-overlay-soft: rgba(0, 0, 0, 0.035);
    --nv-hover-overlay: rgba(0, 0, 0, 0.055);
    --nv-inset-line: rgba(0, 0, 0, 0.04);
    --nv-thumb-bg: #eef1f4;
    --nv-thumb-veil: rgba(255, 255, 255, 0);
    --nv-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.08);
    --nv-shadow-md: 0 10px 30px rgba(16, 24, 40, 0.12);
    --nv-shadow-nav: 0 10px 30px rgba(16, 24, 40, 0.16);
    --nv-code-bg: #f2f4f6;
    --nv-code-fg: #1f2429;
    --nv-code-border: rgba(0, 0, 0, 0.1);
    --nv-icon-sun: none;
    --nv-icon-moon: block;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --nv-bg: #f6f7f8;
  --nv-surface: #ffffff;
  --nv-surface-hover: #eef1f3;
  --nv-border: rgba(0, 0, 0, 0.11);
  --nv-border-strong: rgba(0, 0, 0, 0.22);
  --nv-border-control: #7d848e;
  --nv-row-hover: rgba(0, 0, 0, 0.03);
  --nv-fg: #1a1e23;
  --nv-fg-strong: #05070a;
  --nv-fg-muted: #515a65;
  --nv-accent: #086830;
  --nv-accent-hover: #085e2c;
  --nv-accent-soft: rgba(8, 104, 48, 0.1);
  --nv-accent-border: rgba(8, 104, 48, 0.3);
  --nv-accent-text: #075527;
  --nv-on-accent: #ffffff;
  --nv-danger: #a3121a;
  --nv-danger-soft: rgba(163, 18, 26, 0.08);
  --nv-danger-border: rgba(163, 18, 26, 0.35);
  --nv-info: #0b4fa2;
  --nv-info-soft: rgba(11, 79, 162, 0.08);
  --nv-info-border: rgba(11, 79, 162, 0.35);
  --nv-warning: #7a4a00;
  --nv-warning-soft: rgba(154, 103, 0, 0.1);
  --nv-warning-border: rgba(154, 103, 0, 0.4);
  --nv-glass: rgba(255, 255, 255, 0.78);
  --nv-glass-strong: rgba(255, 255, 255, 0.88);
  --nv-overlay-soft: rgba(0, 0, 0, 0.035);
  --nv-hover-overlay: rgba(0, 0, 0, 0.055);
  --nv-inset-line: rgba(0, 0, 0, 0.04);
  --nv-thumb-bg: #eef1f4;
  --nv-thumb-veil: rgba(255, 255, 255, 0);
  --nv-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.08);
  --nv-shadow-md: 0 10px 30px rgba(16, 24, 40, 0.12);
  --nv-shadow-nav: 0 10px 30px rgba(16, 24, 40, 0.16);
  --nv-code-bg: #f2f4f6;
  --nv-code-fg: #1f2429;
  --nv-code-border: rgba(0, 0, 0, 0.1);
  --nv-icon-sun: none;
  --nv-icon-moon: block;
}
}

@layer nv.base {
/*
 * nava-ui — base
 *
 * Element defaults: page, headings, links, prose, code, tables, focus.
 * Optional: the components only need tokens.css. Load this file when
 * nava-ui styles the whole page, skip it when you drop a few components
 * into a page that already has its own typography.
 */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--nv-font-sans);
  font-size: var(--nv-text-base);
  line-height: var(--nv-leading);
  color: var(--nv-fg);
  background: var(--nv-bg);
  /* clip, not hidden: it cuts horizontal overflow without creating a scroll
     container, which would break the sticky nav */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
}

h1,
h2,
h3,
h4 {
  margin: var(--nv-space-6) 0 var(--nv-space-4);
  color: var(--nv-accent);
  line-height: var(--nv-leading-tight);
  text-wrap: balance;
  scroll-margin-top: calc(var(--nv-nav-height) + var(--nv-space-4));
}

h1 {
  font-size: var(--nv-text-3xl);
  font-weight: 700;
  letter-spacing: var(--nv-tracking-tight);
}

h2 {
  font-size: var(--nv-text-2xl);
  font-weight: 650;
  letter-spacing: var(--nv-tracking-tight);
}

h3 {
  font-size: var(--nv-text-xl);
  font-weight: 600;
}

h4 {
  font-size: var(--nv-text-lg);
  font-weight: 600;
}

p {
  margin: 0 0 var(--nv-space-5);
  text-wrap: pretty;
}

a {
  color: var(--nv-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--nv-accent-hover);
}

strong,
b {
  font-weight: 700;
  color: var(--nv-fg-strong);
}

li {
  margin-bottom: var(--nv-space-2);
}

/* `hidden` must beat any component that declares its own `display` */
[hidden] {
  display: none !important;
}

img,
pre,
iframe {
  max-width: 100%;
}

img {
  height: auto;
  border-radius: var(--nv-radius-md);
}

figcaption {
  margin-top: var(--nv-space-2);
  text-align: center;
  font-size: var(--nv-text-sm);
  color: var(--nv-fg-muted);
}

blockquote {
  margin: 0 0 var(--nv-space-5);
  padding: var(--nv-space-3) var(--nv-space-4);
  border-left: 3px solid var(--nv-accent);
  background: var(--nv-overlay-soft);
  border-radius: 0 var(--nv-radius-md) var(--nv-radius-md) 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

hr {
  height: 1px;
  margin: var(--nv-space-8) auto;
  border: 0;
  background: var(--nv-border);
}

code,
kbd {
  font-family: var(--nv-font-mono);
  font-size: 0.875em;
  border-radius: var(--nv-radius-sm);
}

code {
  padding: 0.2em 0.45em;
  color: var(--nv-accent-text);
  background: var(--nv-accent-soft);
  border: 1px solid var(--nv-accent-border);
}

kbd {
  padding: 1px 5px;
  color: var(--nv-fg);
  background: var(--nv-surface);
  border: 1px solid var(--nv-border-strong);
}

pre {
  margin: 0 0 var(--nv-space-5);
  padding: var(--nv-space-4);
  overflow: auto;
  font-family: var(--nv-font-mono);
  font-size: var(--nv-text-sm);
  line-height: 1.6;
  color: var(--nv-code-fg);
  background: var(--nv-code-bg);
  border: 1px solid var(--nv-code-border);
  border-radius: var(--nv-radius-md);
  tab-size: 2;
}

pre code {
  padding: 0;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
}

table {
  width: 100%;
  margin-bottom: var(--nv-space-5);
  border-collapse: collapse;
  font-size: var(--nv-text-sm);
}

th,
td {
  padding: var(--nv-space-2) var(--nv-space-3);
  border-bottom: 1px solid var(--nv-border);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--nv-fg-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--nv-accent);
  outline-offset: 2px;
  border-radius: var(--nv-radius-sm);
}

::selection {
  background: var(--nv-accent-soft);
  color: var(--nv-fg-strong);
}

/* No animation for people who turned it off at system level */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
}

@layer nv.components {
/*
 * nava-ui — components
 *
 * Every class is prefixed `nv-` and reads only the tokens in tokens.css.
 * Naming: .nv-block, .nv-block__part, .nv-block--variant, .is-state.
 */

/* ---------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------ */

.nv-wrap {
  width: 92%;
  max-width: var(--nv-width-normal);
  margin-inline: auto;
}

.nv-wrap--large {
  max-width: var(--nv-width-large);
}

/* Listings and grids: the 68ch rule is for running text, not for a grid */
.nv-wrap--wide {
  max-width: var(--nv-width-wide);
}

@media (max-width: 1050px) {
  .nv-wrap {
    width: 88%;
  }
}

.nv-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--nv-space-2) var(--nv-space-4);
  font-size: var(--nv-text-sm);
  font-weight: 600;
  color: var(--nv-on-accent);
  background: var(--nv-accent);
  border-radius: 0 0 var(--nv-radius-sm) 0;
}

.nv-skip-link:focus {
  left: 0;
  color: var(--nv-on-accent);
}

.nv-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Nav — a floating glass island, centred and stuck to the top.
   The sticky strip spans the full width but lets clicks through; only the
   pill is visible. No JS menu: on phones the island widens and links scroll.
   ------------------------------------------------------------------------ */

.nv-nav {
  position: sticky;
  top: var(--nv-space-3);
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nv-nav__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--nv-space-2);
  max-width: min(94vw, var(--nv-width-large));
  padding: 5px;
  background: var(--nv-glass);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-pill);
  box-shadow: 0 1px 0 var(--nv-inset-line) inset;
}

.nv-nav__brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--nv-space-2);
  padding: 0 var(--nv-space-2) 0 3px;
  font-size: var(--nv-text-sm);
  font-weight: 600;
  letter-spacing: var(--nv-tracking-tight);
  text-decoration: none;
  color: var(--nv-fg-strong);
}

.nv-nav__brand:hover {
  color: var(--nv-fg-strong);
}

.nv-nav__avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--nv-radius-pill);
  border: 1px solid var(--nv-border-strong);
  transition: border-color var(--nv-dur) var(--nv-ease);
}

.nv-nav__brand:hover .nv-nav__avatar {
  border-color: var(--nv-accent);
}

.nv-nav__links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 0 0 0 var(--nv-space-2);
  list-style: none;
  border-left: 1px solid var(--nv-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.nv-nav__links::-webkit-scrollbar {
  display: none;
}

.nv-nav__links > li {
  margin: 0;
  line-height: 1;
}

.nv-nav__link {
  display: inline-block;
  padding: 7px 13px;
  font-size: var(--nv-text-sm);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--nv-fg-muted);
  border-radius: var(--nv-radius-pill);
  transition: color var(--nv-dur) var(--nv-ease), background var(--nv-dur) var(--nv-ease);
}

.nv-nav__link:hover {
  color: var(--nv-fg-strong);
  background: var(--nv-hover-overlay);
}

.nv-nav__link.is-active,
.nv-nav__link[aria-current="page"] {
  color: var(--nv-on-accent);
  background: var(--nv-accent);
}

/* Icon buttons at the tail of the island (search, theme toggle). They do not
   scroll with the links: flex 0 0 auto, or the links would squash them. */
.nv-nav__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--nv-fg-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--nv-radius-pill);
  cursor: pointer;
  appearance: none;
  transition: color var(--nv-dur) var(--nv-ease), background var(--nv-dur) var(--nv-ease),
    border-color var(--nv-dur) var(--nv-ease);
}

.nv-nav__icon:hover {
  color: var(--nv-fg-strong);
  background: var(--nv-hover-overlay);
  border-color: var(--nv-border);
}

.nv-nav__icon svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
}

/* The toggle shows the theme it switches to; `display` comes from the tokens */
.nv-icon-sun {
  display: var(--nv-icon-sun);
}

.nv-icon-moon {
  display: var(--nv-icon-moon);
}

@media (max-width: 560px) {
  .nv-nav__inner {
    width: 94vw;
    gap: var(--nv-space-1);
  }

  /* Hidden from sight, not from assistive technology: with `display: none`
     a brand link without an image would lose its accessible name. */
  .nv-nav__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .nv-nav__links {
    padding-left: var(--nv-space-1);
  }

  .nv-nav__link {
    padding: 7px 11px;
  }
}

/* ---------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */

.nv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nv-space-3);
}

.nv-button {
  display: inline-flex;
  align-items: center;
  gap: var(--nv-space-2);
  padding: var(--nv-space-3) var(--nv-space-5);
  font-family: inherit;
  font-size: var(--nv-text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--nv-fg-strong);
  background: var(--nv-surface);
  border: 1px solid var(--nv-border-strong);
  border-radius: var(--nv-radius-pill);
  cursor: pointer;
  transition: background var(--nv-dur) var(--nv-ease), border-color var(--nv-dur) var(--nv-ease),
    transform var(--nv-dur) var(--nv-ease-out);
}

/* Colour is restated on every state: a global `a:hover` would otherwise tint
   the label, and on a filled button that means invisible text. */
.nv-button:hover,
.nv-button:focus-visible {
  color: var(--nv-fg-strong);
  background: var(--nv-surface-hover);
  border-color: var(--nv-accent-border);
  transform: translateY(-1px);
}

.nv-button:active {
  transform: translateY(0) scale(0.98);
}

.nv-button--primary {
  color: var(--nv-on-accent);
  background: var(--nv-accent);
  border-color: var(--nv-accent);
}

.nv-button--primary:hover,
.nv-button--primary:focus-visible {
  color: var(--nv-on-accent);
  background: var(--nv-accent-hover);
  border-color: var(--nv-accent-hover);
}

.nv-button[disabled],
.nv-button[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Chips — three roles, three looks
   .nv-tag            a label on content (accent tint)
   .nv-chip           a link to a topic (neutral surface)
   .nv-chip--filter   a toggle in a filter bar (use on <button>)
   ------------------------------------------------------------------------ */

.nv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nv-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nv-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 12px;
  font-size: var(--nv-text-xs);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--nv-accent-text);
  background: var(--nv-accent-soft);
  border: 1px solid var(--nv-accent-border);
  border-radius: var(--nv-radius-pill);
  transition: background var(--nv-dur) var(--nv-ease), color var(--nv-dur) var(--nv-ease),
    border-color var(--nv-dur) var(--nv-ease);
}

a.nv-tag:hover {
  color: var(--nv-on-accent);
  background: var(--nv-accent);
  border-color: var(--nv-accent);
}

.nv-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--nv-space-2);
  padding: 6px 13px;
  font-family: inherit;
  font-size: var(--nv-text-sm);
  line-height: 1.4;
  text-decoration: none;
  color: var(--nv-fg);
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-pill);
  transition: color var(--nv-dur) var(--nv-ease), background var(--nv-dur) var(--nv-ease),
    border-color var(--nv-dur) var(--nv-ease);
}

.nv-chip:hover {
  color: var(--nv-accent);
  background: var(--nv-surface-hover);
  border-color: var(--nv-accent-border);
}

.nv-chip__count {
  font-size: var(--nv-text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--nv-fg-muted);
}

.nv-chip--filter {
  padding: 5px 12px;
  font-size: var(--nv-text-xs);
  letter-spacing: 0.03em;
  color: var(--nv-fg-muted);
  cursor: pointer;
}

.nv-chip--filter:hover {
  color: var(--nv-fg-strong);
  background: var(--nv-surface);
  border-color: var(--nv-border-strong);
}

.nv-chip--filter.is-active,
.nv-chip--filter[aria-pressed="true"] {
  color: var(--nv-on-accent);
  background: var(--nv-accent);
  border-color: var(--nv-accent);
}

.nv-chip--filter.is-active .nv-chip__count,
.nv-chip--filter[aria-pressed="true"] .nv-chip__count {
  color: var(--nv-on-accent);
}

/* ---------------------------------------------------------------------------
   Badge — a short status label: "Live", "Beta", "Failing".
   Neutral by default; --accent, --warning and --danger set the tone.
   --dot puts a dot before the words. The words are what carries the state:
   a badge is never a coloured dot alone. If the words must not be seen, keep
   them in .nv-sr-only inside the badge.
   ------------------------------------------------------------------------ */

.nv-badge {
  --nv-tone: var(--nv-fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 2px 8px;
  font-size: var(--nv-text-xs);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--nv-tone);
  background: transparent;
  border: 1px solid var(--nv-border-strong);
  border-radius: var(--nv-radius-pill);
}

.nv-badge--accent {
  --nv-tone: var(--nv-accent-text);
  background: var(--nv-accent-soft);
  border-color: var(--nv-accent-border);
}

.nv-badge--warning {
  --nv-tone: var(--nv-warning);
  background: var(--nv-warning-soft);
  border-color: var(--nv-warning-border);
}

.nv-badge--danger {
  --nv-tone: var(--nv-danger);
  background: var(--nv-danger-soft);
  border-color: var(--nv-danger-border);
}

/* A border as wide as half the box fills it: the dot survives forced-colours
   mode, where backgrounds are replaced but borders keep the text colour. */
.nv-badge--dot::before {
  content: "";
  flex: 0 0 auto;
  width: 0.5em;
  height: 0.5em;
  box-sizing: border-box;
  border: 0.25em solid currentColor;
  border-radius: var(--nv-radius-pill);
}

/* ---------------------------------------------------------------------------
   Marks, pills and legends — for lists where every item has a kind, such as
   "used at work" against "used in my own projects".
   The kind is told three ways, so colour is never the only one:
     .nv-mark--dot, --ring, --diamond   the shape of the mark
     .nv-pill, --accent, --dashed       the fill and the border of the pill
     the words                          visible in the legend, and in each
                                        pill for screen readers (nv-sr-only)
   Marks are drawn with borders only, so they also show in forced colours.
   ------------------------------------------------------------------------ */

.nv-mark {
  flex: 0 0 auto;
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  box-sizing: border-box;
  border: 1.5px solid currentColor;
  border-radius: var(--nv-radius-pill);
}

.nv-mark--dot {
  border-width: 0.25em;
}

.nv-mark--diamond {
  width: 0.45em;
  height: 0.45em;
  border-radius: 1px;
  transform: rotate(45deg);
}

.nv-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 4px 11px;
  font-size: var(--nv-text-sm);
  line-height: 1.35;
  white-space: nowrap;
  color: var(--nv-fg);
  background: transparent;
  border: 1px solid var(--nv-border-strong);
  border-radius: var(--nv-radius-pill);
}

.nv-pill--accent {
  color: var(--nv-accent-text);
  background: var(--nv-accent-soft);
  border-color: var(--nv-accent-border);
}

.nv-pill--dashed {
  border-style: dashed;
}

.nv-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nv-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nv-pills > li {
  margin: 0;
}

/* The legend is a list of pills at the small size, above what it explains.
   Not .nv-legend: that is the <legend> of a fieldset. */
.nv-pills--legend {
  margin-bottom: var(--nv-space-4);
}

.nv-pills--legend .nv-pill {
  font-size: var(--nv-text-xs);
}

/* ---------------------------------------------------------------------------
   Cards — a horizontal card: optional thumbnail, title, excerpt, meta.
   .nv-list is the grid; .nv-list--two goes to two columns from 860px.
   It stops at two on purpose: at three the horizontal card is ~355px wide,
   titles wrap to three lines and rows leave holes.
   ------------------------------------------------------------------------ */

.nv-list {
  display: grid;
  /* minmax(0, 1fr), not 1fr: 1fr means minmax(auto, 1fr), and that `auto` is
     the card's min-content, which overflows on a long unbroken word */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--nv-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 860px) {
  .nv-list--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
  transition: background var(--nv-dur) var(--nv-ease), border-color var(--nv-dur) var(--nv-ease),
    transform var(--nv-dur) var(--nv-ease-out);
}

/* Hover only for real pointers: on touch it sticks after the tap and the
   card looks selected at random. */
@media (hover: hover) {
  .nv-card:hover {
    background: var(--nv-surface-hover);
    border-color: var(--nv-accent-border);
    transform: translateY(-2px);
  }

  .nv-card:hover .nv-card__title {
    color: var(--nv-accent);
  }
}

/* Tap feedback: on mobile it is the only state the user sees */
.nv-card:active {
  background: var(--nv-surface-hover);
  border-color: var(--nv-accent-border);
}

.nv-card__link {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: var(--nv-space-4);
  padding: var(--nv-space-4);
  text-decoration: none;
  color: inherit;
  border-radius: calc(var(--nv-radius-lg) - 1px);
  -webkit-tap-highlight-color: transparent;
}

.nv-card__link:hover {
  color: inherit;
}

.nv-card__thumb {
  flex: 0 0 116px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--nv-radius-md);
  background: var(--nv-bg);
}

.nv-card__thumb > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.nv-card__thumb--square {
  flex-basis: 92px;
  aspect-ratio: 1 / 1;
}

/* Third-party images (logos on white, dark screenshots, transparent PNGs):
   normalise the container, not the files. `contain` keeps the image whole,
   the tile gives a background of ours, the veil takes the glare off. */
.nv-card__thumb--contain {
  position: relative;
  background: var(--nv-thumb-bg);
  box-shadow: inset 0 0 0 1px var(--nv-inset-line);
}

.nv-card__thumb--contain > img {
  object-fit: contain;
  padding: var(--nv-space-2);
}

.nv-card__thumb--contain::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--nv-thumb-veil);
  pointer-events: none;
}

.nv-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--nv-space-2);
  min-width: 0;
}

.nv-card__title {
  margin: 0;
  font-size: var(--nv-text-lg);
  font-weight: 600;
  line-height: var(--nv-leading-snug);
  color: var(--nv-fg-strong);
  overflow-wrap: anywhere;
  transition: color var(--nv-dur) var(--nv-ease);
}

.nv-card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: var(--nv-text-sm);
  line-height: 1.5;
  color: var(--nv-fg-muted);
}

.nv-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nv-space-1) var(--nv-space-2);
  font-size: var(--nv-text-xs);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-fg-muted);
}

.nv-card__meta-tag {
  color: var(--nv-accent-text);
}

@media (max-width: 560px) {
  .nv-list {
    gap: var(--nv-space-2);
  }

  .nv-card__link {
    gap: var(--nv-space-3);
    padding: var(--nv-space-3);
  }

  .nv-card__thumb {
    flex-basis: clamp(100px, 30vw, 132px);
  }

  .nv-card__body {
    gap: var(--nv-space-1);
  }

  .nv-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: var(--nv-text-base);
  }
}

/* Generated placeholder: a monogram on a gradient, for cards without an image.
   Pick the palette with .nv-ph-0 … .nv-ph-5 (hash the title, modulo 6). */
.nv-ph {
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--nv-ph-a, #0b3d2e), var(--nv-ph-b, #10cf53));
}

.nv-ph > span {
  font-size: clamp(0.875rem, 2.2vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.nv-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 55%);
}

.nv-ph-0 { --nv-ph-a: #0b3d2e; --nv-ph-b: #10cf53; }
.nv-ph-1 { --nv-ph-a: #0b2f3d; --nv-ph-b: #1e88a8; }
.nv-ph-2 { --nv-ph-a: #221b3d; --nv-ph-b: #6b4fd8; }
.nv-ph-3 { --nv-ph-a: #3d1b2b; --nv-ph-b: #c2456e; }
.nv-ph-4 { --nv-ph-a: #3d2f0b; --nv-ph-b: #c99213; }
.nv-ph-5 { --nv-ph-a: #12303d; --nv-ph-b: #2fa8a0; }

/* Spotlight: a soft glow that follows the pointer. nava-ui.js writes the
   coordinates on --nv-mx / --nv-my for cards inside [data-nv-spotlight]. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  [data-nv-spotlight] .nv-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--nv-dur) var(--nv-ease);
    background: radial-gradient(
      220px circle at var(--nv-mx, 50%) var(--nv-my, 50%),
      var(--nv-accent-soft),
      transparent 70%
    );
  }

  [data-nv-spotlight] .nv-card:hover::after {
    opacity: 1;
  }
}

/* ---------------------------------------------------------------------------
   Bento — tiles of different sizes in one grid.
   One column on phones, two from 561px, six from 860px. A tile takes two of
   the six columns by default (three per row); size it with:
     .nv-tile--w3, --w4, --w6   wider: half, two thirds, the whole row
     .nv-tile--h2               two rows tall, from 860px
   On two columns, a tile of three or more columns takes the full row.
   `dense` placement fills the holes a tall tile leaves, so the order of the
   markup stays the reading order without leaving gaps.
   A page that wants a fixed composition can still set grid-template-areas on
   its own .nv-bento and grid-area on its tiles: the spans are only defaults.
   ------------------------------------------------------------------------ */

.nv-bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row dense;
  gap: var(--nv-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nv-tile {
  display: flex;
  flex-direction: column;
  gap: var(--nv-space-3);
  min-width: 0;
  margin: 0;
  padding: var(--nv-space-5);
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
  box-shadow: inset 0 1px 0 var(--nv-inset-line);
}

/* The tile that leads: a soft wash of the accent from its corner, no colour
   of its own. One per grid, or it stops leading. */
.nv-tile--feature {
  background: linear-gradient(155deg, var(--nv-accent-soft), transparent 60%), var(--nv-surface);
  border-color: var(--nv-accent-border);
}

.nv-tile__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--nv-space-3);
  margin: 0;
  font-size: var(--nv-text-base);
  font-weight: 650;
  letter-spacing: var(--nv-tracking-tight);
  line-height: var(--nv-leading-snug);
  color: var(--nv-fg-strong);
}

.nv-tile__title > a {
  color: inherit;
  text-decoration: none;
  transition: color var(--nv-dur) var(--nv-ease);
}

.nv-tile__title > a:hover {
  color: var(--nv-accent);
}

.nv-tile__count {
  font-size: var(--nv-text-xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--nv-fg-muted);
}

.nv-tile__text {
  margin: 0;
  font-size: var(--nv-text-sm);
  line-height: 1.55;
  color: var(--nv-fg-muted);
}

@media (max-width: 560px) {
  .nv-tile {
    padding: var(--nv-space-4);
  }
}

@media (min-width: 561px) {
  .nv-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nv-tile--w3,
  .nv-tile--w4,
  .nv-tile--w6 {
    grid-column: span 2;
  }
}

@media (min-width: 860px) {
  .nv-bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .nv-tile {
    grid-column: span 2;
  }

  .nv-tile--w3 {
    grid-column: span 3;
  }

  .nv-tile--w4 {
    grid-column: span 4;
  }

  .nv-tile--w6 {
    grid-column: span 6;
  }

  .nv-tile--h2 {
    grid-row: span 2;
  }
}

/* ---------------------------------------------------------------------------
   Lede — the big opening of a page
   ------------------------------------------------------------------------ */

.nv-lede {
  margin: var(--nv-space-9) 0 var(--nv-space-8);
}

.nv-lede__kicker {
  margin: 0 0 var(--nv-space-4);
  font-size: var(--nv-text-xs);
  font-weight: 600;
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-fg-muted);
}

.nv-lede__title {
  margin: 0 0 var(--nv-space-5);
  font-size: clamp(2rem, 6.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--nv-fg-strong);
  text-wrap: balance;
}

/* Highlighted words: accent colour and a thin underline. No italics: the
   variable font file has the weight axis only. */
.nv-em {
  color: var(--nv-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  text-decoration-color: var(--nv-accent-border);
}

.nv-lede__sub {
  max-width: 52ch;
  margin: 0 0 var(--nv-space-6);
  font-size: var(--nv-text-lg);
  line-height: 1.5;
  color: var(--nv-fg-muted);
}

@media (max-width: 560px) {
  .nv-lede {
    margin: var(--nv-space-7) 0;
  }
}

/* ---------------------------------------------------------------------------
   Banner — a page opening over a landscape.
   A kicker, a title, a line of words and a line of facts, centred over a
   faint grid, an accent glow and layered ridges; the look of the YouTube
   channel banner, redrawn in tokens so it follows both themes.
     .nv-banner__ridges   an inline <svg> with preserveAspectRatio="none", so
                          the whole range shows at any width
     .nv-banner__far, __mid, __near   its filled paths: the text colour mixed
                          into the page at a few per cent, faint in both themes
     .nv-banner__line     an accent stroke along a ridge; give it pathLength="1"
                          so it can draw itself
     .nv-banner__sep      a separator dot in the kicker, the lede or the meta;
                          keep a space on each side, so the line can wrap
   Motion, only without prefers-reduced-motion: the line draws itself on load,
   the glow breathes, and where scroll-driven animation exists the ridges
   drift at three speeds as the banner leaves the viewport. Without it the
   banner is complete and still.
   ------------------------------------------------------------------------ */

.nv-banner {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(18.75rem, 42vw, 28.75rem);
  overflow: hidden;
  padding: var(--nv-space-7) var(--nv-space-4) var(--nv-space-9);
  background: var(--nv-bg);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
  text-align: center;
}

/* The grid, faded out towards the edges. */
.nv-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--nv-inset-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--nv-inset-line) 1px, transparent 1px);
  background-size: var(--nv-space-6) var(--nv-space-6);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 80%);
}

/* The glow behind the title. */
.nv-banner::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 50%;
  z-index: -2;
  width: min(90%, 50rem);
  aspect-ratio: 3 / 2;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--nv-accent-soft) 0%, transparent 62%);
}

.nv-banner__ridges {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 70%;
}

.nv-banner__far {
  fill: color-mix(in srgb, var(--nv-fg) 4%, var(--nv-bg));
}

.nv-banner__mid {
  fill: color-mix(in srgb, var(--nv-fg) 6%, var(--nv-bg));
}

.nv-banner__near {
  fill: color-mix(in srgb, var(--nv-fg) 2.5%, var(--nv-bg));
}

.nv-banner__line {
  fill: none;
  stroke: var(--nv-accent);
  stroke-width: 3;
  stroke-linejoin: round;
  opacity: 0.6;
  vector-effect: non-scaling-stroke;
}

/* min-width: 0, or the grid item takes the width of its longest line and
   pushes the text out of the banner on a phone. */
.nv-banner__body {
  min-width: 0;
  max-width: 62.5rem;
}

.nv-banner__kicker {
  margin: 0 0 var(--nv-space-3);
  font-family: var(--nv-font-mono);
  font-size: var(--nv-text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nv-accent-text);
}

.nv-banner__kicker::before {
  content: "";
  display: inline-block;
  width: var(--nv-space-2);
  height: var(--nv-space-2);
  margin: 0 var(--nv-space-2) 0.125rem 0;
  border-radius: 2px;
  background: var(--nv-accent);
  vertical-align: middle;
}

.nv-banner__kicker a,
.nv-banner__meta a {
  color: inherit;
}

.nv-banner__title {
  margin: 0;
  font-size: clamp(2rem, 6.4vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--nv-fg-strong);
}

.nv-banner__title em {
  font-style: normal;
  color: var(--nv-accent);
}

.nv-banner__lede {
  margin: var(--nv-space-3) 0 0;
  font-size: var(--nv-text-lg);
  font-weight: 500;
  color: var(--nv-fg);
}

.nv-banner__lede .nv-banner__sep {
  margin: 0 var(--nv-space-1);
  color: var(--nv-accent);
}

/* --nv-fg, not muted: over the glow muted text falls under 6:1 in the light theme. */
.nv-banner__meta {
  margin: var(--nv-space-4) 0 0;
  font-size: var(--nv-text-sm);
  color: var(--nv-fg);
}

.nv-banner__meta strong {
  font-variant-numeric: tabular-nums;
  color: var(--nv-fg-strong);
}

.nv-banner__sep {
  margin: 0 var(--nv-space-1);
  color: var(--nv-fg-muted);
}

/* On a phone the whole range fits in a few hundred pixels and the peaks get
   steep: lower ridges and more room under the text, so they stay behind it. */
@media (max-width: 560px) {
  .nv-banner {
    padding-bottom: 7.5rem;
  }

  .nv-banner__ridges {
    height: 38%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .nv-banner__line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: nv-banner-draw 2.4s var(--nv-ease) 0.2s forwards;
  }

  .nv-banner::after {
    animation: nv-banner-breathe 6s ease-in-out infinite alternate;
  }

  @supports (animation-timeline: view()) {
    .nv-banner__ridges path {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view();
      animation-range: exit;
    }

    .nv-banner__far {
      animation-name: nv-banner-drift-far;
    }

    .nv-banner__mid {
      animation-name: nv-banner-drift-mid;
    }

    .nv-banner__near {
      animation-name: nv-banner-drift-near;
    }

    /* The line both draws (time) and follows its ridge (scroll): one
       `animation` list, because a second rule would replace the first. */
    .nv-banner__ridges .nv-banner__line {
      animation: nv-banner-draw 2.4s var(--nv-ease) 0.2s forwards, nv-banner-drift-mid linear both;
      animation-timeline: auto, view();
      animation-range: normal, exit;
    }
  }
}

@keyframes nv-banner-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes nv-banner-breathe {
  from {
    opacity: 0.7;
  }

  to {
    opacity: 1;
  }
}

@keyframes nv-banner-drift-far {
  to {
    transform: translateY(160px);
  }
}

@keyframes nv-banner-drift-mid {
  to {
    transform: translateY(90px);
  }
}

@keyframes nv-banner-drift-near {
  to {
    transform: translateY(30px);
  }
}

/* ---------------------------------------------------------------------------
   Profile — who a page is about: a photo, a name, a role, a row of actions.
   The opening of an about page.
     .nv-profile__photo    a square <img>, shown round; give it width and height
     .nv-profile__name     the page's <h1>
     .nv-profile__role     one line: what and where
     .nv-profile__actions  a row of .nv-button, the first one primary
   Side by side; stacked and centred below 560px.
   ------------------------------------------------------------------------ */

.nv-profile {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--nv-space-6);
  margin: var(--nv-space-8) 0 var(--nv-space-7);
}

/* A ring of page colour, then a hairline of accent: the photo sits on the
   page like the nav's avatar, at the scale of a heading. */
.nv-profile__photo {
  display: block;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--nv-surface);
  box-shadow: 0 0 0 4px var(--nv-bg), 0 0 0 5px var(--nv-accent-border);
}

.nv-profile__name {
  margin: 0;
  font-size: clamp(2rem, 5vw, var(--nv-text-4xl));
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--nv-fg-strong);
}

.nv-profile__role {
  margin: var(--nv-space-2) 0 0;
  font-size: var(--nv-text-lg);
  line-height: var(--nv-leading-snug);
  color: var(--nv-fg-muted);
  text-wrap: balance;
}

.nv-profile__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nv-space-3);
  margin-top: var(--nv-space-5);
}

@media (max-width: 560px) {
  .nv-profile {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: var(--nv-space-4);
    margin: var(--nv-space-7) 0 var(--nv-space-6);
    text-align: center;
  }

  .nv-profile__actions {
    justify-content: center;
  }
}

/* ---------------------------------------------------------------------------
   Timeline — roles or events in order, the latest first.
   An <ol class="nv-timeline">; each <li class="nv-timeline__item"> holds:
     .nv-timeline__when   the dates: a <p> with <time datetime> elements
     .nv-timeline__body   everything else:
       .nv-timeline__title  the role, a heading one level below the section's
       .nv-timeline__org    where: an optional .nv-timeline__logo <img>, then text
       .nv-timeline__text   a line or two
   A rail runs between the dates and the body with a dot per item; the item
   that is still going on takes .nv-timeline__item--current: accent dot with
   a soft ring, dates in accent text. Below 560px the dates go above the
   body and the rail moves to the left edge.
   ------------------------------------------------------------------------ */

.nv-timeline {
  --nv-timeline-when: 9.5rem;
  --nv-timeline-gap: var(--nv-space-5);
  list-style: none;
  margin: var(--nv-space-6) 0;
  padding: 0;
}

.nv-timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: var(--nv-timeline-when) 1fr;
  column-gap: calc(var(--nv-timeline-gap) * 2);
  align-items: start;
  margin: 0;
  padding-bottom: var(--nv-space-6);
}

/* The rail: down the middle of the gap, from this dot to the next. */
.nv-timeline__item::before {
  content: "";
  position: absolute;
  left: calc(var(--nv-timeline-when) + var(--nv-timeline-gap) - 1px);
  top: 0.45rem;
  bottom: -0.45rem;
  width: 2px;
  background: var(--nv-border);
}

.nv-timeline__item:last-child {
  padding-bottom: 0;
}

.nv-timeline__item:last-child::before {
  display: none;
}

/* The dot. */
.nv-timeline__item::after {
  content: "";
  position: absolute;
  left: calc(var(--nv-timeline-when) + var(--nv-timeline-gap) - 6px);
  top: 0.45rem;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid var(--nv-border-strong);
  border-radius: 50%;
  background: var(--nv-bg);
}

.nv-timeline__item--current::after {
  border-color: var(--nv-accent);
  background: var(--nv-accent);
  box-shadow: 0 0 0 4px var(--nv-accent-soft);
}

.nv-timeline__when {
  margin: 0;
  padding-top: 0.15rem;
  font-size: var(--nv-text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--nv-fg-muted);
  text-align: right;
}

.nv-timeline__item--current .nv-timeline__when {
  font-weight: 600;
  color: var(--nv-accent-text);
}

.nv-timeline__body {
  min-width: 0;
}

.nv-timeline__title {
  margin: 0;
  font-size: var(--nv-text-lg);
  font-weight: 700;
  line-height: var(--nv-leading-snug);
  color: var(--nv-fg-strong);
}

.nv-timeline__org {
  display: flex;
  align-items: center;
  gap: var(--nv-space-2);
  margin: var(--nv-space-1) 0 0;
  font-size: var(--nv-text-sm);
  color: var(--nv-fg-muted);
}

.nv-timeline__logo {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--nv-radius-sm);
  object-fit: contain;
}

.nv-timeline__text {
  max-width: var(--nv-measure);
  margin: var(--nv-space-2) 0 0;
  line-height: var(--nv-leading);
  color: var(--nv-fg);
}

@media (max-width: 560px) {
  .nv-timeline__item {
    grid-template-columns: 1fr;
    row-gap: var(--nv-space-1);
    padding-left: var(--nv-space-6);
  }

  .nv-timeline__item::before {
    left: 5px;
    top: 0.3rem;
    bottom: -0.3rem;
  }

  .nv-timeline__item::after {
    left: 0;
    top: 0.3rem;
  }

  .nv-timeline__when {
    padding-top: 0;
    text-align: left;
  }
}

/* ---------------------------------------------------------------------------
   Award — a recognition, set apart from the text around it.
     .nv-award__mark    an inline <svg> in currentColor, aria-hidden
     .nv-award__kicker  the kind and the year
     .nv-award__title   what was won
     .nv-award__text    from whom, and for what
     .nv-award__link    optional: the story behind it
   An accent hairline and a faint accent wash, so it reads as a highlight in
   both themes without a second accent colour.
   ------------------------------------------------------------------------ */

.nv-award {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--nv-space-5);
  margin: var(--nv-space-6) 0;
  padding: var(--nv-space-6);
  background:
    linear-gradient(135deg, var(--nv-accent-soft), transparent 70%),
    var(--nv-surface);
  border: 1px solid var(--nv-accent-border);
  border-radius: var(--nv-radius-lg);
}

.nv-award__mark {
  display: block;
  width: 3rem;
  height: 3rem;
  color: var(--nv-accent);
}

.nv-award__kicker {
  margin: 0 0 var(--nv-space-2);
  font-size: var(--nv-text-xs);
  font-weight: 600;
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-accent-text);
}

.nv-award__title {
  margin: 0;
  font-size: var(--nv-text-xl);
  font-weight: 800;
  line-height: var(--nv-leading-tight);
  letter-spacing: -0.02em;
  color: var(--nv-fg-strong);
}

.nv-award__text {
  margin: var(--nv-space-2) 0 0;
  line-height: var(--nv-leading);
  color: var(--nv-fg-muted);
}

.nv-award__link {
  display: inline-block;
  margin-top: var(--nv-space-3);
  font-weight: 600;
  color: var(--nv-accent-text);
}

@media (max-width: 560px) {
  .nv-award {
    grid-template-columns: 1fr;
    gap: var(--nv-space-4);
    padding: var(--nv-space-5);
  }
}

/* ---------------------------------------------------------------------------
   Section head — a title on the left, a small link on the right, a hairline
   ------------------------------------------------------------------------ */

.nv-section {
  margin: var(--nv-space-8) 0 0;
}

.nv-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--nv-space-4);
  margin-bottom: var(--nv-space-4);
  padding-bottom: var(--nv-space-3);
  border-bottom: 1px solid var(--nv-border);
}

.nv-section-head__title {
  margin: 0;
  font-size: var(--nv-text-lg);
  font-weight: 650;
  letter-spacing: var(--nv-tracking-tight);
  color: var(--nv-fg-strong);
}

.nv-section-head__link {
  flex: 0 0 auto;
  font-size: var(--nv-text-xs);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--nv-fg-muted);
  transition: color var(--nv-dur) var(--nv-ease);
}

.nv-section-head__link:hover {
  color: var(--nv-accent);
}

/* ---------------------------------------------------------------------------
   Stats — big numbers with a small label. Use a <dl>: the <dt> (label) comes
   first in the markup, the number is still drawn on top.
   ------------------------------------------------------------------------ */

.nv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nv-space-6);
  margin: 0;
}

.nv-stat {
  display: flex;
  flex-direction: column-reverse;
}

.nv-stat__value {
  margin: 0;
  font-size: var(--nv-text-xl);
  font-weight: 800;
  letter-spacing: var(--nv-tracking-tight);
  font-variant-numeric: tabular-nums;
  color: var(--nv-fg-strong);
}

.nv-stat__label {
  font-size: var(--nv-text-xs);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-fg-muted);
}

/* ---------------------------------------------------------------------------
   Bars — a horizontal bar list. Set the width inline: style="width: 62%".
   The label column takes the width of the longest label; the bars absorb
   the difference and all start on the same line.
   ------------------------------------------------------------------------ */

.nv-bars {
  display: grid;
  grid-template-columns: minmax(5ch, max-content) minmax(0, 1fr) minmax(4ch, max-content);
  gap: var(--nv-space-2) var(--nv-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Rows share the columns of the list (subgrid): with a grid per row every
   bar would start after its own label, and the lengths could not be compared. */
.nv-bar {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  margin: 0;
  font-size: var(--nv-text-sm);
}

.nv-bar__label {
  white-space: nowrap;
  text-decoration: none;
  color: var(--nv-fg-muted);
}

a.nv-bar__label:hover {
  color: var(--nv-accent);
}

.nv-bar__track {
  height: 10px;
  overflow: hidden;
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-pill);
}

.nv-bar__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--nv-accent-border), var(--nv-accent));
  border-radius: inherit;
}

.nv-bar__value {
  font-size: var(--nv-text-xs);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--nv-fg-muted);
}

/* ---------------------------------------------------------------------------
   Forms
   .nv-field      one label, one control, one hint
   .nv-input      text input; pill by default, .nv-input--box for forms
   .nv-textarea, .nv-select
   .nv-checkbox, .nv-radio, .nv-switch   on the <input>, inside a .nv-choice label
   .nv-fieldset   a group of choices with a legend

   The edge of every control is --nv-border-control, which reaches 3:1 against
   the page and the surface: on a control the edge is what says "you can type
   or click here", so it cannot be a hairline.
   ------------------------------------------------------------------------ */

.nv-field {
  display: grid;
  gap: var(--nv-space-2);
  margin-bottom: var(--nv-space-5);
}

.nv-field > .nv-label,
.nv-field > .nv-hint {
  margin: 0;
}

.nv-label {
  display: block;
  margin-bottom: var(--nv-space-2);
  font-size: var(--nv-text-xs);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-fg-muted);
}

.nv-input,
.nv-textarea,
.nv-select {
  width: 100%;
  padding: var(--nv-space-3) var(--nv-space-4);
  font-family: inherit;
  font-size: var(--nv-text-base);
  line-height: 1.4;
  color: var(--nv-fg-strong);
  background-color: var(--nv-surface);
  border: 1px solid var(--nv-border-control);
  border-radius: var(--nv-radius-md);
  transition: border-color var(--nv-dur) var(--nv-ease), box-shadow var(--nv-dur) var(--nv-ease);
}

/* The original shape: a large pill, right for a single search field */
.nv-input {
  font-size: var(--nv-text-lg);
  border-radius: var(--nv-radius-pill);
}

/* In a form with several fields: body size, same corners as the other controls */
.nv-input--box {
  font-size: var(--nv-text-base);
  border-radius: var(--nv-radius-md);
}

.nv-input::placeholder,
.nv-textarea::placeholder {
  color: var(--nv-fg-muted);
  opacity: 1;
}

/* Focus is the edge in the accent colour plus a soft ring: a change of colour
   on a 1px line alone is easy to miss. */
.nv-input:focus,
.nv-textarea:focus,
.nv-select:focus {
  outline: none;
  border-color: var(--nv-accent);
  box-shadow: 0 0 0 3px var(--nv-accent-soft);
}

.nv-textarea {
  display: block;
  min-height: 7.5rem;
  line-height: var(--nv-leading);
  resize: vertical;
}

/* The arrow is two gradients in currentColor, so it follows the theme without
   an image per theme. */
.nv-select {
  padding-right: calc(var(--nv-space-4) * 2 + 0.75rem);
  appearance: none;
  color: var(--nv-fg-strong);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right calc(var(--nv-space-4) + 0.375rem) center, right var(--nv-space-4) center;
  background-size: 0.375rem 0.375rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

.nv-input:disabled,
.nv-textarea:disabled,
.nv-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nv-hint {
  margin: var(--nv-space-3) 0 0;
  font-size: var(--nv-text-xs);
  color: var(--nv-fg-muted);
}

/* Validation
   Invalid is an ARIA state, not a class: aria-invalid="true" on the control,
   and the message linked with aria-describedby. Valid has no ARIA state, so
   it is the class .is-valid. Neither is told by colour alone: the edge gets
   thicker, and the message carries a mark and says what is wrong. */

.nv-input[aria-invalid="true"],
.nv-textarea[aria-invalid="true"],
.nv-select[aria-invalid="true"] {
  border-color: var(--nv-danger);
  box-shadow: inset 0 0 0 1px var(--nv-danger);
}

.nv-input[aria-invalid="true"]:focus,
.nv-textarea[aria-invalid="true"]:focus,
.nv-select[aria-invalid="true"]:focus {
  border-color: var(--nv-danger);
  box-shadow: inset 0 0 0 1px var(--nv-danger), 0 0 0 3px var(--nv-danger-soft);
}

.nv-input.is-valid,
.nv-textarea.is-valid,
.nv-select.is-valid {
  border-color: var(--nv-success);
  box-shadow: inset 0 0 0 1px var(--nv-success);
}

.nv-checkbox[aria-invalid="true"],
.nv-radio[aria-invalid="true"],
.nv-switch[aria-invalid="true"] {
  border-color: var(--nv-danger);
  border-width: 2px;
}

.nv-error,
.nv-valid {
  display: flex;
  align-items: flex-start;
  gap: var(--nv-space-2);
  margin: var(--nv-space-2) 0 0;
  font-size: var(--nv-text-sm);
  line-height: 1.4;
}

.nv-field > .nv-error,
.nv-field > .nv-valid {
  margin: 0;
}

.nv-error {
  color: var(--nv-danger);
}

.nv-valid {
  color: var(--nv-success-text);
}

/* The mark before the message. The second `content` gives it an empty text
   alternative where that syntax is supported, so it is not read aloud. */
.nv-error::before,
.nv-valid::before {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.1em;
  font-size: 0.85em;
  font-weight: 800;
  line-height: 1;
  border: 1.5px solid currentColor;
  border-radius: var(--nv-radius-pill);
}

.nv-error::before {
  content: "!";
  content: "!" / "";
}

.nv-valid::before {
  content: "\2713";
  content: "\2713" / "";
}

/* Groups of choices */

.nv-fieldset {
  min-width: 0;
  margin: 0 0 var(--nv-space-5);
  padding: 0;
  border: 0;
}

.nv-legend {
  margin-bottom: var(--nv-space-3);
  padding: 0;
  font-size: var(--nv-text-xs);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-fg-muted);
}

/* A label that wraps the control and its text: the whole row is the target */
.nv-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--nv-space-3);
  width: fit-content;
  max-width: 100%;
  margin-bottom: var(--nv-space-3);
  font-size: var(--nv-text-base);
  line-height: 1.4;
  color: var(--nv-fg);
  cursor: pointer;
}

.nv-choice:last-child {
  margin-bottom: 0;
}

.nv-checkbox,
.nv-radio,
.nv-switch {
  flex: 0 0 auto;
  position: relative;
  /* centred on the first line of the text beside it */
  margin: 0.1em 0 0;
  appearance: none;
  background: var(--nv-surface);
  border: 1.5px solid var(--nv-border-control);
  cursor: pointer;
  transition: background var(--nv-dur) var(--nv-ease), border-color var(--nv-dur) var(--nv-ease);
}

.nv-checkbox,
.nv-radio {
  width: 1.125rem;
  height: 1.125rem;
}

.nv-checkbox {
  border-radius: var(--nv-radius-sm);
}

.nv-radio {
  border-radius: var(--nv-radius-pill);
}

.nv-checkbox::before,
.nv-radio::before,
.nv-switch::before {
  content: "";
  position: absolute;
}

/* The tick: a rectangle clipped to a check mark */
.nv-checkbox::before {
  inset: 1px;
  background: var(--nv-on-accent);
  clip-path: polygon(14% 52%, 0 68%, 40% 100%, 100% 24%, 84% 10%, 38% 66%);
  transform: scale(0);
  transition: transform var(--nv-dur-fast) var(--nv-ease);
}

.nv-radio::before {
  inset: 3px;
  background: var(--nv-on-accent);
  border-radius: inherit;
  transform: scale(0);
  transition: transform var(--nv-dur-fast) var(--nv-ease);
}

.nv-checkbox:checked,
.nv-radio:checked,
.nv-switch:checked {
  background: var(--nv-accent);
  border-color: var(--nv-accent);
}

.nv-checkbox:checked::before,
.nv-radio:checked::before {
  transform: scale(1);
}

/* A checkbox that is neither on nor off: set el.indeterminate from script */
.nv-checkbox:indeterminate {
  background: var(--nv-accent);
  border-color: var(--nv-accent);
}

.nv-checkbox:indeterminate::before {
  inset: 45% 20%;
  clip-path: none;
  transform: none;
}

/* Switch: a checkbox with role="switch", for a setting that applies at once */
.nv-switch {
  width: 2.25rem;
  height: 1.25rem;
  border-radius: var(--nv-radius-pill);
}

.nv-switch::before {
  top: 2px;
  left: 2px;
  width: calc(1.25rem - 7px);
  height: calc(1.25rem - 7px);
  background: var(--nv-border-control);
  border-radius: inherit;
  transition: transform var(--nv-dur) var(--nv-ease-out), background var(--nv-dur) var(--nv-ease);
}

.nv-switch:checked::before {
  background: var(--nv-on-accent);
  transform: translateX(1rem);
}

.nv-checkbox:focus-visible,
.nv-radio:focus-visible,
.nv-switch:focus-visible {
  outline: 2px solid var(--nv-accent);
  outline-offset: 2px;
}

.nv-checkbox:disabled,
.nv-radio:disabled,
.nv-switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nv-choice:has(:disabled) {
  color: var(--nv-fg-muted);
  cursor: not-allowed;
}

/* In forced colours the drawn marks disappear: give the controls back to the system */
@media (forced-colors: active) {
  .nv-checkbox,
  .nv-radio,
  .nv-switch,
  .nv-select {
    appearance: auto;
    background: none;
  }

  .nv-checkbox::before,
  .nv-radio::before,
  .nv-switch::before {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   Alert — a message in the page, in four tones.
   The tone sets three custom properties; the parts read them. A tone is never
   told by colour alone: put a different mark in .nv-alert__icon for each
   (i, a tick, !, a cross) and say the thing in the title.
   Use role="alert" only for something that needs attention now; a message
   that was in the page from the start needs no role.
   ------------------------------------------------------------------------ */

.nv-alert,
.nv-toast {
  --nv-tone: var(--nv-info);
  --nv-tone-soft: var(--nv-info-soft);
  --nv-tone-border: var(--nv-info-border);
  display: flex;
  align-items: flex-start;
  gap: var(--nv-space-3);
  padding: var(--nv-space-3) var(--nv-space-4);
  font-size: var(--nv-text-sm);
  line-height: 1.5;
  color: var(--nv-fg);
  border: 1px solid var(--nv-tone-border);
  border-radius: var(--nv-radius-md);
}

.nv-alert {
  margin: 0 0 var(--nv-space-4);
  background: var(--nv-tone-soft);
}

.nv-alert--success,
.nv-toast--success {
  --nv-tone: var(--nv-success-text);
  --nv-tone-soft: var(--nv-success-soft);
  --nv-tone-border: var(--nv-success-border);
}

.nv-alert--warning,
.nv-toast--warning {
  --nv-tone: var(--nv-warning);
  --nv-tone-soft: var(--nv-warning-soft);
  --nv-tone-border: var(--nv-warning-border);
}

.nv-alert--danger,
.nv-toast--danger {
  --nv-tone: var(--nv-danger);
  --nv-tone-soft: var(--nv-danger-soft);
  --nv-tone-border: var(--nv-danger-border);
}

.nv-alert__icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.05rem;
  font-size: var(--nv-text-xs);
  font-weight: 800;
  line-height: 1;
  color: var(--nv-tone);
  border: 1.5px solid currentColor;
  border-radius: var(--nv-radius-pill);
}

.nv-alert__body {
  flex: 1 1 auto;
  min-width: 0;
}

.nv-alert__body > :last-child {
  margin-bottom: 0;
}

.nv-alert__title {
  margin: 0;
  font-weight: 600;
  color: var(--nv-fg-strong);
}

.nv-alert__text {
  margin: 0;
}

.nv-alert__close {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: -0.1rem calc(var(--nv-space-2) * -1) 0 0;
  padding: 0;
  font: inherit;
  font-size: var(--nv-text-lg);
  line-height: 1;
  color: var(--nv-fg-muted);
  background: none;
  border: 0;
  border-radius: var(--nv-radius-pill);
  cursor: pointer;
  transition: color var(--nv-dur) var(--nv-ease), background var(--nv-dur) var(--nv-ease);
}

.nv-alert__close:hover {
  color: var(--nv-fg-strong);
  background: var(--nv-hover-overlay);
}

/* ---------------------------------------------------------------------------
   Toast — a short message that appears over the page and goes away.
   .nv-toasts is the live region: keep one in the page (or let nava-ui.js
   create it) so that screen readers announce what is added to it.
   A toast has the parts of an alert on an opaque surface with a shadow.
   ------------------------------------------------------------------------ */

.nv-toasts {
  position: fixed;
  right: var(--nv-space-4);
  bottom: var(--nv-space-4);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--nv-space-2);
  width: min(24rem, calc(100vw - var(--nv-space-4) * 2));
  pointer-events: none;
}

.nv-toast {
  pointer-events: auto;
  background: var(--nv-surface);
  box-shadow: var(--nv-shadow-md);
}

@media (prefers-reduced-motion: no-preference) {
  .nv-toast {
    animation: nv-toast-in var(--nv-dur-slow) var(--nv-ease-out);
  }

  .nv-toast.is-leaving {
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity var(--nv-dur) var(--nv-ease), transform var(--nv-dur) var(--nv-ease);
  }
}

@keyframes nv-toast-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}

@media (max-width: 560px) {
  .nv-toasts {
    right: var(--nv-space-3);
    left: var(--nv-space-3);
    bottom: var(--nv-space-3);
    width: auto;
  }
}

/* ---------------------------------------------------------------------------
   Dialog — the native <dialog>, styled. Open it with showModal() (or a button
   with data-nv-dialog="<id>" and nava-ui.js): the browser then traps the
   focus, closes on Escape, makes the page behind it inert and returns the
   focus to the opener. No focus-trap code here, because none is needed.
     .nv-dialog            on the <dialog>; give it aria-labelledby its title
     .nv-dialog__header    title and a close button
     .nv-dialog__title
     .nv-dialog__close     in a <form method="dialog">, so it closes without JS
     .nv-dialog__body      scrolls when the content is taller than the screen
     .nv-dialog__actions   the buttons, the main one last
   closedby="any" also closes it on a click outside; nava-ui.js adds that to
   browsers that do not know the attribute yet. The page behind does not
   scroll while a modal dialog is open.
   ------------------------------------------------------------------------ */

.nv-dialog {
  display: none;
  flex-direction: column;
  width: min(32rem, calc(100vw - var(--nv-space-4) * 2));
  max-height: calc(100dvh - var(--nv-space-6) * 2);
  padding: 0;
  overflow: hidden;
  color: var(--nv-fg);
  background: var(--nv-surface);
  border: 1px solid var(--nv-border-strong);
  border-radius: var(--nv-radius-lg);
  box-shadow: var(--nv-shadow-md);
}

.nv-dialog[open] {
  display: flex;
}

.nv-dialog::backdrop {
  background: var(--nv-glass);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

:root:has(.nv-dialog:modal) {
  overflow: hidden;
}

.nv-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nv-space-3);
  padding: var(--nv-space-5) var(--nv-space-5) 0;
}

.nv-dialog__header form {
  display: contents;
}

.nv-dialog__title {
  margin: 0;
  font-size: var(--nv-text-lg);
  font-weight: 650;
  letter-spacing: var(--nv-tracking-tight);
  line-height: var(--nv-leading-snug);
  color: var(--nv-fg-strong);
}

.nv-dialog__close {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--nv-space-6);
  height: var(--nv-space-6);
  margin: calc(var(--nv-space-1) * -1) calc(var(--nv-space-2) * -1) 0 0;
  padding: 0;
  font: inherit;
  font-size: var(--nv-text-xl);
  line-height: 1;
  color: var(--nv-fg-muted);
  background: none;
  border: 0;
  border-radius: var(--nv-radius-pill);
  cursor: pointer;
  transition: color var(--nv-dur) var(--nv-ease), background var(--nv-dur) var(--nv-ease);
}

.nv-dialog__close:focus-visible {
  color: var(--nv-fg-strong);
  background: var(--nv-hover-overlay);
}

@media (hover: hover) {
  .nv-dialog__close:hover {
    color: var(--nv-fg-strong);
    background: var(--nv-hover-overlay);
  }
}

.nv-dialog__body {
  min-height: 0;
  overflow-y: auto;
  padding: var(--nv-space-4) var(--nv-space-5);
}

.nv-dialog__body > :first-child {
  margin-top: 0;
}

.nv-dialog__body > :last-child {
  margin-bottom: 0;
}

.nv-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--nv-space-3);
  padding: var(--nv-space-4) var(--nv-space-5) var(--nv-space-5);
  border-top: 1px solid var(--nv-border);
}

/* Opening: a short fade and rise, only without reduced motion and only where
   the browser can animate from display: none (@starting-style). */
@media (prefers-reduced-motion: no-preference) {
  .nv-dialog[open] {
    transition: opacity var(--nv-dur) var(--nv-ease), transform var(--nv-dur) var(--nv-ease-out);
  }

  @starting-style {
    .nv-dialog[open] {
      opacity: 0;
      transform: translateY(var(--nv-space-2)) scale(0.98);
    }
  }
}

/* ---------------------------------------------------------------------------
   Tabs — the ARIA tab pattern, in the look of the nav links.
     .nv-tabs              the wrapper
     .nv-tabs__list        role="tablist", with an aria-label
     .nv-tabs__tab         a <button role="tab"> with aria-selected and
                           aria-controls; the selected one has tabindex="0",
                           the others tabindex="-1"
     .nv-tabs__panel       role="tabpanel", aria-labelledby its tab, tabindex="0";
                           every panel but the selected one is [hidden]
   The behaviour is in nava-ui.js: a click selects a tab; the arrow keys move
   between tabs and select them, Home and End go to the first and the last.
   Tab moves from the list to the panel. Without the script only the first
   panel is reachable, so tabs are for pages that load it.
   ------------------------------------------------------------------------ */

.nv-tabs__list {
  display: inline-flex;
  max-width: 100%;
  gap: 2px;
  padding: var(--nv-space-1);
  overflow-x: auto;
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-pill);
  scrollbar-width: none;
}

.nv-tabs__list::-webkit-scrollbar {
  display: none;
}

.nv-tabs__tab {
  flex: none;
  padding: 7px 13px;
  font: inherit;
  font-size: var(--nv-text-sm);
  font-weight: 500;
  white-space: nowrap;
  color: var(--nv-fg-muted);
  background: none;
  border: 0;
  border-radius: var(--nv-radius-pill);
  cursor: pointer;
  transition: color var(--nv-dur) var(--nv-ease), background var(--nv-dur) var(--nv-ease);
}

.nv-tabs__tab:focus-visible {
  outline: 2px solid var(--nv-accent);
  outline-offset: 2px;
}

.nv-tabs__tab[aria-selected="true"] {
  color: var(--nv-on-accent);
  background: var(--nv-accent);
}

@media (hover: hover) {
  .nv-tabs__tab[aria-selected="false"]:hover {
    color: var(--nv-fg-strong);
    background: var(--nv-hover-overlay);
  }
}

.nv-tabs__panel {
  padding-top: var(--nv-space-5);
}

.nv-tabs__panel:focus-visible {
  outline: 2px solid var(--nv-accent);
  outline-offset: 4px;
  border-radius: var(--nv-radius-sm);
}

.nv-tabs__panel > :first-child {
  margin-top: 0;
}

.nv-tabs__panel > :last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Data table — a table that scrolls inside its own box.
     .nv-table-wrap        the box: scrolls both ways; give it tabindex="0",
                           role="region" and an aria-label, so a keyboard can
                           scroll it; set a max-height for a sticky header
     .nv-table             the <table>; a <caption> is its title
     .nv-table__num        on a <th> or <td>: right-aligned, tabular figures
   The header sticks to the top of the box while the rows scroll. A row is
   selected when a checkbox in it is checked, or with the class is-selected:
   the state stays in the checkbox, where a screen reader finds it, and the
   colour follows it. Row hover only where there is a pointer that hovers.
   Works without base.css.
   ------------------------------------------------------------------------ */

.nv-table-wrap {
  max-width: 100%;
  overflow: auto;
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
}

.nv-table-wrap:focus-visible {
  outline: 2px solid var(--nv-accent);
  outline-offset: 2px;
}

.nv-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--nv-text-sm);
  color: var(--nv-fg);
}

.nv-table caption {
  padding: var(--nv-space-4) var(--nv-space-4) var(--nv-space-2);
  font-weight: 650;
  text-align: left;
  color: var(--nv-fg-strong);
}

.nv-table th,
.nv-table td {
  padding: var(--nv-space-3) var(--nv-space-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--nv-border);
}

.nv-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: var(--nv-text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--nv-fg-muted);
  background: var(--nv-surface);
  border-bottom-color: var(--nv-border-strong);
}

/* A row header names the row: on one line, the box scrolls sideways instead. */
.nv-table tbody th {
  font-weight: 600;
  white-space: nowrap;
  color: var(--nv-fg-strong);
}

.nv-table tbody tr:last-child > * {
  border-bottom: 0;
}

.nv-table .nv-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nv-table td:has(> input[type="checkbox"]:only-child),
.nv-table th:has(> input[type="checkbox"]:only-child) {
  width: 1%;
  padding-right: 0;
}

.nv-table tbody tr {
  transition: background var(--nv-dur-fast) var(--nv-ease);
}

@media (hover: hover) {
  .nv-table tbody tr:hover {
    background: var(--nv-row-hover);
  }
}

/* Selected: a wash of the accent and a bar on the leading edge. */
.nv-table tbody tr.is-selected,
.nv-table tbody tr:has(> :first-child > input[type="checkbox"]:checked) {
  background: var(--nv-accent-soft);
}

.nv-table tbody tr.is-selected > :first-child,
.nv-table tbody tr:has(> :first-child > input[type="checkbox"]:checked) > :first-child {
  box-shadow: inset 3px 0 0 var(--nv-accent);
}

/* ---------------------------------------------------------------------------
   Empty and loading — what a region shows when it has nothing yet.
   .nv-empty          nothing to show: an optional icon, a title, one line of
                      text and at most one action (.nv-actions)
   .nv-skeleton       a placeholder block while content loads; --line for a
                      line of text, --circle for an avatar; size it inline
   .nv-spinner        a small ring, for a button that is working
   The region that is loading carries aria-busy="true" and a text for screen
   readers (.nv-sr-only "Loading…"); skeletons and spinners are decoration,
   aria-hidden. A working button keeps its label and gets aria-busy="true": it
   stays readable, unlike [disabled], and ignores clicks until it is done.
   Under prefers-reduced-motion the shimmer stops and the spinner stands still.
   ------------------------------------------------------------------------ */

.nv-empty {
  display: grid;
  justify-items: center;
  gap: var(--nv-space-3);
  padding: var(--nv-space-7) var(--nv-space-5);
  text-align: center;
  border: 1px dashed var(--nv-border-strong);
  border-radius: var(--nv-radius-lg);
}

.nv-empty__icon {
  display: grid;
  place-items: center;
  width: var(--nv-space-7);
  height: var(--nv-space-7);
  border-radius: 50%;
  font-size: var(--nv-text-xl);
  color: var(--nv-fg-muted);
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
}

.nv-empty__title {
  margin: 0;
  font-size: var(--nv-text-lg);
  font-weight: 650;
  letter-spacing: var(--nv-tracking-tight);
  color: var(--nv-fg-strong);
}

.nv-empty__text {
  max-width: 46ch;
  margin: 0;
  color: var(--nv-fg-muted);
}

.nv-empty .nv-actions {
  justify-content: center;
  margin-top: var(--nv-space-2);
}

.nv-skeleton {
  display: block;
  height: var(--nv-space-5);
  background: var(--nv-surface-hover);
  border-radius: var(--nv-radius-md);
}

.nv-skeleton--line {
  height: 0.75em;
  margin: 0.4em 0;
  border-radius: var(--nv-radius-sm);
}

.nv-skeleton--circle {
  width: var(--nv-space-7);
  height: var(--nv-space-7);
  border-radius: 50%;
}

.nv-spinner {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
}

.nv-button[aria-busy="true"] {
  cursor: progress;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .nv-skeleton {
    background:
      linear-gradient(90deg, transparent 0%, var(--nv-hover-overlay) 50%, transparent 100%)
        0 0 / 200% 100% no-repeat,
      var(--nv-surface-hover);
    animation: nv-shimmer 1.6s var(--nv-ease) infinite;
  }

  .nv-spinner {
    animation: nv-spin 0.8s linear infinite;
  }
}

@keyframes nv-shimmer {
  from {
    background-position: 150% 0, 0 0;
  }

  to {
    background-position: -50% 0, 0 0;
  }
}

@keyframes nv-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------ */

.nv-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--nv-space-3);
  margin: var(--nv-space-7) auto 0;
  /* safety net: inside a multi-column grid it would take one cell only */
  grid-column: 1 / -1;
}

.nv-pagination__page {
  font-size: var(--nv-text-xs);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-fg-muted);
}

.nv-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: var(--nv-text-lg);
  line-height: 1;
  text-decoration: none;
  color: var(--nv-fg);
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-pill);
  transition: background var(--nv-dur) var(--nv-ease), border-color var(--nv-dur) var(--nv-ease),
    color var(--nv-dur) var(--nv-ease);
}

.nv-pagination__btn:hover {
  color: var(--nv-accent);
  background: var(--nv-surface-hover);
  border-color: var(--nv-accent-border);
}

/* Keeps the page number centred when one arrow is missing */
.nv-pagination__btn[aria-disabled="true"] {
  visibility: hidden;
}

/* ---------------------------------------------------------------------------
   Panel — a centred call to action
   ------------------------------------------------------------------------ */

.nv-panel {
  margin: var(--nv-space-9) 0 0;
  padding: var(--nv-space-7) var(--nv-space-6);
  text-align: center;
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-lg);
}

.nv-panel__title {
  margin: 0 0 var(--nv-space-3);
  font-size: var(--nv-text-2xl);
  font-weight: 800;
  letter-spacing: var(--nv-tracking-tight);
  color: var(--nv-fg-strong);
}

.nv-panel__text {
  max-width: 46ch;
  margin: 0 auto var(--nv-space-5);
  color: var(--nv-fg-muted);
}

.nv-panel .nv-actions {
  justify-content: center;
}

/* ---------------------------------------------------------------------------
   Footer — columns (about, site, elsewhere) and a bottom line
   ------------------------------------------------------------------------ */

.nv-footer {
  margin: var(--nv-space-9) 0 0;
  padding: var(--nv-space-7) 0 var(--nv-space-6);
  font-size: var(--nv-text-sm);
  color: var(--nv-fg-muted);
  border-top: 1px solid var(--nv-border);
}

.nv-footer__cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--nv-space-6);
}

.nv-footer__title {
  margin: 0 0 var(--nv-space-3);
  font-size: var(--nv-text-xs);
  font-weight: 600;
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-fg-muted);
}

.nv-footer__name {
  margin: 0 0 var(--nv-space-2);
  font-weight: 600;
  color: var(--nv-fg-strong);
}

.nv-footer__text {
  max-width: 34ch;
  margin: 0;
  line-height: 1.5;
}

.nv-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nv-footer__list > li {
  margin-bottom: var(--nv-space-2);
  line-height: 1.4;
}

.nv-footer__link {
  color: var(--nv-fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--nv-dur) var(--nv-ease), border-color var(--nv-dur) var(--nv-ease);
}

.nv-footer__link:hover {
  color: var(--nv-accent);
  border-color: var(--nv-accent-border);
}

.nv-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--nv-space-2);
  margin-top: var(--nv-space-7);
  padding-top: var(--nv-space-4);
  font-size: var(--nv-text-xs);
  border-top: 1px solid var(--nv-border);
}

.nv-footer__bottom p {
  margin: 0;
}

@media (max-width: 780px) {
  .nv-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: var(--nv-space-5);
  }
}

@media (max-width: 560px) {
  .nv-footer__cols {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------------
   Code block with a copy button — nava-ui.js wraps each <pre> inside an
   element with [data-nv-copy] (or a <pre data-nv-copy>) in .nv-code and adds
   the button, only where the Clipboard API exists, so no button appears that
   would copy nothing. The markup it writes:
     .nv-code            the wrapper: it takes the block's margin, the <pre> none
     .nv-code__copy      the button, top right: shown on hover of the block and
                         on keyboard focus, always shown where there is no hover
     .nv-code__copy.is-done   for a moment after a copy
   The button sits outside the <pre>, so it stays put when the code scrolls
   sideways.
   ------------------------------------------------------------------------ */

.nv-code {
  position: relative;
  margin: 0 0 var(--nv-space-5);
}

.nv-code > pre {
  margin: 0;
}

.nv-code__copy {
  position: absolute;
  top: var(--nv-space-2);
  right: var(--nv-space-2);
  padding: 4px 10px;
  font-family: inherit;
  font-size: var(--nv-text-xs);
  letter-spacing: 0.03em;
  color: var(--nv-fg-muted);
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius-pill);
  cursor: pointer;
  transition: opacity var(--nv-dur) var(--nv-ease), color var(--nv-dur) var(--nv-ease),
    border-color var(--nv-dur) var(--nv-ease);
}

.nv-code__copy:focus-visible {
  color: var(--nv-fg-strong);
  border-color: var(--nv-border-strong);
}

.nv-code__copy.is-done {
  color: var(--nv-on-accent);
  background: var(--nv-accent);
  border-color: var(--nv-accent);
}

@media (hover: hover) {
  .nv-code__copy {
    opacity: 0;
  }

  .nv-code:hover .nv-code__copy,
  .nv-code__copy:focus-visible,
  .nv-code__copy.is-done {
    opacity: 1;
  }

  .nv-code__copy:hover {
    color: var(--nv-fg-strong);
    border-color: var(--nv-border-strong);
  }

  .nv-code__copy.is-done:hover {
    color: var(--nv-on-accent);
    border-color: var(--nv-accent);
  }
}

/* ---------------------------------------------------------------------------
   Reduced motion: no lift, no press
   ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .nv-card,
  .nv-card:hover,
  .nv-button,
  .nv-button:hover,
  .nv-button:active {
    transform: none;
    transition-duration: 0.001ms;
  }

  .nv-checkbox::before,
  .nv-radio::before,
  .nv-switch::before,
  .nv-code__copy {
    transition-duration: 0.001ms;
  }
}
}
