/* Phos app bar — part of the Phos UI system v1 (website/diffused/ui). One top bar for the landing, editor Home and editor.
   Full-width, flush to the top, blurred black (after cinetraits.com's menu bar), in Phos colours:
   Blackout bar, Diffusion/zinc text, Key only on the badge, the plan pill and hover of the main action.
   A hairline at the bottom edge catches a soft Key light under the link you point at.
   Copies: website/diffused/appbar/appbar.css (source) → apps/editor-prototype/app/assets/appbar.css */

.pab {
  --pab-h: 64px;
  --pab-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --pab-ink: #FFFFFF;
  --pab-sub: #A1A1AA;
  --pab-faint: #71717A;
  --pab-key: #FF5A1F;
  --lx: 50%; --lo: 0;
  position: sticky; top: 0; z-index: 40; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  box-sizing: border-box; width: 100%; height: var(--pab-h); margin: 0; padding: 0 20px;
  background: radial-gradient(120px 22px at var(--lx) 100%, rgba(255, 90, 31, calc(0.16 * var(--lo))), rgba(255, 90, 31, 0) 100%) left bottom / 100% 22px no-repeat, rgba(10, 10, 11, 0.8);
  transition: --lo .3s var(--pab-ease);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--pab-ink); font-family: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1;
}
/* the light on the bottom edge: rests off, follows the link under the pointer on x */
.pab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: radial-gradient(160px 1px at var(--lx) 50%, rgba(255, 140, 80, 0.95), rgba(255, 90, 31, 0.45) 45%, rgba(255, 90, 31, 0) 100%);
  opacity: var(--lo); transition: opacity .3s var(--pab-ease);
}
/* the bar's blur lives on ::before, so menus inside the bar (More, the account menu) can blur the page behind them;
   a backdrop-filter on .pab itself would stop theirs at the bar. The soft glow under the pointed item is a background layer. */
@property --lo { syntax: "<number>"; inherits: true; initial-value: 0; }
.pab::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  -webkit-backdrop-filter: blur(40px) saturate(1.2); backdrop-filter: blur(40px) saturate(1.2);
}
.pab *, .pab *::before, .pab *::after, .pab-sheet, .pab-sheet *, .pab-menu, .pab-menu * { box-sizing: border-box; }
.pab :focus-visible { outline: 2px solid var(--pab-key); outline-offset: 2px; }
.pab button { font: inherit; color: inherit; }

/* ── Left: mark + wordmark + badge */
.pab-l { display: flex; align-items: center; gap: 10px; min-width: 0; justify-self: start; }
.pab-brand { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 6px; margin-left: -6px; border: 0; border-radius: 999px; background: transparent; color: var(--pab-ink); text-decoration: none; cursor: pointer; flex: none; transition: background-color .2s var(--pab-ease), transform .16s var(--pab-ease); }
.pab-brand svg { width: 24px; height: 24px; flex: none; }
.pab-brand:active { transform: scale(0.97); }
.pab-word { font-size: 22px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.pab-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; flex: none;
  font: 600 9.5px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--pab-key); background: rgba(255, 90, 31, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.28); }
.pab-sep { width: 1px; height: 18px; margin: 0 4px; background: rgba(255, 255, 255, 0.12); flex: none; }
/* 05 · the product name after a hairline, in Geist Mono (no badge) */
.pab-label { font: 400 11px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pab-sub); white-space: nowrap; flex: none; }

/* ── Centre: icon + label links */
.pab-nav { display: flex; align-items: center; gap: 2px; justify-self: center; min-width: 0; }
.pab-link { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--pab-sub); font-size: 14px; font-weight: 500; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color .2s var(--pab-ease), background-color .2s var(--pab-ease); }
.pab-link svg { width: 15px; height: 15px; flex: none; opacity: 0.9; }
.pab-link .pab-lock { width: 11px; height: 11px; opacity: 0.7; margin-left: -2px; }
.pab-link .pab-count { font: 400 10.5px/1 "Geist Mono", ui-monospace, monospace; color: var(--pab-faint); margin-left: 1px; }
.pab-link[aria-current="page"], .pab-link[aria-expanded="true"] { color: var(--pab-ink); background: rgba(255, 255, 255, 0.08); }
.pab-link .pab-chev { width: 12px; height: 12px; margin-left: -1px; opacity: 0.8; transition: transform .2s var(--pab-ease); }
.pab-link[aria-expanded="true"] .pab-chev { transform: rotate(180deg); }
.pab-nav .pab-sep { margin: 0 6px; }

/* ── Right: plan pill, search pill, icon buttons, main action */
.pab-r { display: flex; align-items: center; justify-content: flex-end; gap: 8px; justify-self: end; min-width: 0; }
.pab-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; flex: none;
  background: rgba(255, 90, 31, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.3); color: var(--pab-key);
  font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--pab-ease), box-shadow .2s var(--pab-ease), transform .16s var(--pab-ease); }
.pab-pill svg { width: 13px; height: 13px; flex: none; }
.pab-pill.is-static { cursor: default; }
.pab-pill:active:not(.is-static) { transform: scale(0.97); }
.pab-search { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; flex: none;
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #D4D4D8; font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background-color .2s var(--pab-ease), box-shadow .2s var(--pab-ease), color .2s var(--pab-ease); }
.pab-search svg { width: 14px; height: 14px; flex: none; }
/* 05 · ⌘K as plain mono text: no box inside the pill */
.pab-kbd { font: 400 10.5px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.04em; color: var(--pab-faint); }
.pab-icon { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; flex: none;
  background: transparent; color: var(--pab-sub); cursor: pointer; transition: color .2s var(--pab-ease), background-color .2s var(--pab-ease); }
.pab-icon svg { width: 17px; height: 17px; }
.pab-icon .pab-num { position: absolute; top: 3px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: #27272A; color: #fff; font: 500 9.5px/15px "Geist Mono", ui-monospace, monospace; text-align: center; }
/* 03 · the main action is the primary button: Frost glass (class pu-glass in markup) that turns Key on hover */
.pab-cta { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; flex: none; --pu-rim-r: 90px;
  color: var(--pab-ink);
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--pab-ease), color .2s var(--pab-ease), box-shadow .2s var(--pab-ease), transform .16s var(--pab-ease); }
.pab-cta svg { width: 15px; height: 15px; flex: none; }
.pab-cta:active { transform: scale(0.97); background: var(--pab-key); color: #0A0A0B; }
.pab-ghost { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 0; border-radius: 999px; flex: none; background: transparent; color: var(--pab-sub); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .2s var(--pab-ease), background-color .2s var(--pab-ease); }
.pab-ghost svg { width: 15px; height: 15px; }
.pab-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; flex: none; overflow: hidden;
  background: #1F1F22; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: 0; text-align: center; font-variant-numeric: tabular-nums; cursor: pointer; }
.pab-status { font: 400 10.5px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pab-faint); white-space: nowrap; }
.pab-burger { display: none; }
.pab-show-sm, .pab-show-lg { display: none; }

@media (hover: hover) and (pointer: fine) {
  .pab-link:hover, .pab-ghost:hover { color: var(--pab-ink); background: rgba(255, 255, 255, 0.05); }
  .pab-pill:not(.is-static):hover { background: rgba(255, 90, 31, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.5); }
  .pab-search:hover { background: rgba(255, 255, 255, 0.07); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
  .pab-icon:hover { color: var(--pab-ink); background: rgba(255, 255, 255, 0.06); }
  /* the main action turns Key only while hovered */
  .pab-cta:hover { background: var(--pab-key); color: #0A0A0B; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
  .pab-avatar:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
}

/* ── Dropdown (More) */
.pab-dd { position: relative; display: inline-flex; }
.pab-menu { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 50; min-width: 264px; padding: 12px; border-radius: 24px;
  background: rgba(32, 32, 36, 0.46); -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 22px 44px -24px rgba(0, 0, 0, 0.9);
  transform: translateX(-50%); transform-origin: top center; animation: pabIn .18s var(--pab-ease) both; }
.pab-menu[hidden] { display: none; }
.pab-menu.is-right { left: auto; right: 0; transform: none; transform-origin: top right; animation-name: pabInR; }
@keyframes pabIn { from { opacity: 0; transform: translateX(-50%) translateY(-4px) scale(0.98); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes pabInR { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.pab-mh { padding: 10px 10px 6px; font: 400 10px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pab-faint); }
.pab-mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent;
  color: #D4D4D8; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; transition: color .15s var(--pab-ease), background-color .15s var(--pab-ease); }
.pab-mi svg { width: 15px; height: 15px; flex: none; color: var(--pab-sub); }
.pab-mi > span:first-of-type { flex: 1; min-width: 0; }
.pab-mi .pab-mi-meta { flex: none; font: 400 10.5px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.06em; color: var(--pab-faint); }
.pab-mi.is-feature { margin-bottom: 4px; color: #fff; background: rgba(255, 90, 31, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.22); }
.pab-mi.is-feature svg { color: var(--pab-key); }
.pab-msep { height: 1px; margin: 6px 4px; background: rgba(255, 255, 255, 0.07); }
.pab-mi:focus-visible { outline: 0; background: rgba(255, 255, 255, 0.07); color: #fff; }
@media (hover: hover) and (pointer: fine) { .pab-mi:hover { background: rgba(255, 255, 255, 0.06); color: #fff; } .pab-mi.is-feature:hover { background: rgba(255, 90, 31, 0.14); } }

/* ── Phone menu sheet */
.pab-sheet { position: fixed; top: var(--pab-h); left: 0; right: 0; z-index: 39; max-height: calc(100dvh - var(--pab-h)); overflow-y: auto; padding: 8px 12px 16px;
  background: rgba(10, 10, 11, 0.86); -webkit-backdrop-filter: blur(40px) saturate(1.2); backdrop-filter: blur(40px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-family: Geist, ui-sans-serif, system-ui, sans-serif; animation: pabSheet .22s var(--pab-ease) both; }
.pab-sheet[hidden] { display: none; }
@keyframes pabSheet { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pab-sheet .pab-mi { min-height: 52px; font-size: 16px; border-radius: 12px; }
.pab-sheet .pab-mi[aria-current="page"] { background: rgba(255, 255, 255, 0.06); color: #fff; }
.pab-sheet .pab-mi + .pab-mi { margin-top: 2px; }
.pab-sheet .pab-cta { width: 100%; justify-content: center; height: 48px; margin-top: 10px; font-size: 15px; }

/* ── Sizes */
@media (max-width: 1180px) {
  .pab-link .pab-count { display: none; }
  .pab-search .pab-search-l { display: none; }
  .pab-hide-lg { display: none !important; }
  .pab-show-lg { display: inline !important; }
  .pab-search { padding: 0 6px 0 10px; }
}
@media (max-width: 1023px) {
  .pab { gap: 10px; padding: 0 14px; }
  .pab-link { padding: 0 8px; }
  .pab-link svg { display: none; }
  .pab-link .pab-chev { display: inline; }
  .pab-hide-md { display: none !important; }
}
@media (max-width: 760px) {
  .pab { --pab-h: 56px; grid-template-columns: minmax(0, 1fr) auto; padding: 0 8px 0 12px; }
  .pab-nav { display: none; }
  .pab-word { font-size: 21px; }
  .pab-hide-sm { display: none !important; }
  .pab-show-sm { display: inline !important; }
  .pab-burger { display: inline-grid; width: 40px; height: 40px; }
  .pab-burger svg { width: 18px; height: 18px; }
  .pab-cta { height: 40px; padding: 0 14px; }
  .pab-pill, .pab-search { height: 36px; }
  .pab-search { width: 36px; padding: 0; justify-content: center; }
  .pab-search .pab-kbd { display: none; }
}
@media (min-width: 761px) { .pab-sheet { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .pab, .pab *, .pab-menu, .pab-sheet { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .pab, .pab-menu, .pab-sheet { background: #0A0A0B; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .pab::before { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .pab { border-bottom-color: rgba(255, 255, 255, 0.5); }
  .pab-link, .pab-ghost, .pab-icon { color: #E4E4E7; }
}
