/* The path board (path-board.js), scoped under .pb so it never touches the classic screen.
   Ported from the concept page on spike/path-board (prototypes/path-board.html). Light is the
   default; night follows the app's own setting (body without .light-mode). Keyframes carry a
   pb- prefix. */
.pb { position: fixed; inset: 0; z-index: 1500; }
#gameScreen.pb-on > .game-container { display: none; }
body.pb-board .mobile-backdrop { display: none !important; }

.pb { --paper: #f1f1ee; --surface: #fff; --ink: #111315; --muted: #52525b; --line: #d5d8dc; --wire: #b9bec5; --grid: #1113150b; --blue: #2563eb; --blue-text: #1d4ed8; --blue-wash: #eaf1ff; --settled: #1d4ed8; --amber: #b45309; --alert: #b45309; --cat-team: #15803d; --cat-client: #2563eb; --cat-policy: #b45309; --cat-work: #7c3aed; --shadow: 0 1px 2px #11131512, 0 12px 32px #11131512; --sans: Inter, system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace; --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.3, 1.4, .5, 1); }
.pb *, .pb *::before, .pb *::after { box-sizing: border-box; }
.pb { display: flex; flex-direction: column; margin: 0; overflow: hidden; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--sans); }
.pb button { font: inherit; color: inherit; cursor: pointer; }
.pb [hidden] { display: none !important; }
.pb h1, .pb h2, .pb h3, .pb p { margin: 0; }
.pb :focus-visible { outline: 2px solid var(--blue-text); outline-offset: 3px; }
.pb .label { color: var(--muted); font: 600 11px/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.pb { --site-bg: #111315; --site-ink: #f1f1ee; --site-dim: #a1a1aa; --site-h: 40px; }
.pb .site { position: relative; z-index: 25; flex: none; display: flex; align-items: center; gap: 28px; height: var(--site-h); padding: 0 24px; background: var(--site-bg); color: var(--site-ink); border-bottom: 1px solid color-mix(in srgb, var(--site-ink) 12%, transparent); transition: transform .35s var(--ease), visibility .35s, box-shadow .35s; }
.pb .site a { color: inherit; text-decoration: none; }
.pb .site-mark { display: inline-flex; align-items: center; gap: 9px; font: 700 12px/1 var(--mono); letter-spacing: .02em; white-space: nowrap; }
.pb .site-mark svg { display: block; width: 20px; height: 20px; flex: none; }
.pb .site-nav { display: flex; align-items: center; gap: 22px; height: 100%; margin-right: auto; }
.pb .site-nav a, .pb .site-actions a { display: inline-flex; align-items: center; height: 100%; color: var(--site-dim); font-size: 12.5px; font-weight: 650; white-space: nowrap; transition: color .15s ease; }
.pb .site-nav a:hover, .pb .site-actions a:hover { color: var(--site-ink); }
.pb .site-nav a[aria-current="page"] { color: var(--site-ink); box-shadow: inset 0 -2px 0 var(--blue); }
.pb .site-actions { display: flex; align-items: center; gap: 18px; height: 100%; }
.pb .site-actions .save { color: var(--site-dim); padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--site-ink) 25%, transparent); height: auto; font: 600 11px/1.2 var(--mono); }
.pb .mark { border: 0; cursor: pointer; }
.pb .mark[aria-expanded="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.pb .site-edge { display: none; }
@media (max-width: 900px), (max-height: 820px) {
  .pb .site { position: fixed; top: 0; left: 0; right: 0; transform: translateY(-100%); visibility: hidden; }
  .pb .site.peek { transform: none; visibility: visible; box-shadow: 0 8px 24px #1113152e; }
  .pb .site-edge { display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 24; height: 6px; }
}
@media (max-width: 900px) {
  .pb .site { height: auto; flex-wrap: wrap; gap: 4px 18px; padding: 10px 14px; }
  .pb .site-nav { order: 3; width: 100%; height: 34px; overflow-x: auto; gap: 18px; }
  .pb .site-actions { margin-left: auto; height: 28px; }
  .pb .site-edge { display: none; }
}
.pb .bar { position: relative; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 24px; height: 64px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pb .bar-project { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb .bar-project strong { overflow: hidden; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; text-overflow: ellipsis; }
.pb .mark { display: grid; place-items: center; flex: none; width: 26px; height: 26px; background: var(--surface); color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); font: 700 11px/1 var(--mono); letter-spacing: -.02em; transition: background-color .2s ease, color .2s ease; }
.pb .mark:hover { background: var(--blue); color: #fff; }
.pb .stats { display: flex; align-items: center; gap: 22px; }
.pb .stat { position: relative; display: grid; gap: 4px; }
.pb .stat-value { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.pb .stat-value small { color: var(--muted); font-weight: 500; font-size: 12px; }
.pb .tokens { display: flex; gap: 4px; }
.pb .token { width: 14px; height: 14px; background: var(--blue); border: 1px solid var(--blue); transition: background-color .3s ease, border-color .3s ease; }
.pb .token.spent { background: transparent; border-color: var(--line); }
.pb .token.preview { animation: pb-tokenBlink .9s ease-in-out infinite; }
@keyframes pb-tokenBlink { 50% { background: transparent; border-color: var(--amber); } }
.pb .meter { width: 54px; height: 5px; background: var(--line); }
.pb .meter i { display: block; height: 100%; transition: width .8s var(--ease); }
.pb .stat[data-key="client"] .meter i { background: var(--cat-client); }
.pb .stat[data-key="team"] .meter i { background: var(--cat-team); }
.pb .stat-delta { position: fixed; z-index: 40; padding: 1px 6px; border: 1px solid currentColor; background: var(--surface); font: 700 11px/1.4 var(--mono); pointer-events: none; animation: pb-deltaRise 1.6s var(--ease) both; }
.pb .stat-delta.up { color: var(--settled); }
.pb .stat-delta.down { color: var(--alert); }
@keyframes pb-deltaRise { 0% { opacity: 0; transform: translateY(8px); } 15%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
.pb .bar-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.pb .route { display: flex; align-items: center; }
.pb .station { position: relative; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.pb .station::before { content: ''; width: 10px; height: 10px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--surface); transition: all .3s var(--ease); }
.pb .station.done::before { background: var(--ink); border-color: var(--ink); }
.pb .station.now::before { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-wash); }
.pb .station.viewing::before { width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--ink); }
.pb .station:disabled { cursor: default; }
.pb .station:not(:disabled):hover::before { transform: scale(1.25); }
.pb .station .tip { position: absolute; top: calc(100% + 6px); left: 50%; z-index: 5; width: max-content; max-width: 220px; padding: 5px 8px; background: var(--ink); color: var(--surface); font: 600 11px/1.35 var(--sans); text-align: left; opacity: 0; pointer-events: none; transform: translate(-50%, -4px); transition: opacity .15s ease, transform .15s ease; }
.pb .station:not(:disabled):hover .tip, .pb .station:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.pb .route-leg { width: 8px; border-top: 1.5px dashed var(--line); }
.pb .route-leg.done { border-top-style: solid; border-color: var(--ink); }
.pb .ghost-btn, .pb .end-week, .pb .primary { white-space: nowrap; padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); font: 700 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .15s ease, opacity .25s ease; }
.pb .ghost-btn[aria-expanded="true"] { border-color: var(--ink); }
.pb .end-week { border-color: var(--ink); }
.pb .end-week.ready, .pb .primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.pb .end-week.warn { animation: pb-shake .4s ease; }
.pb .end-week:disabled { opacity: .35; cursor: default; }
@keyframes pb-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pb .stage { position: relative; display: grid; place-items: center; flex: 1; min-height: 0; overflow: auto; padding: 32px 40px; background-color: var(--paper); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; scrollbar-width: thin; }
.pb .week { position: relative; width: min(1400px, 100%); min-width: 940px; padding: 26px 28px 28px; background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1px solid var(--line); }
.pb .week.in-next { animation: pb-slideInNext .55s var(--ease) both; }
.pb .week.in-prev { animation: pb-slideInPrev .55s var(--ease) both; }
.pb .week.out-next { position: absolute; animation: pb-slideOutNext .4s ease-in both; pointer-events: none; }
.pb .week.out-prev { position: absolute; animation: pb-slideOutPrev .4s ease-in both; pointer-events: none; }
@keyframes pb-slideInNext { from { opacity: 0; transform: translateX(80px); } }
@keyframes pb-slideInPrev { from { opacity: 0; transform: translateX(-80px); } }
@keyframes pb-slideOutNext { to { opacity: 0; transform: translateX(-80px); } }
@keyframes pb-slideOutPrev { to { opacity: 0; transform: translateX(80px); } }
.pb .week-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.pb .week-head h2 { font-size: 22px; font-weight: 900; letter-spacing: -.035em; }
.pb .lookback { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -26px -28px 22px; padding: 10px 28px; background: var(--ink); color: var(--surface); }
.pb .lookback .label { color: inherit; opacity: .85; }
.pb .lookback button { padding: 7px 12px; border: 1px solid currentColor; background: transparent; color: inherit; font: 700 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.pb .week.past .situation::before { background: var(--muted); }
.pb .board { position: relative; display: grid; grid-template-columns: minmax(260px, 340px) 180px minmax(340px, 580px) minmax(60px, 1fr) 190px; align-items: start; min-height: 420px; }
.pb .wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.pb .w { fill: none; stroke: var(--wire); stroke-width: 1.5; stroke-linejoin: round; transition: stroke .2s ease, opacity .3s ease; }
.pb .w.dash { stroke-dasharray: 4 5; }
.pb .w.lit { stroke: var(--c); stroke-width: 2; stroke-dasharray: none; }
.pb .w.faint { opacity: .4; }
.pb .w.out { stroke: var(--settled); stroke-width: 2.5; }
.pb .w.draw { animation: pb-draw .55s var(--ease) both; }
.pb .w.fade { animation: pb-wireFade .4s ease both; animation-delay: var(--d, 0s); }
@keyframes pb-draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes pb-wireFade { from { opacity: 0; } }
.pb .node { fill: var(--surface); stroke: var(--c, var(--wire)); stroke-width: 2; }
.pb .node.solid { fill: var(--c); }
.pb .situation { position: relative; z-index: 1; grid-column: 1; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pb .situation::before { content: ''; position: absolute; inset: -1px -1px auto; height: 3px; background: var(--blue); transition: background-color .4s ease; }
.pb .situation.done::before { background: var(--ink); }
.pb .situation-head { display: flex; justify-content: space-between; align-items: center; min-height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.pb .your-move { display: inline-flex; align-items: center; gap: 7px; color: var(--blue-text); }
.pb .your-move::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pb-beacon 1.6s ease-out infinite; }
.pb .situation.done .your-move { color: var(--muted); }
.pb .situation.done .your-move::before, .pb .week.past .your-move::before { animation: none; }
@keyframes pb-beacon { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.pb .situation-body { padding: 16px; }
.pb .since { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); color: var(--muted); font-size: 13px; line-height: 1.45; }
.pb .since .label { display: block; margin-bottom: 2px; }
.pb .situation blockquote { margin: 0 0 12px; font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: -.015em; }
.pb .situation .read { color: var(--muted); font-size: 13px; font-style: italic; }
.pb .lead { position: relative; z-index: 1; grid-column: 1; display: grid; gap: 10px; }
.pb .notices { padding: 10px 12px 11px; border: 1px dashed var(--amber); background: color-mix(in srgb, var(--amber) 5%, var(--surface)); font-size: 12.5px; line-height: 1.4; animation: pb-noticeIn .45s var(--ease) both .15s; }
.pb .notices.urgent { border: 1px solid var(--alert); background: color-mix(in srgb, var(--alert) 4%, var(--surface)); }
.pb .notices ul { display: grid; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.pb .notices li { display: grid; grid-template-columns: 62px 1fr; gap: 8px; }
.pb .notices li i { align-self: start; padding: 2px 0; font: 700 9.5px/1.2 var(--mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.pb .notices li.now i { color: var(--alert); }
.pb .notices button { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--blue-text); font: 600 12px/1.2 inherit; cursor: pointer; }
.pb .notices button:hover { text-decoration: underline; }
@keyframes pb-noticeIn { from { opacity: 0; transform: translateY(-6px); } }
.pb .stops { position: relative; z-index: 1; grid-column: 2; display: grid; gap: 14px; justify-items: start; padding-left: 48px; }
.pb .stop { --c: var(--blue); display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 10px; min-width: 108px; padding: 8px 10px; border: 1.5px dashed var(--wire); background: var(--surface); text-align: left; transition: border-color .2s ease, background-color .2s ease, transform .15s ease; }
.pb .stop-name { font: 700 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pb .stop-marks { display: flex; gap: 3px; justify-self: end; min-height: 8px; }
.pb .stop-marks i { width: 6px; height: 6px; background: var(--c); }
.pb .stop-marks b { color: var(--settled); font: 700 11px/1 var(--mono); }
.pb .stop-state { grid-column: 1 / -1; color: var(--muted); font-size: 11px; line-height: 1.2; }
.pb .stop:hover { border-color: var(--c); }
.pb .stop.seen { border-style: solid; border-color: var(--line); }
.pb .stop.seen .stop-name { color: var(--ink); }
.pb .stop.open { border-style: solid; border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); box-shadow: inset 3px 0 0 var(--c); }
.pb .stop.open .stop-name { color: var(--c); }
.pb .stop:active { transform: translateY(1px); }
.pb .look-cost { display: inline-flex; align-items: center; gap: 5px; }
.pb .look-cost i { width: 7px; height: 7px; background: var(--blue); }
.pb .stop.short:not(.seen) { opacity: .5; }
.pb .stop.warn { animation: pb-shake .4s ease; }
.pb .cards { position: relative; z-index: 1; grid-column: 3; display: grid; gap: 8px; padding-left: 30px; align-content: start; min-height: 100%; }
.pb .cards-hint { color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 320px; }
.pb .cards-hint strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.pb .opt { --c: var(--blue); position: relative; display: grid; gap: 6px; padding: 11px 12px 11px 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: border-color .16s ease, box-shadow .16s ease, opacity .3s ease; animation: pb-optIn .38s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + .12s); }
@keyframes pb-optIn { from { opacity: 0; } }
.pb .opt:hover:not(:disabled), .pb .opt:focus-visible { border-color: var(--c); box-shadow: inset 3px 0 0 var(--c); }
.pb .opt.routine { background: color-mix(in srgb, var(--c) 4%, var(--surface)); }
.pb .opt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pb .opt-area { color: var(--c); font: 600 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pb .cost { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font: 600 10px/1 var(--mono); }
.pb .cost i { width: 7px; height: 7px; background: var(--blue); }
.pb .cost i:last-of-type { margin-right: 3px; }
.pb .opt-text { font-size: 13.5px; font-weight: 650; line-height: 1.35; }
.pb .opt:disabled { cursor: default; }
.pb .opt.taken { border-color: var(--c); box-shadow: inset 3px 0 0 var(--c); background: var(--surface); }
.pb .opt.taken .cost i { background: transparent; outline: 1px solid var(--line); outline-offset: -1px; }
.pb .opt.short:not(.taken), .pb .opt.closed:not(.taken), .pb .week.past .opt:not(.taken) { opacity: .45; }
.pb .outcome { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.pb .outcome > div { overflow: hidden; }
.pb .opt.taken .outcome { grid-template-rows: 1fr; }
.pb .opt.taken.reveal .outcome { grid-template-rows: 0fr; transition: none; }
.pb .outcome > div { opacity: 1; transition: opacity .45s ease .1s; }
.pb .opt.reveal .outcome > div { opacity: 0; transition: none; }
.pb .story { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; font-weight: 400; }
.pb .lesson { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.45; }
.pb .lesson b { display: block; color: var(--muted); font: 600 10px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pb .result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.pb .status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border: 1.5px solid currentColor; font: 700 10px/1.5 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.pb .status.settled { color: var(--blue-text); animation: pb-stamp .45s var(--spring) both .3s; }
.pb .status.open { color: var(--amber); }
@keyframes pb-stamp { from { opacity: 0; transform: scale(1.4) rotate(-4deg); } }
.pb .exit { position: relative; z-index: 1; grid-column: 5; display: grid; gap: 8px; padding: 16px 14px; border: 1.5px dashed var(--wire); background: var(--surface); text-align: center; transition: border-color .4s ease; }
.pb .exit strong { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.pb .exit p { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pb .exit .primary { justify-self: center; margin-top: 4px; animation: pb-stamp .45s var(--spring) both .35s; }
.pb .exit .primary { max-width: 100%; white-space: normal; line-height: 1.35; text-wrap: balance; }
.pb .exit.settled { border: 1.5px solid var(--settled); animation: pb-ring 1.1s var(--ease); }
.pb .exit.settled strong { color: var(--settled); }
.pb .exit.warn { border: 1.5px solid var(--alert); }
.pb .exit.warn strong, .pb .exit.warn p { color: var(--alert); }
.pb .exit.warn .primary { background: var(--surface); border-color: var(--alert); color: var(--alert); animation: none; }
@keyframes pb-ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--settled) 45%, transparent); } to { box-shadow: 0 0 0 16px transparent; } }
.pb .flying { position: fixed; z-index: 100; width: 14px; height: 14px; background: var(--blue); pointer-events: none; }
.pb .close-card { position: fixed; left: 50%; top: 50%; z-index: 60; display: grid; gap: 10px; width: min(440px, calc(100vw - 32px)); padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transform: translate(-50%, -50%); animation: pb-closeIn .45s var(--ease) both; }
.pb .close-card::before { content: ''; position: absolute; inset: -1px -1px auto; height: 3px; background: var(--c, var(--blue)); }
.pb .close-card h3 { font-size: 22px; font-weight: 900; letter-spacing: -.03em; }
.pb .close-card p { font-size: 14px; color: var(--muted); }
.pb .close-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 4px 0 0; background: var(--line); border: 1px solid var(--line); }
.pb .close-card dl div { padding: 8px 10px; background: var(--surface); }
.pb .close-card dt { color: var(--muted); font: 600 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pb .close-card dd { margin: 2px 0 0; font-weight: 800; }
.pb .close-card .primary { justify-self: end; margin-top: 4px; }
.pb .scrim { position: fixed; inset: 0; z-index: 55; background: color-mix(in srgb, var(--paper) 60%, transparent); animation: pb-wireFade .3s ease both; }
@keyframes pb-closeIn { from { opacity: 0; transform: translate(-50%, -46%); } }
.pb .stat { --c: var(--ink); padding: 6px 10px 7px; margin: 0 -2px; border: 0; background: none; text-align: left; box-shadow: inset 0 0 0 transparent; transition: background-color .15s ease, box-shadow .2s ease; }
.pb .stats { align-self: stretch; align-items: center; }
.pb .stat { align-self: stretch; align-content: start; grid-template-rows: auto 22px 3px; padding-top: 11px; }
.pb .stat .stat-value { align-self: center; }
.pb .stat .label::after { content: ' ▾'; opacity: 0; transition: opacity .15s ease; }
.pb .stat:hover { background: color-mix(in srgb, var(--c) 6%, transparent); }
.pb .stat:hover .label::after, .pb .stat[aria-expanded="true"] .label::after { opacity: 1; }
.pb .stat[aria-expanded="true"] { background: color-mix(in srgb, var(--c) 8%, transparent); box-shadow: inset 0 -3px 0 var(--c); }
.pb .stat[data-key="time"] { --c: var(--blue); }
.pb .stat[data-key="cost"] { --c: var(--blue); }
.pb .stat[data-key="client"] { --c: var(--blue); }
.pb .stat[data-key="team"] { --c: var(--blue); }
.pb .spark { position: relative; display: block; width: 100%; min-width: 92px; height: 3px; background: var(--line); }
.pb .spark i { display: block; height: 100%; background: var(--ink); transition: width .8s var(--ease); }
.pb .spark b { position: absolute; top: -3px; width: 2px; height: 9px; background: var(--ink); }
.pb #doneBar i { background: var(--blue); }
.pb .people { display: flex; gap: 3px; }
.pb .people i { width: 10px; height: 14px; background: var(--ink); }
.pb .people i.mid { background: color-mix(in srgb, var(--cat-team) 50%, var(--line)); }
.pb .people i.low { background: var(--amber); }
.pb .people i.joining { background: transparent; outline: 1.5px dashed var(--ink); outline-offset: -1.5px; }
.pb .people i.leaving { opacity: .35; }
.pb .people i.ramp { background: linear-gradient(to top, var(--ink) 50%, transparent 50%); outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.pb .people i.out, .pb .srow .sq.out { background: transparent; outline: 1.5px dashed var(--alert); outline-offset: -1.5px; }
.pb .people i.idle { background: transparent; outline: 1.5px solid var(--amber); outline-offset: -1.5px; }
.pb .stat-value .sep { width: 1px; height: 14px; margin: 0 4px; background: var(--line); }
.pb .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pb .read-word { font-weight: 700; }
.pb .trend-sm { color: var(--muted); font-weight: 500; font-size: 12px; }
.pb .weeks-read { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pb .weeks-read span { padding: 3px 8px; border: 1px solid var(--line); font-size: 12px; }
.pb .weeks-read span b { margin-right: 6px; color: var(--muted); font: 600 10px/1 var(--mono); letter-spacing: .06em; }
.pb .weeks-read span:last-child { border-color: var(--c); }
.pb .read-now { margin-top: 14px; }
.pb .read-now strong { display: block; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.pb .read-now small { color: var(--muted); font-size: 12.5px; }
.pb .read-word { transition: color .3s ease; }
.pb .read-word.shift-up { animation: pb-shiftUp 1.6s ease both; }
.pb .read-word.shift-down { animation: pb-shiftDown 1.6s ease both; }
@keyframes pb-shiftUp { 15%, 60% { color: var(--settled); } }
@keyframes pb-shiftDown { 15%, 60% { color: var(--alert); } }
.pb .pull-scrim { position: fixed; inset: var(--chrome, 104px) 0 0 0; z-index: 34; background: color-mix(in srgb, var(--paper) 55%, transparent); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.pb .pull-scrim.open { opacity: 1; pointer-events: auto; }
.pb .pull { position: fixed; top: var(--chrome, 104px); left: 50%; z-index: 35; width: min(1180px, calc(100vw - 48px)); max-height: calc(100vh - var(--chrome, 104px) - 24px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-top: 0; box-shadow: var(--shadow); transform: translateX(-50%); clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .45s var(--ease), visibility .45s; }
.pb .pull.narrow { width: min(760px, calc(100vw - 48px)); }
.pb .staff-sum { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pb .staff-sum > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pb .staff-sum strong { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.pb .staff-sum strong em { font-style: normal; color: var(--cat-team); }
.pb .staff-sum small { color: var(--muted); font-size: 12px; }
.pb .staff-sum .gauge { display: block; height: 4px; margin: 3px 0 1px; background: var(--line); }
.pb .staff-sum .gauge i { display: block; height: 100%; background: var(--c); transition: width .35s var(--ease); }
.pb .lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pb .lane { padding: 10px; border: 1px solid var(--line); background: var(--paper); transition: border-color .2s ease, background-color .2s ease; }
.pb .lane.over { border-color: var(--cat-team); background: color-mix(in srgb, var(--cat-team) 6%, var(--paper)); }
.pb .lane h5 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.pb .lane h5 small { color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: .02em; text-transform: none; }
.pb .lane ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pb .srow { display: grid; grid-template-columns: 10px minmax(0, 1fr) 54px 64px 26px; grid-template-areas: "sq nm ac ev move" "sq meta ac ev move"; align-items: center; gap: 3px 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); background: var(--surface); cursor: grab; animation: pb-rowIn .3s var(--ease) both; }
.pb .srow:active { cursor: grabbing; }
.pb .srow.dragging { opacity: .35; }
.pb .srow.joining { border-style: dashed; border-color: var(--cat-team); }
.pb .srow.leaving { border-style: dashed; opacity: .7; }
.pb .srow .sq { grid-area: sq; align-self: stretch; width: 10px; background: color-mix(in srgb, var(--cat-team) 35%, var(--line)); }
.pb .srow .sq.ramp { background: linear-gradient(to top, var(--cat-team) 50%, transparent 50%); outline: 1.5px solid var(--cat-team); outline-offset: -1.5px; }
.pb .srow .sq.idle { background: transparent; outline: 1.5px solid var(--amber); outline-offset: -1.5px; }
.pb .srow .sq.joining { background: transparent; outline: 1.5px dashed var(--cat-team); outline-offset: -1.5px; }
.pb .srow .sq.leaving { opacity: .35; background: var(--cat-team); }
.pb .lane:not(.firm) .srow .sq:not(.ramp):not(.idle):not(.joining) { background: var(--cat-team); }
.pb .srow .nm { grid-area: nm; font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb .srow .num { grid-area: ac; display: grid; justify-items: end; gap: 3px; font: 700 12.5px/1 var(--mono); white-space: nowrap; }
.pb .srow .num.ev { grid-area: ev; }
.pb .srow .num small { color: var(--muted); font: 600 9.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.pb .srow .meta { grid-area: meta; min-width: 0; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb .srow .tag { font: 600 10.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--cat-team); }
.pb .srow .tag.ramp, .pb .srow .tag.idle { color: var(--amber); }
.pb .srow .tag.out { color: var(--alert); text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 11.5px; }
.pb .srow .tag.leave, .pb .lane.firm .srow .tag { color: var(--muted); }
.pb .srow .move { grid-area: move; width: 26px; height: 26px; border: 1px solid var(--line); background: var(--surface); font: 700 13px/1 var(--mono); }
.pb .srow .move:hover { border-color: var(--cat-team); color: var(--cat-team); }
.pb .lane .slot { display: grid; place-items: center; min-height: 48px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.pb .coord { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.pb .coord b { margin-right: 6px; color: var(--ink); font: 700 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.pb .pkgs { display: grid; gap: 4px; }
.pb .pkg { display: grid; grid-template-columns: minmax(150px, 1.1fr) 2fr minmax(170px, 1.2fr); align-items: center; gap: 12px; font-size: 12.5px; }
.pb .pkg .track { display: grid; grid-template-columns: repeat(var(--weeks), 1fr); align-items: center; height: 18px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / var(--weeks) - 1px), var(--line) calc(100% / var(--weeks) - 1px) calc(100% / var(--weeks))); }
.pb .pkg.head .track { height: auto; background: none; }
.pb .pkg.head i { color: var(--muted); font: 600 10px/1 var(--mono); font-style: normal; text-align: center; }
.pb .pkg.head i.now { color: var(--ink); font-weight: 800; }
.pb .pkg .track b { display: block; height: 10px; background: color-mix(in srgb, var(--blue) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--blue) 40%, var(--line)); overflow: hidden; }
.pb .pkg .track b em { display: block; height: 100%; background: var(--blue); transition: width .5s var(--ease); }
.pb .pkg.waiting .track b { border-color: var(--amber); border-style: dashed; }
.pb .pkg.later .track b { opacity: .5; }
.pb .pkg .pstat { color: var(--muted); font-size: 12px; }
.pb .pkg.open .pstat { color: var(--ink); }
.pb .pkg.waiting .pstat { color: var(--amber); }
.pb .pkg.done .pname { color: var(--muted); }
.pb .srow.away { cursor: not-allowed; opacity: .6; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 45%, transparent) 6px 7px), var(--surface); }
.pb .srow .tag.away { color: var(--muted); text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 11.5px; }
.pb .srow .move[aria-disabled] { opacity: .45; cursor: not-allowed; }
.pb .ot { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); cursor: pointer; }
.pb .ot:has(input:checked) { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 7%, var(--surface)); }
.pb .ot input { margin-top: 2px; accent-color: var(--amber); }
.pb .ot b { display: block; font-size: 13px; }
.pb .ot small { color: var(--muted); font-size: 12px; }
.pb .staff-msg { margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.pb .staff-msg.warn { color: var(--alert); animation: pb-shake .35s ease; }
@keyframes pb-rowIn { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 640px) {
  .pb .lanes { grid-template-columns: 1fr; }
  .pb .staff-sum { gap: 10px; }
  .pb .staff-sum small { display: none; }

}
.pb .pull.open { clip-path: inset(0 -40px -40px -40px); visibility: visible; }
.pb .pull-mark { position: absolute; top: 0; height: 3px; background: var(--c, var(--blue)); transition: left .35s var(--ease), width .35s var(--ease), background-color .3s ease; }
.pb .pull-head { display: flex; align-items: baseline; gap: 14px; padding: 20px 24px 0; }
.pb .pull-head h3 { font-size: 20px; font-weight: 900; letter-spacing: -.03em; }
.pb .pull-head .close { margin-left: auto; padding: 6px 10px; border: 1px solid var(--line); background: var(--surface); font: 700 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.pb .pull-body { padding: 18px 24px 24px; animation: pb-pullSwap .35s var(--ease) both; }
@keyframes pb-pullSwap { from { opacity: 0; transform: translateY(-6px); } }
.pb .cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr); gap: 28px; }
.pb .reading { margin-bottom: 14px; font-size: 15px; line-height: 1.55; }
.pb .reading strong { font-weight: 800; }
.pb .note { color: var(--muted); font-size: 12.5px; font-style: italic; }
.pb .chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pb .chart .grid line { stroke: var(--line); stroke-width: 1; }
.pb .chart .axis text, .pb .chart .tag { fill: var(--muted); font: 600 10px var(--mono); letter-spacing: .04em; }
.pb .chart .pv { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.pb .chart .ev { fill: none; stroke: var(--blue); stroke-width: 2.75; }
.pb .chart .ac { fill: none; stroke: var(--ink); stroke-width: 2; }
.pb .chart .fc { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2 5; }
.pb .chart .bac { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.pb .chart .now { stroke: var(--blue); stroke-width: 1; stroke-dasharray: 2 3; }
.pb .chart .draw { animation: pb-draw .9s var(--ease) both .15s; }
.pb .chart .pt { stroke: var(--surface); stroke-width: 2; }
.pb .legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--muted); font: 600 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.pb .legend i { display: inline-block; width: 18px; margin-right: 6px; vertical-align: middle; border-top: 2.5px solid var(--blue); }
.pb .legend .l-ac i { border-top: 2px solid var(--ink); }
.pb .legend .l-pv i { border-top: 1.5px dashed var(--muted); }
.pb .legend .l-fc i { border-top: 1.5px dotted var(--ink); }
.pb .ixs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pb .ix { padding: 10px 12px; border: 1px solid var(--line); }
.pb .ix strong { display: block; font-size: 24px; font-weight: 900; letter-spacing: -.03em; }
.pb .ix small { color: var(--muted); font-size: 12px; }
.pb .scale { position: relative; height: 6px; margin: 8px 0 4px; background: var(--line); }
.pb .scale::before { content: ''; position: absolute; left: 50%; top: -3px; width: 1px; height: 12px; background: var(--muted); }
.pb .scale b { position: absolute; top: -4px; width: 4px; height: 14px; margin-left: -2px; background: var(--ink); transition: left .8s var(--ease); }
.pb .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
.pb .nums div { padding: 8px 10px; background: var(--surface); }
.pb .nums dt { color: var(--muted); font: 600 10px/1.4 var(--mono); letter-spacing: .08em; }
.pb .nums dd { margin: 2px 0 0; font-weight: 800; }
.pb .nums dd small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.pb .who { padding: 16px; border: 1px solid var(--line); }
.pb .who h4 { margin: 4px 0 2px; font-size: 18px; font-weight: 900; letter-spacing: -.02em; }
.pb .who p { color: var(--muted); font-size: 13px; }
.pb .trait { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--c, var(--cat-client)); background: color-mix(in srgb, var(--c, var(--cat-client)) 6%, var(--surface)); font-size: 13.5px; line-height: 1.5; }
.pb .trait b { display: block; font: 700 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pb .wants { margin: 12px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }
.pb .trend { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.pb .trend svg { width: 160px; height: 40px; overflow: visible; }
.pb .trend strong { font-size: 22px; font-weight: 900; }
.pb .trend small { display: block; color: var(--muted); font-size: 12px; }
.pb .ledger { margin: 0; padding: 0; list-style: none; }
.pb .ledger li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.pb .ledger li:first-child { border-top: 0; }
.pb .ledger .wk { color: var(--muted); font: 600 10px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pb .ledger .fx { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.pb .ledger .empty { display: block; grid-column: 1 / -1; color: var(--muted); font-style: italic; }
.pb .ledger .status { display: inline-block; margin-top: 8px; padding: 1px 6px; border: 1px solid currentColor; color: var(--settled); font: 700 10px/1.5 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.pb .split { display: grid; gap: 8px; }
.pb .split div { display: grid; grid-template-columns: 76px minmax(0, 1fr) 54px; align-items: center; gap: 10px; font-size: 13px; }
.pb .split i { display: block; height: 10px; background: var(--c); transition: width .8s var(--ease); }
.pb .split span:last-child { color: var(--muted); font: 600 11px var(--mono); text-align: right; }
.pb .big-tokens { display: flex; gap: 6px; margin: 4px 0 12px; }
.pb .big-tokens i { width: 22px; height: 22px; background: var(--blue); }
.pb .big-tokens i.spent { background: transparent; outline: 1.5px solid var(--line); outline-offset: -1.5px; }
.pb h5 { margin: 18px 0 8px; color: var(--muted); font: 600 11px/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
@media (max-width: 1500px) {
  .pb .bar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pb .stats { justify-self: center; }
}
@media (max-width: 1360px) {
  .pb .stats { gap: 6px; }
  .pb #teamWord, .pb .trend-sm { display: none; }
}
@media (max-width: 900px) {
  .pb { overflow: auto; }
  .pb .bar { grid-template-columns: 1fr auto; height: auto; padding: 10px 14px; gap: 10px; }
  .pb .stats { grid-column: 1 / -1; order: 3; flex-wrap: wrap; gap: 10px 18px; }
  .pb .route { grid-column: 1 / -1; order: 4; justify-content: center; }
  .pb .bar-right { gap: 8px; }
  .pb .bar-right .route { display: none; }
  .pb .stats { gap: 4px 6px; }
  .pb .pull { top: 0; left: 0; width: 100%; max-height: 100vh; height: 100vh; transform: none; z-index: 70; }
  .pb .pull.narrow { width: 100%; }
  .pb .pull-scrim { inset: 0; z-index: 69; }
  .pb .cols { grid-template-columns: 1fr; }
  .pb .pull-head, .pb .pull-body { padding-left: 16px; padding-right: 16px; }
  .pb .stage { display: block; flex: none; overflow: visible; padding: 16px; }
  .pb .week { width: auto; min-width: 0; padding: 16px; }
  .pb .lookback { margin: -16px -16px 16px; padding: 10px 16px; }
  .pb .week-head { flex-direction: column; gap: 4px; }
  .pb .board { grid-template-columns: 1fr; gap: 18px; min-height: 0; }
  .pb .situation, .pb .stops, .pb .cards, .pb .exit { grid-column: 1; }
  .pb .stops { grid-template-columns: repeat(2, 1fr); gap: 8px; padding-left: 0; justify-items: stretch; }
  .pb .cards { padding-left: 24px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pb *, .pb *::before, .pb *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .pb .stat-delta, .pb .flying { display: none; }
}

/* --- Night: the app's dark mode, same tokens as the concept's dark scheme --------------- */
body:not(.light-mode) .pb {
  color-scheme: dark;
  --paper: #0a1120; --surface: #101a2e; --ink: #f8fafc; --muted: #a9bad6; --line: #293a58; --wire: #3b4f73;
  --grid: #93b4fc12; --blue: #4da3ff; --blue-text: #9acfff; --blue-wash: #142b49; --settled: #9acfff; --amber: #ffc47b;
  --alert: #ffc47b; --cat-team: #2ff08f; --cat-client: #4da3ff; --cat-policy: #ffc47b; --cat-work: #c58bff;
  --shadow: 0 1px 2px #00000040, 0 10px 28px #0000004d;
  --site-bg: #050a14; --site-ink: #f8fafc; --site-dim: #8193b2; --good: #4ade80;
}
body:not(.light-mode) .pb .end-week.ready, body:not(.light-mode) .pb .primary { color: #06101f; }

/* --- Live additions -------------------------------------------------------------------- */
.pb .site-btn {
  height: 100%; padding: 0; border: 0; background: none; color: var(--site-dim);
  font-size: 12.5px; font-weight: 650; white-space: nowrap; transition: color .15s ease;
}
.pb .site-btn:hover { color: var(--site-ink); }
/* A program run: the program's name and module, a thin strip under the bar. */
.pb .program-strip {
  position: relative; z-index: 19; display: flex; align-items: center; gap: 14px; flex: none;
  padding: 6px 24px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--program-accent, var(--amber)) 10%, var(--surface));
  font: 600 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.pb .program-strip .program-ribbon-name { color: var(--ink); }
/* Something new behind a stop (a clue opened it). */
.pb .stop.fresh { border-style: solid; border-color: var(--c); }
.pb .stop.fresh .stop-state { color: var(--c); font-weight: 600; }
.pb .opt.fresh { border-color: var(--c); }
.pb .notices li i { color: var(--muted); }
.pb .notices li.now i { color: var(--alert); }
.pb .week.quiet .situation::before { background: var(--muted); }

/* Mid widths (laptops, 900 to 1280): a tighter board so the exit stays on screen, and the bar
   drops the project name (the CP mark stays) to make room for the week dots. */
@media (min-width: 901px) and (max-width: 1280px) {
  .pb .week { min-width: 0; padding: 22px 22px 24px; }
  .pb .lookback { margin: -22px -22px 20px; padding: 10px 22px; }
  .pb .board { grid-template-columns: minmax(210px, 290px) 140px minmax(260px, 1fr) 28px 160px; }
  .pb .stops { padding-left: 34px; }
  .pb .stop { min-width: 96px; }
  .pb .cards { padding-left: 24px; }
  .pb .stage { padding: 24px; }
  .pb .bar { gap: 14px; padding: 0 16px; }
  .pb .bar-project strong { display: none; }
  .pb .stats { gap: 2px; }
  .pb .spark { min-width: 70px; }
}

/* --- Refinements (Nov 27) ------------------------------------------------------------- */
/* Client and team share one glyph: five rising bars, filled to the current read. */
.pb .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.pb .bars i { width: 4px; background: var(--line); transition: background-color .5s var(--ease); }
.pb .bars i:nth-child(1) { height: 4px; } .pb .bars i:nth-child(2) { height: 6.5px; } .pb .bars i:nth-child(3) { height: 9px; }
.pb .bars i:nth-child(4) { height: 11.5px; } .pb .bars i:nth-child(5) { height: 14px; }
.pb .bars i.on { background: var(--ink); }
.pb .stat-value.shift { animation: pb-pulse 1.2s var(--ease); }
@keyframes pb-pulse { 20% { transform: scale(1.12); } 100% { transform: none; } }
/* Team pull-down: cost and estimated earned value against what the plan calls for. */
.pb .wk-table { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pb .wk-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pb .wk-table th, .pb .wk-table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.pb .wk-table th:first-child { text-align: left; }
.pb .wk-table thead th { color: var(--muted); font: 600 10px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.pb .wk-table td { font: 700 13px/1.3 var(--mono); }
.pb .wk-table tbody th { font-weight: 700; }
.pb .wk-table tr.next { color: var(--muted); }
.pb .wk-table .note { margin-top: 8px; font-style: normal; }
.pb .conds { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.pb .conds li { padding: 3px 8px; border: 1px solid var(--line); background: var(--paper); font: 600 11px/1.4 var(--mono); }
.pb details.more { margin-top: 6px; }
.pb details.more summary { padding: 6px 2px; color: var(--muted); font: 600 11px/1.4 var(--mono); letter-spacing: .04em; cursor: pointer; }
.pb details.more ul { margin-top: 6px; }
.pb .srow .tag { color: var(--muted); }
.pb .srow .tag.out, .pb .srow .tag.idle { color: var(--amber); }
.pb .srow .tag.ramp, .pb .srow .tag.join { color: var(--blue-text); }
.pb .srow .sq, .pb .lane:not(.firm) .srow .sq:not(.ramp):not(.idle):not(.joining):not(.out) { background: var(--ink); }
.pb .lane.firm .srow .sq { background: var(--line); }
.pb .srow .sq.ramp { background: linear-gradient(to top, var(--ink) 50%, transparent 50%); outline-color: var(--ink); }
.pb .srow .sq.joining { outline-color: var(--ink); }
.pb .srow .sq.out { background: transparent; }

/* --- Staffing view (path-board-staff.js): Team pull-down and the schedule ------------------ */
.pb .stat.flag { position: relative; }
.pb .stat.flag::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--amber); outline: 2px solid var(--surface); }
.pb .sv { position: relative; }
.pb .sv h5 { margin: 18px 0 8px; }
.pb .sv-start { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; padding: 10px 14px; background: var(--blue-wash); border-left: 3px solid var(--blue); }
.pb .sv-start div { flex: 1; display: grid; gap: 1px; }
.pb .sv-start b { font-size: 15px; }
.pb .sv-start span:not(.label) { color: var(--muted); font-size: 13px; }
.pb .sv-sum { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.pb .sv-sum div { padding: 5px 10px; border: 1px solid var(--line); border-left: 3px solid var(--ink); }
.pb .sv-sum div.bad { border-left-color: var(--amber); }
.pb .sv-sum div.bad dd { color: var(--amber); }
.pb .sv-sum dt { display: inline; color: var(--muted); font: 600 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pb .sv-sum dd { display: inline; margin: 0 0 0 6px; font-weight: 700; font-size: 14px; }
.pb .sv-sum small { display: block; color: var(--muted); font-size: 11px; }
.pb .sv-notes { margin: 0 0 10px; padding: 6px 10px 6px 26px; border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); background: color-mix(in srgb, var(--amber) 7%, var(--surface)); font-size: 13px; }
.pb .sv-note { margin-top: 8px; color: var(--amber); font-size: 13px; }
.pb .sv-grid { border: 1px solid var(--line); }
.pb .sv-row { display: grid; grid-template-columns: 200px repeat(var(--cols), minmax(46px, 1fr)); border-bottom: 1px solid var(--line); }
.pb .sv-row:last-child { border-bottom: 0; }
.pb .sv-nm { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; padding: 4px 10px; border-right: 1px solid var(--line); min-width: 0; }
.pb .sv-nm b { font-size: 12.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb .sv-nm b small { color: var(--muted); font-weight: 400; }
.pb .sv-nm > small { grid-column: 2; color: var(--muted); font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb .sv-c { position: relative; border-left: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); }
.pb .sv-c.late, .pb .sv-cols i.late { background: repeating-linear-gradient(135deg, #b4530912 0 6px, transparent 6px 12px), #b4530906; }
.pb .sv-c.past, .pb .sv-cols i.past { background-color: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.pb .sv-c.now, .pb .sv-cols i.now { background-color: var(--blue-wash); border-left: 2px solid var(--blue); border-right: 2px solid var(--blue); }
.pb .sv-c.due, .pb .sv-cols i.due { border-right: 2px solid var(--ink); }
.pb .sv-axis .sv-c { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 4px 0; }
.pb .sv-axis .sv-c b { font: 700 11.5px/1.2 var(--mono); }
.pb .sv-axis .sv-c small { color: var(--muted); font: 600 9.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.pb .sv-axis .sv-c.now small { color: var(--blue-text); }
.pb .sv-axis .sv-c.late b { color: var(--amber); }
.pb .sv-letter { display: grid; place-items: center; width: 22px; height: 22px; background: var(--c); color: #fff; font: 800 12px/1 var(--sans); grid-row: span 2; }
.pb .sv-lane { grid-column: 2 / -1; position: relative; height: 34px; }
.pb .sv-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(46px, 1fr)); }
.pb .sv-cols i { border-left: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); }
.pb .sv-ghost { position: absolute; top: 5px; height: 24px; border: 1.5px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.pb .sv-notyet { position: absolute; top: 3px; bottom: 3px; left: 0; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 9%, transparent) 0 2px, transparent 2px 7px); border-right: 3px solid var(--ink); }
.pb .sv-bar { position: absolute; top: 8px; height: 18px; display: flex; align-items: center; gap: 6px; padding: 0 6px; overflow: hidden; background: var(--c); color: #fff; font: 600 10.5px/1 var(--mono); font-style: normal; white-space: nowrap; z-index: 2; transition: left .35s var(--ease), width .35s var(--ease); }
.pb .sv-bar em { margin-left: auto; font-style: normal; }
.pb .sv-bar.open { background: repeating-linear-gradient(90deg, var(--c) 0 85%, color-mix(in srgb, var(--c) 40%, #fff) 85% 100%); }
.pb .sv-wait { position: absolute; top: 9px; color: var(--amber); font-size: 11px; font-weight: 600; white-space: nowrap; }
.pb .sv-ms { position: absolute; top: 17px; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: var(--surface); border: 2px solid var(--ink); transform: rotate(45deg); z-index: 4; }
.pb .sv-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.pb .sv-links path { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.pb .sv-sec { background: color-mix(in srgb, var(--ink) 2.5%, var(--surface)); }
.pb .sv-sec .sv-nm { display: flex; }
.pb .sv-hint { grid-column: 2 / -1; padding: 5px 10px; color: var(--muted); font-size: 12px; }
.pb .sv-av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pc); color: #fff; font: 700 9px/1 var(--mono); grid-row: span 2; flex: none; }
.pb .sv-person .sv-c { height: 34px; }
.pb .sv-use { position: absolute; inset: 5px 3px; display: flex; overflow: hidden; padding: 0; border: 0; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.pb .sv-use i { height: 100%; background: var(--c); }
.pb .sv-use i.idle { background: repeating-linear-gradient(135deg, #b4530940 0 4px, transparent 4px 8px); }
.pb .sv-use span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font: 700 10px/1 var(--mono); }
.pb .sv-use span b { padding: 1px 3px; background: #ffffffd9; color: #111315; }
.pb .sv-use.off { background: none; border: 1.5px dashed color-mix(in srgb, var(--ink) 14%, transparent); color: var(--muted); justify-content: center; align-items: center; font-size: 13px; opacity: .55; }
.pb .sv-use.off:hover { opacity: 1; border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.pb .sv-use.away { justify-content: center; align-items: center; background: color-mix(in srgb, var(--ink) 10%, var(--surface)); color: var(--muted); font-size: 10.5px; }
.pb .sv-use.away.conflict { background: color-mix(in srgb, var(--amber) 14%, var(--surface)); color: var(--amber); font-weight: 700; outline: 1.5px solid var(--amber); outline-offset: -1.5px; }
.pb .sv-use.after { justify-content: center; align-items: center; background: none; color: var(--muted); }
.pb .sv-use:disabled { cursor: default; }
.pb .sv-use:not(:disabled):not(.off):hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.pb .sv-bench { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; }
.pb .sv-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 8px 3px 4px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.pb .sv-chip:hover { border-color: var(--ink); }
.pb .sv-chip span { display: grid; }
.pb .sv-chip b { font-size: 12px; }
.pb .sv-chip small { color: var(--muted); font-size: 10.5px; }
.pb .sv-chip i { color: var(--muted); font-style: normal; font-weight: 700; }
/* People are circles (the theme squares everything else), so they never read as tasks. */
.pb .sv-av { border-radius: 50% !important; }
.pb .sv-row { grid-template-columns: 230px repeat(var(--cols), minmax(46px, 1fr)); }
.pb .sv-who { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto auto; row-gap: 0; }
.pb .sv-who .sv-av { grid-row: 1 / span 3; align-self: center; }
.pb .sv-who > small { grid-column: 2 / -1; }
.pb .sv-who .sv-rate { color: var(--muted); }
.pb .sv-person .sv-c { height: 46px; }
.pb .sv-person .sv-use { inset: 9px 3px; }
.pb .sv-x { grid-column: 3; grid-row: 1; padding: 0 3px; border: 0; background: none; color: var(--muted); font-size: 14px; line-height: 1; }
.pb .sv-x:hover { color: var(--ink); }
.pb .sv-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; vertical-align: 1px; background: var(--line); border-radius: 50% !important; }
.pb .sv-dot.on { background: var(--good, #15803d); }
.pb .sv-dot.next { background: var(--blue); }
.pb .sv-dot.warn { background: var(--amber); }
.pb .sv-who small:has(.sv-dot.warn) { color: var(--amber); font-weight: 600; }
.pb .sv-tot .sv-nm { display: block; padding: 3px 10px; }
.pb .sv-tot .sv-nm b { display: block; font: 600 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pb .sv-tot .sv-nm small { display: block; color: var(--muted); font-size: 10.5px; }
.pb .sv-tot .sv-c { display: grid; place-items: center; padding: 3px 2px; color: var(--blue-text); font: 600 10.5px/1.2 var(--mono); white-space: nowrap; }
.pb .sv-tot.ac .sv-c { color: var(--muted); }
.pb .sv-more { padding: 4px 10px; border: 1px dashed var(--line); background: none; color: var(--muted); font-size: 12px; }
.pb .sv-more:hover { border-color: var(--ink); color: var(--ink); }
.pb .sv-start .primary:disabled { opacity: .45; cursor: not-allowed; }
.pb .sv-use.carried { opacity: .45; outline: 1.5px dashed var(--ink); outline-offset: -1.5px; }
.pb .sv-use.carried:hover { opacity: .8; }

/* Client and team read as a toned word with a trend arrow (replaces the signal bars). */
.pb .stat-read { font-weight: 700; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
.pb .stat-read b { margin-left: 3px; font-weight: 700; }
.pb .stat-read.good { color: var(--good, #15803d); }
.pb .stat-read.even { color: var(--ink); }
.pb .stat-read.low { color: var(--amber); }
.pb .stat-read.bad { color: var(--alert); }
/* Team button: one status dot per person, as in the team view. */
.pb .people.pips { align-items: center; gap: 4px; }
.pb .people.pips i.sv-dot { width: 9px; height: 9px; margin: 0; }
.pb .people.pips i.sv-dot.off { background: transparent; outline: 1.5px solid var(--line); outline-offset: -1.5px; }
/* Idle next week: a quiet note in the team view, a thin amber ring on the Team button's dot. */
.pb .sv-soon { margin-left: 4px; color: var(--amber); font-style: normal; font-weight: 500; }
.pb .people.pips i.sv-dot.soon { outline: 1.5px solid var(--amber); outline-offset: 1.5px; }
/* Schedule changes grow and shrink the bars into place; the dependency lines wait for them. */
.pb .sv .sv-tween { transition: left .38s cubic-bezier(.2, .7, .2, 1), width .38s cubic-bezier(.2, .7, .2, 1), opacity .3s ease; }
.pb .sv-links { transition: opacity .2s ease; }
.pb .sv-links.moving { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .pb .sv .sv-tween { transition: none; } }
/* Site menu as on civilsystems.org: colour marks for the two apps, and the day / night switch. */
.pb .site-nav .nav-app { gap: 8px; }
.pb .site-nav .nav-app::before { content: ''; flex: none; width: 7px; height: 7px; background: var(--mark); }
.pb .site-nav .nav-cp { --mark: #4da3ff; }
.pb .site-nav .nav-sprint { --mark: #2ff08f; }
.pb .site-mode { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; }
.pb .site-mode svg { width: 15px; height: 15px; }
.pb .site-mode .moon, .pb .site-mode[aria-pressed="true"] .sun { display: none; }
.pb .site-mode[aria-pressed="true"] .moon { display: block; }

/* Top bar: each stat keeps its width as its value changes, so the bar never slides. */
.pb .stats { font-variant-numeric: tabular-nums; }
.pb .stat[data-key="cost"] { min-width: 300px; }
.pb .stat[data-key="team"] { min-width: 200px; }
.pb .stat[data-key="client"] { min-width: 150px; }
.pb .stat[data-key="time"] { min-width: 142px; }
@media (min-width: 1281px) and (max-width: 1439px) {
  .pb .stats { gap: 12px; }
  .pb .stat[data-key="cost"] { min-width: 252px; }
  .pb .stat[data-key="team"] { min-width: 178px; }
  .pb .stat[data-key="client"] { min-width: 122px; }
}
@media (max-width: 1280px) {
  .pb .stat[data-key="cost"] { min-width: 240px; }
  .pb .stat[data-key="team"] { min-width: 176px; }
  .pb .stat[data-key="client"] { min-width: 118px; }
  .pb .stat[data-key="time"] { min-width: 0; }
}

/* Week dots past the planned finish: a tick marks the deadline, the allowed overrun weeks are
   dashed amber until reached and solid amber once you are in them. The forecast finish gets a
   small mark underneath, amber when it lands past the deadline. */
.pb .route-deadline { flex: none; width: 2px; height: 18px; margin: 0 5px; background: var(--alert); }
.pb .route-leg.over { border-color: var(--alert); }
.pb .station.over::before { width: 9px; height: 9px; border-style: dashed; border-color: var(--alert); }
.pb .station.over.done::before, .pb .station.over.now::before { border-style: solid; background: var(--alert); border-color: var(--alert); }
.pb .station.over.now::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--alert) 18%, transparent); }
.pb .station.forecast::after { content: ''; position: absolute; bottom: -4px; left: 50%; width: 0; height: 0; border: 4px solid transparent; border-top: 0; border-bottom: 5px solid var(--blue); transform: translateX(-50%); }
.pb .station.forecast.late::after { border-bottom-color: var(--alert); }
@media (max-width: 1100px) {
  .pb .stat[data-key] { min-width: 0; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .pb .station { width: 16px; }
  .pb .route-leg { width: 4px; }
  .pb .route-deadline { margin: 0 3px; }
  .pb #pb-tokenText { display: none; }
}
.pb .route-beyond { flex: none; width: 0; height: 0; margin-left: 5px; border: 5px solid transparent; border-right: 0; border-left: 7px solid var(--alert); animation: pb-beyond 1.6s ease-in-out infinite; }
@keyframes pb-beyond { 50% { transform: translateX(2px); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .pb .route-beyond { animation: none; } }

/* The late-forecast hint: in the start banner before week 1, and above the chart after. */
.pb .sv-start .sv-late-hint { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--alert); color: var(--alert); font-style: normal; font-size: 13px; line-height: 1.45; }
.pb .sv-note.sv-late { margin: 0 0 10px; padding-left: 10px; border-left: 2px solid var(--alert); color: var(--alert); }
