/* The openvalence.org header, a copy of the site's (openvalence.github.io style.css "header"
   and "narrower" rules) in its tokens, dark and light; the theme is the head script's
   (data-theme, the pages' <head>). Change it there first, then here. Hidden inside a frame:
   the site's /kinetic/ page embeds the playground under its own header. */
@font-face {
  font-family: 'Archivo';
  src: url('https://openvalence.org/fonts/Archivo.woff2') format('woff2');
  font-weight: 700 900; font-stretch: 100% 125%; font-display: swap;
}
.strip {
  --bg: #0B0B0C; --bg-2: #161618; --ink: #F3F3EF; --ink-2: #BDBDB7; --ink-3: #92928C; --rule: #2C2C30; --accent: #2E4BFF; --accent-ink: #92A3FF;
  --shadow: 0 30px 80px -30px rgba(0,0,0,.8); --gutter: 16px;
  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  display: flex; align-items: center; gap: 10px 28px; padding: 14px 0;
  position: relative; z-index: 10;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme=dark]) .strip {
    --bg: #F3F2EE; --bg-2: #E8E7E1; --ink: #0B0B0C; --ink-2: #34343A; --ink-3: #5B5B61; --rule: #CFCEC7; --accent-ink: #2E4BFF;
    --shadow: 0 30px 70px -34px rgba(20,20,40,.45);
  }
}
:root[data-theme=light] .strip {
  --bg: #F3F2EE; --bg-2: #E8E7E1; --ink: #0B0B0C; --ink-2: #34343A; --ink-3: #5B5B61; --rule: #CFCEC7; --accent-ink: #2E4BFF;
  --shadow: 0 30px 70px -34px rgba(20,20,40,.45);
}
.framed .strip { display: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 900 1.15rem/1 var(--display); font-stretch: 115%; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { display: block; width: 26px; height: 26px; }
.chips { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.chip { color: var(--ink-2); text-decoration: none; white-space: nowrap; font: 800 .82rem/1.6 var(--display); font-stretch: 108%; text-transform: uppercase; letter-spacing: .04em; }
.chip:hover, .chip[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.chip.util { margin-left: 2px; padding-left: 24px; border-left: 1px solid var(--rule); }
.get {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 10px 18px 10px 14px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none;
  font: 800 .82rem/1 var(--display); font-stretch: 108%; text-transform: uppercase; letter-spacing: .04em;
}
.get svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.get:hover { color: var(--bg); background: var(--ink); }
.strip a:focus-visible, .strip button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
/* the theme toggle: shows the theme it switches to; hidden without the head script */
.theme { display: grid; place-items: center; flex: none; width: 38px; height: 38px; margin-left: -14px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: none; cursor: pointer; }
.theme:hover { color: var(--accent-ink); background: var(--bg-2); }
.theme svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html:not(.js) .theme, :root:not([data-theme=light]) .theme .moon, [data-theme=light] .theme .sun { display: none; }
/* the Components menu (site style.css "the Components menu"; behavior in site-nav.js) */
.menu { position: relative; display: flex; align-items: center; gap: 2px; }
.menu-btn { display: grid; place-items: center; width: 24px; height: 28px; margin-right: -6px; padding: 0; border: 0; border-radius: 4px; color: var(--ink-2); background: none; cursor: pointer; }
.menu-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.menu-btn:hover, .menu.open .menu-btn { color: var(--ink); }
.menu.open .menu-btn svg { transform: rotate(180deg); }
.menu-panel {
  position: absolute; top: 100%; left: -18px; width: 360px; padding-top: 12px;
  visibility: hidden; opacity: 0; transition: opacity .12s, visibility 0s .12s;
}
.menu.open .menu-panel, .menu:not(.live):hover .menu-panel, .menu:not(.live):focus-within .menu-panel { visibility: visible; opacity: 1; transition-delay: 0s; }
.menu-panel ul { margin: 0; padding: 0; list-style: none; }
.menu-panel ul, .menu-panel .all { background: var(--bg); }
.menu-panel ul { border-top: 3px solid var(--ink); box-shadow: var(--shadow); }
.menu-panel .item { display: block; padding: 11px 18px 12px; border-bottom: 1px solid var(--rule); color: var(--ink-2); text-decoration: none; font: 400 .9rem/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.menu-panel .item b { display: block; margin-bottom: 2px; color: var(--ink); font: 800 1rem/1.15 var(--display); font-stretch: 108%; }
.menu-panel .item i { margin-left: 6px; padding: 2px 5px 1px; font: 900 .58rem/1 var(--display); font-stretch: 110%; letter-spacing: .06em; vertical-align: .2em; font-style: normal; color: var(--bg); background: var(--ink-3); }
.menu-panel .item:hover { color: var(--ink); background: var(--bg-2); }
.menu-panel .item:hover b { color: var(--accent-ink); }
.menu-panel .all { box-shadow: var(--shadow); font: 800 .78rem/1 var(--display); font-stretch: 108%; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); padding-block: 14px; }
.menu-panel :focus-visible { outline-offset: -3px; }
.nb { white-space: nowrap; }

/* the body's 16 px side padding is the gutter here */
@media (max-width: 1100px) {
  .strip { flex-wrap: wrap; justify-content: space-between; padding-bottom: 0; }
  .get { margin-left: auto; }
  .chips {
    order: 3; flex: 1 0 100%; margin: 0 -16px; padding: 4px 16px 12px;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chips > :last-child { padding-right: 16px; }
  .menu { position: static; }
  .chips:has(.menu.open) { mask-image: none; }
  .menu-panel { left: -16px; right: -16px; width: auto; padding: 0; }
  .menu-panel ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); border-top-width: 1px; border-top-color: var(--rule); box-shadow: none; }
  .menu-panel .all { padding-inline: var(--gutter); border-bottom: 3px solid var(--ink); box-shadow: 0 24px 40px -24px rgba(0,0,0,.6); }
}
@media (max-width: 640px) {
  .strip { column-gap: 12px; }
  .brand { font-size: 1.05rem; }
  .get { padding: 9px 14px 9px 11px; font-size: .78rem; }
  .theme { width: 34px; height: 34px; margin-left: -8px; }
  .chips { gap: 18px; }
  .chip.util { padding-left: 20px; }
}
/* the wordmark, Download and the theme toggle share the top row down to 360 px */
@media (max-width: 400px) {
  .strip { column-gap: 8px; }
  .brand { font-size: .98rem; }
  .get { padding-inline: 12px; }
  .get svg { display: none; }
  .theme { margin-left: -4px; }
}
@media (max-width: 350px) { .theme { margin-left: auto; } }
