
header.nb-head { position: sticky; top: 0; z-index: 10; height: 60px; box-sizing: border-box; padding: 8px max(16px, calc((100% - 1200px) / 2)); display: flex; justify-content: center; align-items: flex-start; pointer-events: none; }
header.nb-head::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 72px; background: linear-gradient(var(--canvas) 0, var(--canvas) 52px, rgba(8, 16, 19, 0)); opacity: 0; transition: opacity .25s; pointer-events: none; }
header.nb-head.is-scrolled::before { opacity: 1; }
.nb { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 12px; height: 44px; max-width: 100%; box-sizing: border-box; padding: 0 5px 0 14px; border-radius: 12px; background: rgba(11, 19, 22, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--node-line); box-shadow: var(--shadow-pop); }
/* V4 W13: one focus ring on every link, button and summary on every page (a rule of its own, further down, may keep the same ring) */
:where(a, button, summary, [role="button"]):focus-visible { outline: 2px solid var(--accent, #F1EDE3); outline-offset: 2px; }
@keyframes nb-in { from { opacity: 0; transform: translateY(-6px); } }
.nb-home { display: flex; align-items: center; align-self: stretch; flex-shrink: 0; border-radius: 6px; text-decoration: none; }
.nb-home .ss-mark { width: 24px; height: 24px; }
.nb-home .ss-logo { gap: 6px !important; }
.nb-home .ss-wordmark { font-size: 17px !important; }
.nb-vd { flex-shrink: 0; width: 1px; height: 20px; background: var(--node-line); }
.nb-links { display: flex; align-items: center; gap: 2px; }
/* a link: muted text; under the pointer a thin copper trace draws beneath it; the section on screen keeps a faint one */
.nb-link { position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 9px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .15s; }
.nb-link::after { content: ''; position: absolute; left: 9px; right: 9px; bottom: 5px; height: 1px; background: var(--port); transform: scaleX(0); transform-origin: left center; transition: transform .22s cubic-bezier(.2, .7, .2, 1), background-color .15s; }
.nb-link:hover, .nb-link:focus-visible { color: var(--text); }
.nb-link:hover::after, .nb-link:focus-visible::after { transform: scaleX(1); }
.nb-link[aria-current] { color: var(--text); }
.nb-link[aria-current]::after { transform: scaleX(1); background: var(--hl-line); }
.nb-menu { all: unset; box-sizing: border-box; cursor: pointer; display: none; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent; font: 500 14px var(--font-sans); color: var(--text-2); white-space: nowrap; transition: color .15s, background-color .15s, border-color .15s; }
.nb-menu svg { display: block; flex-shrink: 0; }
.nb-menu:hover { color: var(--text); background: var(--hover); }
.nb-menu[aria-expanded="true"] { color: var(--hl); background: var(--hl-soft); border-color: var(--hl-line); }
/* Open Silkscreen: a system card with a copper pin on its left edge and a connector running into it. On hover the
   connector turns copper and a signal runs into the pin */
.nb-port { position: relative; flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 34px; margin-left: 12px; padding: 0 12px 0 15px; box-sizing: border-box; border-radius: 8px; background: var(--node); border: 1px solid #2A3C45; color: var(--text); font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; transition: border-color .2s, background-color .2s; }
.nb-w { position: absolute; left: -21px; top: 50%; width: 17px; height: 2px; margin-top: -1px; background: var(--t-wire, #3E525A); transition: background-color .2s; }
.nb-p { position: absolute; left: -4.5px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--port); box-shadow: 0 0 0 2px var(--chrome); transition: box-shadow .2s; }
.nb-s { position: absolute; left: -24px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(241, 237, 227, .8); opacity: 0; }
.nb-a { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.nb-port:hover { border-color: var(--hl-line); background: var(--hover); }
.nb-port:hover .nb-w, .nb-port:focus-visible .nb-w { background: var(--port); }
.nb-port:hover .nb-p { box-shadow: 0 0 0 2px var(--chrome), 0 0 10px rgba(201, 139, 94, .7); }
.nb-port:hover .nb-s { animation: nb-run 1.4s cubic-bezier(.5, 0, .4, 1) infinite; }
@keyframes nb-run { 0% { transform: translateX(0); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateX(18px); opacity: 1; } 100% { transform: translateX(18px); opacity: 0; } }      /* V4 W14: transform, not left */
.nb-home:focus-visible, .nb-link:focus-visible, .nb-menu:focus-visible, .nb-port:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* too narrow for the links: logo, Menu, Open Silkscreen; the links open as a card under the capsule */
.nb.has-js.is-compact .nb-menu { display: inline-flex; }
/* the card is solid: a blur inside the capsule's own blur does not reach the page in Chrome, so the text below would show */
.nb.has-js.is-compact .nb-links { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 232px; box-sizing: border-box; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 6px; border-radius: 12px; background: var(--chrome); border: 1px solid var(--node-line); box-shadow: var(--shadow-pop); }
.nb.has-js.is-compact.is-open .nb-links { display: flex; animation: nb-in .2s cubic-bezier(.2, .7, .2, 1); }
.nb.has-js.is-compact .nb-link { height: 40px; padding: 0 12px; font-size: 14px; color: var(--text-2); }
.nb.has-js.is-compact .nb-link::after { left: 12px; right: auto; width: 24px; bottom: 7px; }
.nb.has-js.is-compact .nb-link:hover { background: var(--hover); }
.nb.has-js.is-compact .nb-link + .nb-link { box-shadow: 0 -1px 0 var(--line); }      /* a hairline between rows */
/* V4 W9: the pages that run no script (privacy, terms, feedback, the 404) wear the same bar. Where the links do not fit (860 px and
   narrower) a <details> holds them in the same card; the row of links shows above that (site/tools/sitebar.py) */
.nb-sm { display: none; position: static; }
.nb-sm > summary { list-style: none; }
.nb-sm > summary::-webkit-details-marker { display: none; }
.nb-sm > summary.nb-menu { display: inline-flex; }
.nb-sm .nb-card { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 232px; box-sizing: border-box; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 6px; border-radius: 12px; background: var(--chrome); border: 1px solid var(--node-line); box-shadow: var(--shadow-pop); }
.nb-sm[open] .nb-card { display: flex; animation: nb-in .2s cubic-bezier(.2, .7, .2, 1); }
.nb-sm[open] > summary.nb-menu { color: var(--hl); background: var(--hl-soft); border-color: var(--hl-line); }
.nb-sm .nb-link { height: 40px; padding: 0 12px; font-size: 14px; color: var(--text-2); }
.nb-sm .nb-link::after { left: 12px; right: auto; width: 24px; bottom: 7px; }
.nb-sm .nb-link:hover { background: var(--hover); }
.nb-sm .nb-link + .nb-link { box-shadow: 0 -1px 0 var(--line); }
@media (max-width: 860px) { .nb-static .nb-row { display: none; } .nb-static .nb-sm { display: block; } }
/* wide screens: the menu's card hangs under the Menu button, not under Open Silkscreen */
@media (min-width: 641px) { .nb.has-js.is-compact .nb-links { right: auto; left: 0; } }
/* phones: the capsule spans the screen; the logo keeps its name, Menu is an icon, the button drops "/app" (and its second word
   below 360 px; it keeps "Open Silkscreen" as its name) */
/* V4 W3: a phone on its side (about 750 px) has no room for the word Menu beside Open Silkscreen: the icon alone, as on a portrait phone */
@media (max-width: 800px) {
  .nb-menu .nb-menu-l { display: none; }
  .nb.has-js.is-compact .nb-menu, .nb-sm > summary.nb-menu { width: 38px; padding: 0; justify-content: center; border-color: var(--node-line); }
}
@media (max-width: 640px) {
  header.nb-head { padding: 8px; }
  .nb { width: 100%; gap: 8px; padding: 0 5px 0 12px; }
  .nb-home { flex-grow: 1; min-width: 0; }
  .nb-menu .nb-menu-l, .nb-a, .nb-vd { display: none; }
  .nb.has-js.is-compact .nb-menu { width: 38px; padding: 0; justify-content: center; border-color: var(--node-line); }
  .nb.has-js.is-compact .nb-links, .nb-sm .nb-card { left: 0; right: 0; min-width: 0; }
  .nb.has-js.is-compact .nb-link, .nb-sm .nb-link { height: 48px; font-size: 16px; }
  .nb-port { margin-left: 14px; padding: 0 12px 0 14px; }
  .nb-w { left: -17px; width: 13px; }
  .nb:not(.has-js) { height: auto; min-height: 44px; flex-wrap: wrap; padding-top: 5px; padding-bottom: 5px; }
  .nb:not(.has-js) .nb-links { order: 3; width: 100%; overflow-x: auto; }
}
@media (max-width: 359px) { .nb-lx { display: none; } .nb-home .ss-wordmark { font-size: 15px !important; } }
@media (pointer: coarse) {
  header.nb-head { height: 64px; }
  .nb { height: 48px; }
  .nb-menu, .nb-port { height: 38px; }
  .nb.has-js.is-compact .nb-menu { width: 40px; }
  .nb-menu, .nb-port { position: relative; }
  .nb-menu::after, .nb-port::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }      /* 44 px to the touch */
}
/* the hero's buttons and the closing pair (topbar_buttons): Open Silkscreen's family, quieter. Node cards, 8 px corners, a thin
   border; the main one (ss-btn-primary, which landing.js swaps on phones) is edged in copper with a copper icon. On hover both
   take the bar's copper border and the arrow steps forward */
.ss-btn.hb { height: 40px; padding: 0 16px 0 14px; gap: 9px; border-radius: 8px; font-size: 14px; font-weight: 500; filter: none; transition: border-color .2s, background-color .2s, color .2s, box-shadow .2s; }
.ss-btn.hb .ss-icon { flex-shrink: 0; transition: color .2s, transform .2s; }
.ss-btn.hb.ss-btn-primary { background: var(--hl); color: #0B1316; border-color: var(--hl); font-weight: 600; }      /* SR3: filled */
.ss-btn.hb.ss-btn-primary .ss-icon { color: #0B1316; }
.ss-btn.hb.ss-btn-secondary { background: transparent; color: var(--text-2); border-color: #2A3C45; }      /* outlined */
.ss-btn.hb.ss-btn-secondary .ss-icon { color: var(--muted); }
.ss-btn.hb:hover { background: var(--hover); color: var(--text); border-color: var(--port); filter: none; }
.ss-btn.hb.ss-btn-primary:hover { box-shadow: 0 0 0 3px var(--hl-soft); background: var(--hl); color: #0B1316; }
.ss-btn.hb:hover .ss-icon { color: var(--hl); }
.ss-btn.hb.ss-btn-primary:hover .ss-icon { transform: translateX(2px); }
.ss-btn.hb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .ss-btn.hb { height: 44px; } }
@media (prefers-reduced-motion: reduce) { .ss-btn.hb .ss-icon { transition: none; } .ss-btn.hb[href="/app/"]:hover .ss-icon { transform: none; } }
@media (prefers-reduced-motion: reduce) { .nb.has-js.is-compact.is-open .nb-links { animation: none; } .nb-port:hover .nb-s { animation: none; } .nb-link::after, header.nb-head::before { transition: none; } }
