/* Product navigator — Products room on the Biome home page ("the bay").
   Base (no JS): a readable grid of full product cards, each with its LED glyph. `.pn-js` (product-nav.mjs):
   compact tiles that expand in place, favourites, chips, search, glyph animations, the per-block wave.

   Direction (2026-10-05): an instrument bay of dot-matrix LED glyphs. Neutral ink surfaces, one signal colour
   (Hartii red, --pn-hot), functional colours for status only. No per-product tints, no stock icons. The
   signature moment: every new Quai block sends a light wave through the bay (product-nav.mjs). */

.pn {
  --pn-ink: #0A0708;
  --pn-card: #110D0F;
  --pn-card-hi: #161114;
  --pn-glass: #050304;
  --pn-edge: rgba(255, 255, 255, .065);
  --pn-edge-2: rgba(255, 255, 255, .12);
  --led: #F6ECE8;
  --pn-hot: var(--red-hi, #FF4E60);
  --pn-red: var(--red, #E5243B);
  --pn-fav: #FFC23D;
  --sx: -999px; --sy: -999px;
  position: relative; isolation: isolate;
  border: 1px solid var(--pn-edge); border-radius: 22px; padding: clamp(14px, 2.2vw, 22px);
  background:
    radial-gradient(90% 60% at 50% -10%, rgba(229, 36, 59, .10), transparent 60%),
    var(--pn-ink);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .045);
  overflow: hidden;
}
/* LED field behind the bay (canvas drawn by product-nav.mjs; absent without JS) */
.pn-field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* Specificity beats editorial.css's `.biome-home .scene` two-column split and its giant room h2: the
   navigator needs the full width, and the heading is a label here, not a hero. */
.biome-home .scene.products-scene, .scene.products-scene { grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 1140px; width: 100%; }
.biome-home .products-scene .room-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 40px; align-items: end; }
.biome-home .products-scene .room-copy .room-kicker { grid-column: 1 / -1; }
.biome-home .products-scene .room-copy h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1; letter-spacing: -.04em; margin-top: 6px; }
.biome-home .products-scene .room-copy .lede { margin-top: 0; max-width: 54ch; font-size: 15px; }
@media (max-width: 820px) {
  .biome-home .products-scene .room-copy { grid-template-columns: minmax(0, 1fr); }
  .biome-home .products-scene .room-copy .lede { margin-top: 10px; }
}

/* The fixed room HUD (arrows + room tabs) floats over the bottom of the viewport: leave it clear. */
.biome-home .scene.products-scene { padding-bottom: 104px; }

/* ------------------------------------------------------------- toolbar */
.pn-toolbar { display: grid; gap: 12px; margin-bottom: 16px; }
.pn-toolbar[hidden] { display: none; }
.pn-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.pn-readout { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0;
  font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.pn-block { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); }
.pn-block::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); }
.pn-block.is-live::before { background: var(--pn-hot); box-shadow: 0 0 10px var(--pn-hot); }
.pn-block b { font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; letter-spacing: .04em; transition: color .6s, text-shadow .6s; }
.pn-block.is-tick b { color: var(--pn-hot); text-shadow: 0 0 12px rgba(255, 78, 96, .7); transition: none; }
.pn-search { position: relative; flex: 1 1 260px; max-width: 360px; }
.pn-search input {
  width: 100%; height: 40px; padding: 0 40px 0 38px; border-radius: 12px;
  border: 1px solid var(--pn-edge-2); background: var(--pn-glass); color: var(--fg);
  font: 400 14.5px/1 var(--body); outline: none; transition: border-color .15s, box-shadow .15s;
}
.pn-search input::placeholder { color: var(--fg-3); }
.pn-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } /* Escape clears; the "/" hint keeps its spot */
.pn-search input:focus { border-color: var(--pn-hot); box-shadow: 0 0 0 3px rgba(255, 78, 96, .16); }
.pn-search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
  stroke: var(--fg-3); fill: none; stroke-width: 1.8; pointer-events: none; }
.pn-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font: 500 11px/1 var(--mono); color: var(--fg-3); border: 1px solid var(--pn-edge-2); border-radius: 6px; padding: 4px 6px; }
.pn-chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pn-chips::-webkit-scrollbar { display: none; }
.pn-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--pn-edge-2); background: transparent;
  color: var(--fg-2); font: 500 13px/1 var(--body); cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.pn-chip:hover { color: var(--fg); border-color: rgba(255, 255, 255, .28); }
.pn-chip[aria-pressed="true"] { color: #120a0c; background: var(--fg); border-color: var(--fg); }
.pn-chip-n { font: 600 11px/1 var(--mono); opacity: .65; font-variant-numeric: tabular-nums; }
.pn-chip .pn-chip-star { width: 13px; height: 13px; fill: currentColor; }
.pn-count { font: 500 11px/1 var(--mono); letter-spacing: .06em; color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- grid */
.pn-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pn-item { position: relative; min-width: 0; scroll-margin: 90px 0 120px; } /* scrollIntoView clears the header and the room HUD */
.pn-item[hidden] { display: none; }
/* Every card is an LED panel: a dot bed at the glyph's own pitch (--pp), aligned so the glyph's lit cells sit
   exactly on bed dots. --pad is the card padding = where the glyph (and therefore the bed grid) starts. */
.pn-card {
  --pp: 6px; --pad: 16px;
  --bed: radial-gradient(circle at center, rgba(255, 236, 230, .075) 0 .9px, transparent 1.25px);
  --bed-hot: radial-gradient(circle at center, rgba(255, 78, 96, .95) 0 1.5px, transparent 1.9px);
  position: relative; height: 100%; border-radius: 16px; padding: var(--pad);
  border: 1px solid var(--pn-edge);
  background: var(--bed) var(--pad) var(--pad) / var(--pp) var(--pp), var(--pn-card);
  transition: border-color .25s, background-color .25s, transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
/* red LEDs of the bed: lit around the pointer (mask follows --sx/--sy) */
.pn-bedglow, .pn-wavebed {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: var(--bed-hot) var(--pad) var(--pad) / var(--pp) var(--pp);
  opacity: 0;
}
.pn-bedglow {
  -webkit-mask: radial-gradient(130px circle at var(--sx) var(--sy), #000, rgba(0, 0, 0, .35) 40%, transparent 72%);
  mask: radial-gradient(130px circle at var(--sx) var(--sy), #000, rgba(0, 0, 0, .35) 40%, transparent 72%);
  transition: opacity .35s;
}
.pn.is-lit .pn-bedglow { opacity: .55; }
.pn-wavebed { -webkit-mask: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .55) 45%, transparent 82%); mask: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .55) 45%, transparent 82%); }
.pn-tile, .pn-detail { position: relative; z-index: 1; }
/* Pointer light: a soft red rim that follows the cursor across the whole bay (--sx/--sy are set per card by
   product-nav.mjs from one pointer position, so neighbouring rims light together like one lamp). */
.pn-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(240px circle at var(--sx) var(--sy), rgba(255, 78, 96, .75), rgba(255, 78, 96, .12) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.pn-card::after { /* the block wave's rim; product-nav.mjs staggers it per tile by distance */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 78, 96, .55), 0 0 24px -6px rgba(255, 78, 96, .5);
}
.pn.is-lit .pn-card::before { opacity: 1; }
.pn-wave .pn-item:not([hidden]) .pn-card::after,
.pn-wave .pn-item:not([hidden]) .pn-wavebed { animation: pn-wave 1.1s cubic-bezier(.2, .8, .2, 1) var(--wd, 0ms) both; }
.pn-wave .pn-item:not([hidden]) .pn-led { animation: pn-wave-led 1.1s ease-out var(--wd, 0ms) both; }
@keyframes pn-wave { 0% { opacity: 0; } 16% { opacity: .38; } 100% { opacity: 0; } }
@keyframes pn-wave-led { 0%, 100% { filter: var(--pn-led-glow); } 20% { filter: brightness(1.45) drop-shadow(0 0 4px rgba(255, 78, 96, .8)); } }

.pn-tile {
  all: unset; box-sizing: border-box; display: grid; grid-template-columns: auto 1fr; align-items: center;
  column-gap: 14px; row-gap: 4px; width: 100%; cursor: default; padding-right: 30px;
}
/* The glyph sits directly on the card's LED bed: 13 cells at the card pitch, top-left at the padding. */
.pn-icon { grid-row: span 2; align-self: start; display: block; width: calc(var(--pp) * 13); height: calc(var(--pp) * 13); }
.pn-led { --pn-led-glow: drop-shadow(0 0 2px rgba(255, 150, 150, .4)); width: 100%; height: 100%; display: block; overflow: visible; filter: var(--pn-led-glow); }
.pn-led-bed { display: none; } /* the card's own bed replaces the glyph's backdrop */
.pn-led circle { transition: opacity .2s; }
.pn-led .d { fill: var(--led); opacity: .26; }
.pn-led .o { fill: var(--led); opacity: .86; }
.pn-led .h { fill: var(--pn-hot); }
.pn-led .g { fill: var(--ok, #4ADE80); filter: drop-shadow(0 0 1.6px rgba(74, 222, 128, .75)); } /* HartiiLabs only */

.pn-name { font: 600 16px/1.2 var(--display); color: var(--fg); letter-spacing: -.01em; }
.pn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 500 10.5px/1 var(--mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.pn-status { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); font-size: 10.5px; }
.pn-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pn-status.is-live::before { background: var(--ok); box-shadow: 0 0 8px rgba(74, 222, 128, .8); }
.pn-status.is-beta::before { background: var(--warn); box-shadow: 0 0 8px rgba(255, 176, 32, .7); }
.pn-status.is-beta { color: var(--warn); }

.pn-detail { margin-top: 14px; display: grid; gap: 12px; }
.pn-desc { margin: 0; font: 400 14.5px/1.55 var(--body); color: var(--fg-2); text-align: left; max-width: 62ch; }
.pn-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.pn-points li { position: relative; padding-left: 18px; font: 400 13.5px/1.5 var(--body); color: var(--fg-2); }
.pn-points li::before { content: ''; position: absolute; left: 3px; top: .58em; width: 5px; height: 5px; border-radius: 50%;
  background: var(--led); box-shadow: 0 0 6px rgba(255, 200, 200, .55); }
.pn-fee { margin: 0; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
  padding: 11px 13px; border-radius: 10px; background: var(--pn-glass); border: 1px solid var(--pn-edge);
  font: 500 12.5px/1.5 var(--mono); color: var(--fg); font-variant-numeric: tabular-nums; }
.pn-fee b { font: 600 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--pn-hot); }
.pn-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pn-open, .pn-docs, .pn-close {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px;
  font: 600 13.5px/1 var(--body); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.pn-open { color: #fff; background: var(--pn-red); border: 1px solid var(--pn-red);
  box-shadow: 0 10px 26px -12px rgba(229, 36, 59, .9), inset 0 1px 0 rgba(255, 255, 255, .18); }
.pn-open:hover { background: #F0283F; transform: translateY(-1px); }
.pn-docs { color: var(--fg); border: 1px solid var(--pn-edge-2); background: transparent; }
.pn-docs:hover { border-color: rgba(255, 255, 255, .35); }
.pn-close { display: none; }
.pn-empty { margin: 16px 0 4px; padding: 22px; text-align: center; border-radius: 14px; border: 1px dashed var(--pn-edge-2);
  font: 400 14px/1.5 var(--body); color: var(--fg-2); }
.pn-empty[hidden] { display: none; }

/* star (injected by JS) */
.pn-star {
  all: unset; box-sizing: border-box; position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; z-index: 1;
  display: grid; place-items: center; border-radius: 10px; cursor: pointer; color: var(--fg-3);
  transition: color .15s, background .15s;
}
.pn-star svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.pn-star:hover { color: var(--fg); background: rgba(255, 255, 255, .06); }
.pn-star[aria-pressed="true"] { color: var(--pn-fav); }
.pn-star[aria-pressed="true"] svg { fill: currentColor; filter: drop-shadow(0 0 6px rgba(255, 194, 61, .6)); }
.pn-item:has(.pn-tile:focus-visible) .pn-card { outline: 2px solid var(--pn-hot); outline-offset: 2px; }
.pn-tile:focus-visible { outline: none; }
.pn-search input:focus-visible { outline: none; }
.pn-star:focus-visible, .pn-chip:focus-visible, .pn-open:focus-visible, .pn-docs:focus-visible, .pn-close:focus-visible {
  outline: 2px solid var(--pn-hot); outline-offset: 2px; }
.pn-live, .pn .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------- JS mode */
.pn-js .pn-grid { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); grid-auto-flow: row dense; grid-auto-rows: minmax(152px, auto); }
.pn-js .pn-card { --pad: 14px; cursor: pointer; }
.pn-js .pn-tile { cursor: pointer; grid-template-columns: 1fr; row-gap: 6px; padding-right: 0; }
.pn-js .pn-icon { grid-row: auto; margin-bottom: 6px; }
.pn-js .pn-name { font-size: 15.5px; padding-right: 26px; }
.pn-js .pn-detail { display: none; }
.pn-js .pn-item:not(.is-open) .pn-card:hover { transform: translateY(-3px); background-color: var(--pn-card-hi); border-color: var(--pn-edge-2);
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .9); }
.pn-js .pn-item.is-playing .pn-led .o { opacity: 1; }
.pn-js .pn-item.is-playing .pn-led { --pn-led-glow: drop-shadow(0 0 2.6px rgba(255, 120, 130, .6)); }
.pn-js .pn-item.is-fav .pn-card { border-color: rgba(255, 194, 61, .26); }

/* boot sweep: LEDs power on in a diagonal wave the first time the bay comes into view */
.pn-boot .pn-led-live circle { animation: pn-boot .55s cubic-bezier(.2, .8, .2, 1) var(--bd, 0ms) both; }
.pn-boot .pn-led-bed { animation: pn-bed .8s ease-out var(--bb, 0ms) both; }
@keyframes pn-boot { 0% { opacity: 0; } 45% { opacity: 1; filter: brightness(2); } 100% { } }
@keyframes pn-bed { from { opacity: 0; } }

/* expanded tile: spans two columns and grows; the glyph becomes a large display that keeps playing */
.pn-js .pn-item.is-open { grid-column: span 2; grid-row: span 2; }
.pn-js .pn-item.is-open .pn-card { cursor: default;
  background: var(--bed) var(--pad) var(--pad) / var(--pp) var(--pp), linear-gradient(180deg, #170F12, var(--pn-card) 55%);
  border-color: rgba(255, 78, 96, .42);
  box-shadow: 0 0 0 1px rgba(255, 78, 96, .12), 0 30px 70px -36px rgba(229, 36, 59, .55); }
.pn-js .pn-item.is-open .pn-card { --pp: 8px; --pad: 18px; }
.pn-js .pn-item.is-open .pn-tile { grid-template-columns: auto 1fr; column-gap: 20px; align-items: end; }
.pn-js .pn-item.is-open .pn-icon { grid-row: span 2; margin-bottom: 0; }
.pn-js .pn-item.is-open .pn-led { --pn-led-glow: drop-shadow(0 0 3px rgba(255, 130, 140, .55)); }
.pn-js .pn-item.is-open .pn-name { font-size: 24px; align-self: end; }
.pn-js .pn-item.is-open .pn-meta { align-self: start; }
.pn-js .pn-item.is-open .pn-detail { display: grid; }
.pn-js .pn-item.is-open .pn-close { display: inline-flex; color: var(--fg-2); border: 1px solid transparent; background: none; }
.pn-js .pn-item.is-open .pn-close:hover { color: var(--fg); border-color: var(--pn-edge-2); }

@media (max-width: 640px) {
  .pn { border-radius: 18px; }
  .pn-grid, .pn-js .pn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pn-js .pn-grid { grid-auto-rows: minmax(136px, auto); }
  .pn-card, .pn-js .pn-card { --pp: 5px; --pad: 12px; }
  .pn-js .pn-item.is-open { grid-column: 1 / -1; grid-row: auto; }
  .pn-js .pn-item.is-open .pn-card { --pp: 7px; --pad: 14px; }
  .pn-search { max-width: none; }
  .pn-js .pn-item:not(.is-open) .pn-cat { display: none; } /* the chips already say the category; keeps tiles one line of meta */
  .pn-chips { -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); padding-right: 24px; }
  .pn-open { flex: 1 1 100%; justify-content: center; }
  .pn-js .pn-item.is-open .pn-docs, .pn-js .pn-item.is-open .pn-close { flex: 1 1 0; justify-content: center; }
  .pn-search kbd { display: none; }
  .pn-readout { font-size: 10px; gap: 4px 10px; }
}
@media (max-width: 380px) { .pn-js .pn-name { font-size: 14.5px; } }
@media (prefers-reduced-motion: reduce) {
  .pn-card, .pn-icon, .pn-led circle { transition: none; }
  .pn-boot .pn-led-live circle, .pn-boot .pn-led-bed, .pn-wave .pn-item .pn-card::after, .pn-wave .pn-item .pn-led { animation: none; }
}

/* Task-first launcher ("What do you want to do?"): typography and numbering only, no icons, no tinted surfaces.
   Red is the signal on the number and the hover edge; beta is a small mono tag, not a colour wash. */
.pn-tasks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--pn-edge, rgba(255,255,255,.065)); border-radius: 16px; overflow: hidden; background: #0A0708; }
.pn-tasks li { min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pn-tasks li:nth-child(3n) { border-right: 0; } .pn-tasks li:nth-last-child(-n+3) { border-bottom: 0; }
.pn-task { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px; min-height: 84px; padding: 16px 18px; text-decoration: none; color: var(--fg); transition: background .18s; }
.pn-task:hover, .pn-task:focus-visible { background: rgba(255, 255, 255, .035); }
.pn-task:focus-visible { outline: 2px solid var(--red-hi, #FF4E60); outline-offset: -2px; }
.pn-task-n { padding-top: 5px; font: 600 12px/1 var(--mono); color: var(--red-hi, #FF4E60); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.pn-task-body { display: grid; gap: 4px; min-width: 0; }
.pn-task-body b { font: 600 17px/1.2 var(--display); letter-spacing: -.01em; }
.pn-task-body span { font-size: 12.5px; line-height: 1.45; color: var(--fg-2); }
.pn-task-beta { font: 500 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); border: 1px solid var(--line-2, rgba(255,255,255,.14)); border-radius: 3px; padding: 2px 4px; margin-left: 6px; vertical-align: 2px; font-style: normal; }
.pn-task-go { padding-top: 3px; font: 400 16px/1 var(--mono); color: var(--fg-3); transition: color .18s, transform .18s; }
.pn-task:hover .pn-task-go { color: var(--red-hi, #FF4E60); transform: translateX(2px); }
@media (max-width: 900px) { .pn-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pn-tasks li:nth-child(3n) { border-right: 1px solid var(--line); } .pn-tasks li:nth-child(2n) { border-right: 0; } .pn-tasks li:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); } .pn-tasks li:nth-last-child(-n+2) { border-bottom: 0; } }
@media (max-width: 560px) { .pn-tasks { grid-template-columns: minmax(0, 1fr); } .pn-tasks li, .pn-tasks li:nth-child(n) { border-right: 0; border-bottom: 1px solid var(--line); } .pn-tasks li:last-child { border-bottom: 0; } .pn-task { min-height: 72px; padding: 14px 16px; } }
@media (prefers-reduced-motion: reduce) { .pn-task, .pn-task-go { transition: none; } }
