/* The office HUD: pixel-bordered panels and a pixel font for labels, numbers and buttons,
   a clean sans for chat and card text. Tokens and sizes follow the "Agency App UI" design. */

@font-face { font-family: 'Silkscreen'; font-weight: 400; font-display: block; src: url('fonts/silkscreen-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: block; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: block; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: block; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: block; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }

:root {
  color-scheme: light dark;
  --pixel: 'Silkscreen', monospace;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --scene: #1E1A17;
  --panel: #F6EEDC; --panel2: #EBDFC5; --hi: #FFFBF0; --frame: #2A211B; --head: #3B3029; --head-ink: #F6EEDC;
  --ink: #2A211B; --ink2: #4F4337; --muted: #6B5D4C; --btn: #E9DCC0; --btn-shade: #CDBE9F; --line: #D8CBB0; --field: #FFFDF7;
  --accent: #2F64C9; --accent-shade: #1F4A9E; --on-accent: #FFFFFF; --accent-soft: #DCE6F8;
  --amber: #8A5606; --amber-fill: #F2B13E; --amber-soft: #FBEBC8;
  --red: #A9361F; --red-fill: #E0533B; --red-soft: #F8DED6;
  --green: #22704A; --green-fill: #4CAF6E; --green-soft: #DDF0E2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --panel: #26221E; --panel2: #1C1916; --hi: #3A332C; --frame: #0B0907; --head: #120F0D; --head-ink: #F1E9DA;
    --ink: #F1E9DA; --ink2: #CFC4B2; --muted: #A3978A; --btn: #3A332C; --btn-shade: #2A241F; --line: #3E3730; --field: #1A1714;
    --accent: #6E9AF0; --accent-shade: #4A74C8; --on-accent: #0E1A33; --accent-soft: #22304A;
    --amber: #F0BA5C; --amber-fill: #F0BA5C; --amber-soft: #3A2D14;
    --red: #F2907B; --red-fill: #E0533B; --red-soft: #3D2019;
    --green: #78CC9C; --green-fill: #4CAF6E; --green-soft: #17301F;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--scene);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.px { font-family: var(--pixel); font-weight: 400; }
.muted { color: var(--muted); }
.tiny { font-family: var(--pixel); font-size: 9.5px; color: var(--muted); }
.num { font-family: var(--pixel); font-size: 14px; }
.label { font-family: var(--pixel); font-size: 11px; color: var(--muted); }

@keyframes pulse { 50% { opacity: .3; } }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.pulse { animation: pulse 1.6s steps(2) infinite; }
.d1 { animation: blink 1.2s steps(2) infinite; }
.d2 { animation: blink 1.2s .2s steps(2) infinite; }
.d3 { animation: blink 1.2s .4s steps(2) infinite; }

.tone-accent { color: var(--accent); }
.tone-amber { color: var(--amber); }
.tone-red { color: var(--red); }
.tone-green { color: var(--green); }
.tone-muted { color: var(--muted); }
.tone-ink2 { color: var(--ink2); }

/* The office scene. Without the sprites it is only the floor. */
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: repeating-conic-gradient(#221D19 0 25%, var(--scene) 0 50%) 0 0 / 64px 64px;
}
.scene.has-office { background: #2B2D33; }
.stage { position: absolute; width: 1584px; height: 1062px; }
.world { position: absolute; left: 0; top: 0; width: 792px; height: 531px; transform: scale(2); transform-origin: 0 0; }
.world img { position: absolute; image-rendering: pixelated; pointer-events: none; user-select: none; }
.world img.mirrored { transform: scaleX(-1); }
.lights { position: absolute; inset: 0; background: rgb(10, 12, 22); opacity: var(--dark, 0); pointer-events: none; transition: opacity .6s steps(4); }

/* People, drawn as in the design: 20 by 27 pixels seated, 20 by 42 standing */
.person { position: absolute; width: 20px; height: 27px; cursor: pointer; }
.person.stand { height: 42px; }
.person > span { position: absolute; }
.person .body { left: 1px; top: 12px; width: 18px; height: 15px; border: 2px solid #2A211B; background: var(--shirt); }
.person.back .body { left: 0; width: 20px; }
.person.stand .body { height: 17px; }
.person .head { left: 3px; top: 0; width: 14px; height: 14px; border: 2px solid #2A211B; border-top: 5px solid var(--hair); background: var(--skin); }
.person.back .head { border-top-width: 2px; border-top-color: #2A211B; background: var(--hair); }
.person .eye { top: 7px; width: 2px; height: 2px; background: #2A211B; }
.person .eye.left { left: 7px; }
.person .eye.right { left: 11px; }
.person .leg { top: 28px; width: 7px; height: 14px; border: 2px solid #2A211B; background: #3B3029; }
.person .leg.left { left: 3px; }
.person .leg.right { left: 10px; }
@keyframes bob { 50% { transform: translateY(1px); } }
.person.working :is(.head, .eye) { animation: bob 1.2s steps(2) infinite; }

/* LPC figures (look.js): 64 px frames, --row picks the facing, --s scales them up. The office
   box is 24 by 50 pixels around the character, the frame hangs 20 px to the left and 12 up. */
.lpc { --s: 1; display: block; width: calc(64px * var(--s)); height: calc(64px * var(--s)); background: var(--sheet) no-repeat; background-size: auto calc(256px * var(--s)); background-position: 0 calc(var(--row) * -64px * var(--s)); image-rendering: pixelated; pointer-events: none; }
.lpc.sit { background-position-x: calc(-128px * var(--s)); }
.lpc.walk { animation: lpc-walk .9s steps(8) infinite; }
.lpc.idle { animation: lpc-idle 1.4s steps(2) infinite; }
@keyframes lpc-walk { from { background-position-x: calc(-64px * var(--s)); } to { background-position-x: calc(-576px * var(--s)); } }
@keyframes lpc-idle { from { background-position-x: 0; } to { background-position-x: calc(-128px * var(--s)); } }
.person.lpc-person { width: 24px; height: 50px; }
.person.lpc-person > .lpc { left: -20px; top: -12px; }
.person.lpc-person.working > .lpc.sit { animation: bob 1.2s steps(2) infinite; }
/* Popup emotes (scene.js): a Pipoya bubble of three 32 px frames, at 2x, for a few seconds. */
.emote { position: absolute; width: 64px; height: 64px; background: var(--emote) no-repeat 0 0 / 192px 64px; image-rendering: pixelated; animation: emote-frames .48s steps(3) infinite, emote-pop .2s steps(2); }
@keyframes emote-frames { to { background-position-x: -192px; } }
@keyframes emote-pop { from { transform: translateY(8px) scale(.5); } }

.labels { position: absolute; inset: 0; pointer-events: none; }
.tag { position: absolute; transform: translateX(-50%); padding: 3px 4px; background: rgba(29, 22, 18, .82); color: #F4EDE2; font-family: var(--pixel); font-size: 10px; line-height: 1; white-space: nowrap; pointer-events: auto; cursor: pointer; }
.speech { position: absolute; padding: 5px 7px; background: #FFFDF8; color: #2A211B; border: 3px solid #2A211B; font-family: var(--pixel); font-size: 12px; line-height: 1; white-space: nowrap; }
.speech.amber { background: #F3B23F; }
.speech.red { background: #E0533B; color: #FFFFFF; }
.ring { position: absolute; width: 54px; border: 3px dashed #2D63C8; }

/* Top bar, which is also the window's title bar */
.topbar {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  z-index: 10;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px 0 20px;
  background: var(--panel);
  border-bottom: 3px solid var(--frame);
  box-shadow: inset 0 -2px 0 var(--hi), 0 3px 0 rgba(0, 0, 0, .25);
}
.topbar h1 { margin: 0; font-family: var(--pixel); font-size: 15px; font-weight: 400; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 8px;
  border: 2px solid var(--frame);
  background: var(--btn);
  color: var(--ink2);
  font-family: var(--pixel);
  font-size: 11px;
}
.pill .lamp { width: 8px; height: 8px; border: 2px solid var(--frame); background: var(--ink2); }
.pill:is([data-state=opening], [data-state=closing]) .lamp { animation: pulse 1.6s steps(2) infinite; }
.pill[data-state=open] { background: var(--green-soft); color: var(--green); }
.pill[data-state=open] .lamp { background: var(--green-fill); }
.pill[data-state=paused] { background: var(--amber-soft); color: var(--amber); }
.pill[data-state=paused] .lamp { background: var(--amber-fill); }
.pill[data-state=limit] { background: var(--amber-soft); color: var(--amber); }
.pill[data-state=limit] .lamp { background: var(--amber-fill); }
.pill[data-state=error] { background: var(--red-soft); color: var(--red); }
.pill[data-state=error] .lamp { background: var(--red-fill); }
.divider { width: 3px; height: 24px; background: var(--line); }
.spend, .today { display: flex; align-items: center; gap: 8px; }
.today { gap: 6px; }
.meter { display: block; width: 100px; height: 14px; border: 2px solid var(--frame); background: var(--panel2); padding: 2px; }
.meter > span { display: block; width: var(--fill, 0%); height: 100%; background: repeating-linear-gradient(90deg, var(--ink2) 0 6px, transparent 6px 8px); }
.spacer { flex: 1; }
body:is([data-mode=opening], [data-mode=error]) :is(.divider, #spend, #today) { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 3px solid var(--frame);
  background: var(--btn);
  color: var(--ink);
  box-shadow: inset -3px -3px 0 var(--btn-shade), inset 3px 3px 0 var(--hi);
  font-family: var(--pixel);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { flex: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn[aria-pressed=true], .btn:not(:disabled):active { background: var(--btn-shade); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .2); }
.btn.accent { background: var(--accent); color: var(--on-accent); box-shadow: inset -3px -3px 0 var(--accent-shade), inset 3px 3px 0 rgba(255, 255, 255, .3); }
.btn.accent[aria-pressed=true], .btn.accent:not(:disabled):active { background: var(--accent-shade); color: #FFFFFF; box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .3); }
.btn.warn { gap: 6px; padding: 0 10px; background: var(--amber-soft); color: var(--amber); }
.btn.mid { height: 36px; }
.btn.big { position: relative; height: 44px; padding: 0 14px; font-size: 12px; }
.btn.big.accent { padding: 0 16px; }
.btn.huge { height: 64px; padding: 0 24px; border-width: 4px; font-size: 20px; box-shadow: inset -4px -4px 0 var(--btn-shade), inset 4px 4px 0 var(--hi); }
.btn.huge.accent { box-shadow: inset -4px -4px 0 var(--accent-shade), inset 4px 4px 0 rgba(255, 255, 255, .3); }
.badge {
  position: absolute;
  right: -10px;
  top: -12px;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border: 2px solid var(--frame);
  background: #F2B13E;
  color: #2A211B;
  font-size: 11px;
}
.ref {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--frame);
  background: var(--panel2);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}
.ref.small { height: 18px; padding: 0 4px; font-size: 9.5px; vertical-align: 1px; }
.head .ref { border-color: var(--head-ink); background: none; color: inherit; }

/* HUD windows. They stack among themselves, under the top bar and the HUD bar. A window the
   client moved or resized is placed by windows.js. */
.windows { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.windows > .window { pointer-events: auto; }
.window {
  position: fixed;
  z-index: 5;
  border: 3px solid var(--frame);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--hi), 0 4px 0 rgba(0, 0, 0, .35);
}
.window.placed { right: auto; bottom: auto; transform: none; max-width: none; }
.window > .head { cursor: grab; }
.window.moving > .head { cursor: grabbing; }
.window:is([data-edge=l], [data-edge=r]), .window:is([data-edge=l], [data-edge=r]) * { cursor: ew-resize; }
.window[data-edge=b], .window[data-edge=b] * { cursor: ns-resize; }
.window[data-edge=br], .window[data-edge=br] * { cursor: nwse-resize; }
.window[data-edge=bl], .window[data-edge=bl] * { cursor: nesw-resize; }
/* The grip in a resizable window's corner, three steps of pixels */
.window.resizable::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 2px; height: 2px; background: var(--muted); box-shadow: -4px 0 var(--muted), -8px 0 var(--muted), 0 -4px var(--muted), 0 -8px var(--muted), -4px -4px var(--muted); pointer-events: none; }
.head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 4px 0 12px;
  background: var(--head);
  color: var(--head-ink);
  border-bottom: 3px solid var(--frame);
  font-family: var(--pixel);
  font-size: 12px;
}
.head .sub { opacity: .7; font-size: 10px; }
.head .count { min-width: 20px; height: 20px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--frame); background: #F2B13E; color: #2A211B; font-size: 10px; }
.close { margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; color: inherit; cursor: pointer; }
.head-btn { margin-left: auto; height: 24px; padding: 0 8px; border: 2px solid var(--head-ink); background: none; color: inherit; font-family: var(--pixel); font-size: 10px; cursor: pointer; }
.head-btn[aria-expanded=true] { background: var(--head-ink); color: var(--head); }
.head-btn + .close { margin-left: 0; }

.side { left: 16px; top: 64px; width: 340px; max-height: calc(100vh - 160px); display: flex; flex-direction: column; }
.side.wide { width: 448px; }
.side.settings { width: 560px; }
.side.work { width: 420px; }
.side > .scroll { overflow-y: auto; min-height: 0; }

/* Settings */
.btn.icon { padding: 0 9px; }
.settings-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.setting { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--field); border: 2px solid var(--line); }
.setting-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.setting-name { font-family: var(--pixel); font-size: 11px; }
.setting-help { font-size: 12.5px; color: var(--ink2); user-select: text; }
.setting-note { margin: 0; font-size: 12px; color: var(--muted); }
.side.settings .settings-body { flex: 1; min-height: 0; overflow-y: auto; gap: 8px; }
.limits-intro { display: flex; flex-direction: column; gap: 3px; }
.limit { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: start; padding: 9px 12px; background: var(--field); border: 2px solid var(--line); }
.limit.changed { background: var(--accent-soft); border-color: var(--accent); }
.limit.bad { border-color: var(--red); }
.limit-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.limit-text .setting-help { line-height: 1.4; text-wrap: pretty; }
.limit-spent { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.meter.wide { position: relative; width: auto; height: 12px; }
.meter.wide > span:first-child { background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 9px); }
.meter .mark { position: absolute; left: 80%; top: -4px; bottom: -4px; width: 2px; height: auto; background: var(--ink2); }
.limit-field { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.radio-pair { display: inline-flex; }
.radio-pair .radio { height: 24px; padding: 0 8px; border: 2px solid var(--frame); background: var(--btn); color: var(--ink); box-shadow: inset -2px -2px 0 var(--btn-shade), inset 2px 2px 0 var(--hi); font-family: var(--pixel); font-size: 9.5px; cursor: pointer; }
.radio-pair .radio + .radio { border-left: 0; }
.radio-pair .radio.on { background: var(--head); color: var(--head-ink); box-shadow: none; }
.limit-input { display: inline-flex; align-items: center; height: 34px; border: 3px solid var(--frame); background: var(--field); }
.limit.changed .limit-input { border-color: var(--accent); }
.limit.bad .limit-input { border-color: var(--red); }
.limit-input .unit { padding: 0 8px; font-family: var(--pixel); font-size: 10px; color: var(--muted); }
.limit-input .unit:first-child { padding-right: 0; font-size: 12px; }
.limit-input input { width: 52px; height: 28px; border: 0; background: none; color: var(--ink); font-family: var(--pixel); font-size: 13px; text-align: right; outline: none; padding: 0 6px; }
.no-limit { display: inline-grid; place-items: center; height: 34px; padding: 0 12px; border: 2px dashed var(--muted); color: var(--muted); font-family: var(--pixel); font-size: 10px; }
.limit-was { font-family: var(--pixel); font-size: 9.5px; color: var(--accent); }
.limit-problem { max-width: 200px; font-size: 12px; color: var(--red); text-align: right; }
.limits-warning { margin: 0; padding: 8px 10px; border: 2px solid var(--amber); background: var(--amber-soft); color: var(--amber); font-size: 12.5px; }
.settings-body .btn.start { align-self: flex-start; }
.settings-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 3px solid var(--frame); background: var(--panel); }
.settings-foot .changes { font-family: var(--pixel); font-size: 10px; color: var(--accent); }
.btn.toggle { min-width: 64px; height: 36px; justify-content: center; }
.settings-body { max-height: calc(100vh - 200px); overflow-y: auto; }
.credentials { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.setting.cred { align-items: flex-start; }
.cred-actions { display: flex; flex-direction: column; gap: 6px; }
.cred-grant .link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.cred-form { flex-direction: column; align-items: stretch; gap: 8px; }
.cred-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink2); }
.cred-field input { height: 34px; padding: 0 10px; border: 2px solid var(--frame); background: var(--panel2); color: var(--ink); font: 13px var(--mono); }
.cred-problem { font-size: 12.5px; color: var(--red); }
.cred-form .btn { align-self: flex-start; }

/* Pixel portraits */
.avatar { flex: none; display: block; position: relative; overflow: hidden; border: 3px solid var(--frame); background: #CDBA9B; }
.avatar .px-head { position: absolute; background: var(--skin); border: 3px solid #2A211B; border-top-color: var(--hair); }
.avatar .px-body { position: absolute; background: var(--shirt); border: 3px solid #2A211B; }
.avatar.s { width: 36px; height: 36px; border-width: 2px; }
.avatar.s .px-head { left: 8px; top: 3px; width: 16px; height: 16px; border-width: 5px 2px 2px; }
.avatar.s .px-body { left: 2px; top: 17px; width: 28px; height: 18px; border-width: 2px; }
.avatar.m { width: 58px; height: 58px; }
.avatar.m .px-head { left: 14px; top: 6px; width: 24px; height: 24px; border-width: 8px 3px 3px; }
.avatar.m .px-body { left: 4px; top: 28px; width: 44px; height: 30px; }
.avatar.l { width: 68px; height: 68px; }
.avatar.l .px-head { left: 17px; top: 7px; width: 28px; height: 28px; border-width: 9px 3px 3px; }
.avatar.l .px-body { left: 5px; top: 33px; width: 52px; height: 32px; }
/* A face from an LPC look: the idle frame facing the viewer, head and shoulders, at 1x or 2x. */
.avatar .face { position: absolute; inset: 0; background: var(--sheet) no-repeat; image-rendering: pixelated; }
.avatar.s .face { background-size: 128px 256px; background-position: -16px -136px; }
.avatar.m .face { background-size: 256px 512px; background-position: -38px -276px; }
.avatar.l .face { background-size: 256px 512px; background-position: -34px -272px; }
.avatar.vacant { border: 2px dashed var(--muted); background: none; }
.avatar.closed { background: #2B2D33; }
.avatar.vacant > *, .avatar.closed > * { display: none; }

.state { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-family: var(--pixel); font-size: 11px; }
.state .dot { width: 8px; height: 8px; background: currentColor; }

/* Alerts */
.alerts { position: fixed; right: 16px; top: 64px; z-index: 4; width: 320px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alerts.up { z-index: 7; }
.alert {
  width: 100%;
  display: flex;
  align-items: stretch;
  padding: 0;
  border: 3px solid var(--frame);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--hi), 0 3px 0 rgba(0, 0, 0, .3);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.alert .icon { flex: none; width: 40px; display: grid; place-items: center; border-right: 3px solid var(--frame); background: var(--btn); color: var(--ink); }
.alert.amber .icon { background: var(--amber-fill); color: #2A211B; }
.alert.red .icon { background: var(--red-fill); color: #FFFFFF; }
.alert.green .icon { background: var(--green-fill); color: #2A211B; }
.alert .body { flex: 1; min-width: 0; padding: 7px 10px; display: flex; flex-direction: column; gap: 3px; }
.alert .title { font-family: var(--pixel); font-size: 11px; }
.alert.amber .title { color: var(--amber); }
.alert.red .title { color: var(--red); }
.alert.green .title { color: var(--green); }
.alert .text { font-size: 12.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Agent panel */
.agent-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.agent-top { display: flex; gap: 12px; align-items: flex-start; }
.agent-top > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.box { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; background: var(--field); border: 2px solid var(--line); font-size: 12.5px; user-select: text; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; background: var(--panel2); border: 2px solid var(--line); }
.stat .num { font-size: 13px; }
.stat .tiny { font-size: 9.5px; }
.stats .btn { height: auto; min-height: 44px; justify-content: center; gap: 6px; padding: 0 6px; font-size: 10px; }

/* Team panel */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.rows li:last-child .row { border-bottom: 0; }
.row:hover { background: var(--panel2); }
.row.amber { background: var(--amber-soft); }
.row.red { background: var(--red-soft); }
.row > span:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.who { display: flex; align-items: baseline; gap: 8px; }
.who .name { font-family: var(--pixel); font-size: 12px; }
.who .role { font-size: 12px; color: var(--muted); }
.row.off .name { color: var(--muted); }
.row .state { font-size: 10px; }

/* Work panel */
.jobs { list-style: none; margin: 0; padding: 4px 10px; }
.job { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto 52px; align-items: center; column-gap: 8px; row-gap: 3px; padding: 7px 0; border-bottom: 2px solid var(--line); }
.job .ref { justify-self: start; }
.job .what { display: flex; align-items: center; gap: 6px; min-width: 0; font-family: var(--pixel); font-size: 10px; }
.job .agent { font-size: 12px; color: var(--muted); }
.job .cost { text-align: right; font-family: var(--pixel); font-size: 11px; }
.job .title { grid-column: 2 / -1; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 10px; font-family: var(--pixel); font-size: 10px; color: var(--muted); }
.foot .num { color: var(--ink); font-size: 12px; }
.empty { margin: 0; padding: 14px 12px; color: var(--muted); }

/* Needs my input */
.cards { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--field); border: 2px solid var(--line); }
.card .meta { display: flex; align-items: center; gap: 8px; }
.card .from { font-family: var(--pixel); font-size: 10px; color: var(--muted); }
.card .title { font-weight: 600; font-size: 14px; user-select: text; }
.card .text { font-size: 13px; color: var(--ink2); text-wrap: pretty; user-select: text; }
.card .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.card .actions .btn { height: auto; min-height: 36px; padding: 6px 12px; line-height: 1.5; white-space: normal; text-align: left; }
.board-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 12px; padding: 0; border: 0; background: none; color: var(--muted); font-family: var(--pixel); font-size: 10px; cursor: pointer; }
.board-link:hover { text-decoration: underline; }

.card .text.muted { color: var(--muted); font-size: 12.5px; }
.card .answer { display: flex; align-items: stretch; gap: 8px; margin-top: 4px; }
.card .answer input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 3px solid var(--frame);
  box-shadow: inset 3px 3px 0 var(--line);
  background: var(--panel2);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
  user-select: text;
}
.card .answer input:focus-visible { border-color: var(--accent); }
.card .answer .btn { height: auto; }
.card .details { max-height: 220px; overflow-y: auto; padding: 8px 10px; background: var(--panel2); border: 2px solid var(--line); font-size: 12.5px; color: var(--ink2); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }

/* Talk window */
.talk { right: 16px; top: 64px; bottom: 92px; width: 600px; max-height: 740px; display: flex; flex-direction: column; box-shadow: inset 0 0 0 2px var(--hi), 0 6px 0 rgba(0, 0, 0, .35); }
.earlier { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 8px 12px; }
.earlier .empty { padding: 16px 0; color: var(--muted); font-size: 13px; }
.earlier button { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 4px; width: 100%; padding: 10px 0; border: 0; border-bottom: 2px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.earlier button:hover .title { text-decoration: underline; }
.earlier .title { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.earlier .meta { grid-column: 2; font-size: 11px; color: var(--muted); }
.who-row { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel2); border-bottom: 3px solid var(--frame); }
.who-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.who-name { display: flex; align-items: baseline; gap: 8px; }
.who-name .px { font-size: 15px; }
.doing { display: flex; align-items: center; gap: 6px; font-family: var(--pixel); font-size: 10px; }
.doing .dot { width: 8px; height: 8px; background: currentColor; }
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--field);
}
/* New messages start at the bottom, like a chat */
.messages > :first-child { margin-top: auto; }
.hint { color: var(--muted); font-size: 13px; }
.msg { display: flex; flex-direction: column; gap: 4px; }
.msg.you { align-self: flex-end; align-items: flex-end; max-width: 80%; }
.msg.pia { align-self: flex-start; max-width: 88%; }
.bubble { padding: 9px 12px; background: var(--panel); border: 2px solid var(--line); font-size: 14px; line-height: 1.55; user-select: text; overflow-wrap: anywhere; }
.msg.you .bubble { background: var(--accent-soft); white-space: pre-wrap; }
.bubble p { margin: 0; }
.bubble p + p, .bubble p + ul, .bubble ul + p, .bubble ul + ul { margin-top: 8px; }
.bubble ul { margin: 6px 0 0; padding-left: 20px; }
.bubble li + li { margin-top: 3px; }
code { font-family: var(--mono); font-size: 12.5px; padding: 1px 5px; background: var(--panel2); }
.activity { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.activity .line { display: flex; align-items: center; gap: 8px; }
.activity .line svg { flex: none; }
.activity.folded:not(.open) .line:not(:last-child) { display: none; }
.fold { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border: 2px solid var(--line); background: var(--panel); color: var(--ink2); font-family: var(--pixel); font-size: 10px; cursor: pointer; }
.thinking { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; background: var(--panel); border: 2px solid var(--line); font-size: 13px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots span { width: 6px; height: 6px; background: currentColor; }
.saved { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.saved .rule { flex: 1; height: 3px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px); }
.saved .say { display: inline-flex; align-items: center; gap: 6px; text-align: center; }
.chat-error { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; background: var(--red-soft); border: 2px solid var(--red); color: var(--red); font-size: 13px; user-select: text; }
.chat-error svg { flex: none; margin-top: 3px; }
.composer { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; border-top: 3px solid var(--frame); }
.composer .line { display: flex; align-items: stretch; gap: 8px; }
.composer textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  padding: 8px 10px;
  border: 3px solid var(--frame);
  box-shadow: inset 3px 3px 0 var(--line);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  user-select: text;
}
.composer textarea:focus-visible { border-color: var(--accent); }
.composer textarea.is-refused { border-color: var(--red); }
.composer .send { height: auto; padding: 0 16px; font-size: 12px; }
.composer .attach { flex: none; width: 40px; height: auto; padding: 0; justify-content: center; }
.attached { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.attached .chip-s { height: 24px; max-width: 100%; }
.attached .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.attached .size { color: var(--muted); }
.attached .x { border: 0; background: none; color: var(--ink2); font: inherit; font-size: 13px; line-height: 1; padding: 0 2px; cursor: pointer; }
.talk.dropping { outline: 3px dashed var(--accent); outline-offset: -8px; }
.bubble-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.refused { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--red); }
.note { font-size: 12px; color: var(--muted); }

/* HUD bar */
.hud {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 6;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 3px solid var(--frame);
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--hi), 0 4px 0 rgba(0, 0, 0, .35);
}
.hud .sep { width: 3px; height: 32px; background: var(--line); }

/* Opening, closing, could not open, budget used up */
body:not([data-mode=open]) :is(#alerts, .side, .talk, .hud) { display: none !important; }
.status-box {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 20;
  transform: translate(-50%, -50%);
  width: 640px;
  border: 4px solid var(--frame);
  background: var(--panel);
  box-shadow: inset 0 0 0 3px var(--hi), 0 8px 0 rgba(0, 0, 0, .4);
}
.status-box.wide { width: 720px; }
.status-box .title { padding: 14px 20px; background: var(--head); color: var(--head-ink); border-bottom: 4px solid var(--frame); font-family: var(--pixel); font-size: 26px; }
.status-box.error .title { background: var(--red-fill); color: #FFFFFF; }
.status-box .body { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.status-box .say { font-size: 24px; line-height: 1.4; user-select: text; }
.status-box .say code { font-size: 21px; padding: 2px 8px; }
.status-box .detail { padding: 12px 16px; border: 3px solid var(--line); background: var(--field); font-family: var(--mono); font-size: 20px; color: var(--ink2); overflow-wrap: anywhere; user-select: text; }
.status-box .actions { display: flex; justify-content: flex-end; gap: 12px; }
.steps { display: flex; flex-direction: column; gap: 16px; font-family: var(--pixel); font-size: 20px; }
.steps span { display: flex; align-items: center; gap: 14px; }
.steps .mark { width: 64px; white-space: pre; }
.bigmeter { display: block; height: 32px; border: 4px solid var(--frame); background: var(--panel2); padding: 4px; }
.bigmeter > span { display: block; width: var(--fill, 0%); height: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 16px, transparent 16px 20px); transition: width .3s steps(4); }

/* Board and card views: the client's view of the team's work */
.avatar.xs { width: 20px; height: 20px; border-width: 2px; }
.avatar.xs .px-head { left: 4px; top: 2px; width: 9px; height: 9px; border-width: 3px 1px 1px; }
.avatar.xs .px-body { left: 1px; top: 9px; width: 16px; height: 10px; border-width: 1px; }
.avatar.xs .face { background-size: 128px 256px; background-position: -24px -142px; }
.board { left: 16px; right: 16px; top: 64px; bottom: 92px; z-index: 4; display: flex; flex-direction: column; }
.board-tools { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--panel2); border-bottom: 3px solid var(--frame); flex-wrap: wrap; }
.board-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.board-tabs .sep { width: 3px; height: 24px; background: var(--line); }
.btab { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 3px solid var(--frame); background: var(--btn); color: var(--ink); box-shadow: inset -3px -3px 0 var(--btn-shade), inset 3px 3px 0 var(--hi); font-family: var(--pixel); font-size: 11px; cursor: pointer; }
.btab .key { color: var(--muted); font-size: 9.5px; }
.btab.on { background: var(--head); color: var(--head-ink); box-shadow: none; }
.btab.on .key { color: inherit; opacity: .7; }
.board-tools .btn { height: 32px; font-size: 11px; }
.grow { flex: 1; }
.tiny { font-family: var(--pixel); font-size: 9.5px; color: var(--muted); }
.board-cols { flex: 1; min-height: 0; display: flex; gap: 10px; padding: 12px; overflow-x: auto; }
.offboard { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; user-select: text; }
.offboard h2 { margin: 0; font-family: var(--pixel); font-size: 16px; font-weight: 400; }
.offboard ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
.offboard-note, .offboard-error { margin: 0; padding: 8px 10px; border: 2px solid var(--amber); background: var(--amber-soft); font-size: 13px; }
.offboard-error { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.offboard-done { margin: 0; font-size: 14px; color: var(--green); }
.offboard-folder { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offboard-folder .btn { height: 28px; font-size: 10px; }
.offboard-files summary { cursor: pointer; font-size: 13px; }
.offboard-files ul { margin-top: 6px; font-family: var(--mono); font-size: 12px; }
.offboard-confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 2px solid var(--red); background: var(--red-soft); }
.offboard-confirm .tiny { color: var(--red); }
.offboard-confirm input { width: 110px; height: 32px; padding: 0 10px; border: 2px solid var(--frame); background: var(--field); color: var(--ink); font: 14px var(--mono); text-transform: uppercase; }
.offboard-confirm .btn { height: 36px; font-size: 11px; }
.offboard-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offboard-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.offboard-steps .keys-step { background: var(--field); }
.offboard-progress { list-style: none; padding: 0 !important; }
.offboard-progress li { display: flex; align-items: center; gap: 8px; }
.offboard-progress svg { color: var(--green); }
.grow-text { flex: 1; min-width: 160px; font-size: 12.5px; color: var(--ink2); }

/* The project toolbar and the project page. */
.btab .budget-square { width: 8px; height: 8px; border: 2px solid var(--frame); background: var(--amber-fill); }
.board-lock { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--line); background: var(--panel); color: var(--muted); }
.budget-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 9px; border: 2px solid var(--line); background: var(--panel); color: var(--ink2); font-family: var(--pixel); font-size: 10px; cursor: pointer; }
.budget-chip.amber { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.view-switch { display: inline-flex; }
.view-switch .btn { height: 32px; font-size: 10px; }
.view-switch .btn + .btn { border-left: 0; }
.view-switch .btn.on { background: var(--head); color: var(--head-ink); box-shadow: none; }
.plink { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.plink.tiny { font-family: var(--pixel); font-size: 9.5px; }
.plink.head { color: inherit; text-decoration: none; }
.plink:hover { text-decoration-style: solid; }
.chip-s.tone-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip-s.tone-muted { color: var(--muted); }
.chip-s.tone-ink { border-color: var(--frame); color: var(--ink); }
.tiny.ink { color: var(--ink); }
.btn.amber { background: var(--amber-fill); color: #2A211B; }
.project-loading { padding: 16px; }
.project { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.project-head { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-head h2 { margin: 0; font-family: var(--pixel); font-size: 18px; font-weight: 400; }
.project-desc { font-size: 13px; color: var(--ink2); }
.project-head input { height: 32px; padding: 0 8px; border: 3px solid var(--frame); background: var(--field); color: var(--ink); font: 14px var(--sans, inherit); }
.project-head input.wide { flex: 1; min-width: 240px; }
.project-problem { width: 100%; font-size: 12.5px; color: var(--red); }
.project-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.project-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pbox { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--field); border: 2px solid var(--line); font-size: 13px; min-width: 0; }
.pbox p { margin: 0; font-size: 12.5px; }
.pbox-head { display: flex; align-items: center; gap: 8px; }
.budget-amount { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.budget-amount .big { font-family: var(--pixel); font-size: 22px; }
.budget-amount .tiny { font-size: 11px; }
.budget-amount .tiny:last-child { font-size: 9.5px; }
.budget-meter { position: relative; display: block; height: 16px; border: 2px solid var(--frame); background: var(--panel2); padding: 2px; }
.budget-meter .fill { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 9px); }
.budget-meter.tone-amber .fill { background: repeating-linear-gradient(90deg, var(--amber-fill) 0 7px, transparent 7px 9px); }
.budget-meter .mark { position: absolute; left: 80%; top: -4px; bottom: -4px; width: 2px; background: var(--ink2); }
.budget-meter .end { position: absolute; right: -2px; top: -5px; bottom: -5px; width: 3px; background: var(--frame); }
.budget-note { padding: 8px 10px; border: 2px solid var(--line); background: var(--panel2); color: var(--ink2); }
.budget-note.amber { border-color: var(--amber); background: var(--amber-soft); }
.budget-note.red { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.budget-saved { padding: 8px 10px; border: 2px solid var(--green); background: var(--green-soft); color: var(--green); }
.budget-edit, .budget-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.budget-edit label { font-size: 10px; color: var(--ink); }
.budget-row .btn { height: 30px; font-size: 10px; }
.budget-hint { color: var(--muted); }
.budget-only { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); }
.went, .months { display: flex; flex-direction: column; gap: 6px; }
.went-split { display: flex; height: 12px; border: 2px solid var(--frame); }
.went-split > span + span { border-left: 2px solid var(--frame); }
.went-cards { background: var(--accent); }
.went-team { background: #D9824B; }
.went-chats { background: var(--green-fill); }
.went-retros { background: var(--muted); }
.went-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.went-rows li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 6px; align-items: baseline; font-size: 12px; }
.went-rows .tiny { color: var(--ink); font-size: 10px; }
.went-rows .cost, .pcost .cost { font-family: var(--pixel); font-size: 11px; }
.swatch { width: 10px; height: 10px; border: 2px solid var(--frame); }
.months-chart { position: relative; display: flex; gap: 8px; }
.month { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.month-bar { display: flex; align-items: flex-end; width: 70%; height: 34px; border-bottom: 2px solid var(--line); }
.month-fill { display: block; width: 100%; background: repeating-linear-gradient(0deg, var(--ink2) 0 5px, transparent 5px 7px); }
.months-budget { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--amber); }
.pcode { display: flex; flex-direction: column; gap: 3px; }
.pcode-head { display: flex; align-items: center; gap: 6px; }
.plinks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plinks > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plink-url { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--accent); font: 12px var(--mono); cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.pbox .btn.start, .ptodo .btn.start { align-self: flex-start; height: 30px; font-size: 10px; }
.plook { display: flex; gap: 10px; align-items: flex-start; }
.plook-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.plook-text .tiny { font-size: 11px; }
.pcred { display: flex; align-items: center; gap: 8px; }
.pcred .name { font-family: var(--pixel); font-size: 10.5px; }
.pbox .bactions .btn { height: 30px; font-size: 10px; }
.pwork { list-style: none; margin: 0; padding: 0; }
.pwork li { display: flex; flex-direction: column; gap: 2px; padding: 3px 0; border-bottom: 2px solid var(--line); font-size: 12px; }
.pwork-top { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.pwork-top .tiny { font-size: 10px; }
.ptodo { display: flex; flex-direction: column; gap: 5px; padding-left: 8px; border-left: 4px solid var(--amber-fill); }
.ptodo-meta { display: flex; align-items: center; gap: 6px; }
.prequests { display: flex; flex-direction: column; gap: 5px; }
.prequests .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pcost { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pcost li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 12.5px; }
.project-foot { flex: none; display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 3px solid var(--frame); }
.btn.offboard-out { background: var(--field); border-color: var(--red); color: var(--red); box-shadow: none; height: 30px; font-size: 10px; }
.board-col { flex: 1 1 0; min-width: 210px; display: flex; flex-direction: column; background: var(--panel2); border: 2px solid var(--line); }
.board-col-head { flex: none; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-bottom: 2px solid var(--line); font-family: var(--pixel); font-size: 11px; color: currentColor; }
.board-col.tone-ink { color: var(--ink); }
.board-col .count { min-width: 20px; height: 20px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--frame); background: var(--panel); color: var(--ink); font-size: 10px; }
.board-col .count.hot { background: #F2B13E; color: #2A211B; }
.board-col ul { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; color: var(--ink); }
.board-col .empty { padding: 8px 2px; font-size: 12.5px; color: var(--muted); }
.bcard { display: flex; flex-direction: column; gap: 7px; padding: 10px; background: var(--field); border: 2px solid var(--line); border-left: 6px solid var(--line); cursor: pointer; }
.bcard:hover { border-color: var(--frame); border-left-color: inherit; }
.bcard.edge-amber { border-left-color: var(--amber-fill); }
.bcard.edge-accent { border-left-color: var(--accent); }
.bcard.edge-green { border-left-color: var(--green-fill); }
.bcard.edge-red { border-left-color: var(--red-fill); }
.bcard-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bcard-title { font-weight: 600; font-size: 13px; line-height: 1.35; color: var(--ink); text-wrap: pretty; }
.bcard-title.muted { color: var(--muted); }
.bline, .bstate { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-family: var(--pixel); font-size: 10px; color: var(--muted); }
.bline .cost, .bfoot .cost { color: var(--ink); font-size: 11px; }
.bfoot { display: flex; align-items: center; gap: 6px; }
.bfoot .who { font-size: 12px; color: var(--muted); }
.bfoot .cost { font-family: var(--pixel); }
.pips { display: flex; height: 10px; border: 2px solid var(--frame); background: var(--panel2); }
.pip { flex: 1; height: 100%; }
.pip + .pip { border-left: 2px solid var(--frame); }
.pip.done { background: var(--green-fill); }
.pip.active { background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 5px); }
.ref.quiet { background: none; border-color: var(--line); color: var(--muted); }
.try { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font-family: var(--pixel); font-size: 10px; color: var(--accent); text-decoration: underline; cursor: pointer; }
.bactions { display: flex; flex-wrap: wrap; gap: 6px; }
.bactions .btn, .bcard .btn.answer { height: 30px; padding: 0 9px; font-size: 10px; }
.bcard .btn.answer { align-self: flex-start; }
.bconfirm { display: flex; flex-direction: column; gap: 8px; padding: 9px; border: 2px solid var(--red); background: var(--red-soft); font-size: 12.5px; cursor: default; }
.card-view { left: 50%; top: 74px; bottom: 102px; z-index: 8; width: 720px; max-width: calc(100vw - 48px); transform: translateX(-50%); display: flex; flex-direction: column; }
.card-view.wide { width: 972px; }
.card-view .ref-head { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 5px; border: 2px solid var(--head-ink); font-size: 10px; }
.card-view .cv-head-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-view > .empty { padding: 16px; color: var(--muted); }
.cv-meta { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel2); border-bottom: 3px solid var(--frame); font-family: var(--pixel); font-size: 10px; flex-wrap: wrap; }
.cv-meta .cost { font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px; border: 2px solid var(--frame); background: var(--panel); }
.chip.tone-green { background: var(--green-soft); }
.chip.tone-amber { background: var(--amber-soft); }
.chip.tone-accent { background: var(--accent-soft); }
.cv-with, .cv-for { display: inline-flex; align-items: center; gap: 6px; }
.cv-for-title { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.cv-body, .cv-col { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cv-cols { flex: 1; min-height: 0; display: flex; }
.cv-cols .cv-col + .cv-col { border-left: 3px solid var(--frame); }
.cv-section { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cv-section .rule { flex: 1; height: 2px; background: var(--line); }
.cv-title { font-weight: 600; font-size: 14px; }
.rich { font-size: 13px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; user-select: text; }
.rich p { margin: 0; }
.rich p + p, .rich p + ul, .rich ul + p { margin-top: 8px; }
.rich ul { margin: 4px 0 0; padding-left: 20px; }
.cv-note { display: flex; gap: 10px; padding: 12px; background: var(--panel2); border: 2px solid var(--line); }
.cv-note.ready { background: var(--green-soft); border-color: var(--green); }
.cv-comment { display: flex; gap: 8px; }
.cv-comments, .cv-built, .cv-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.avatar-blank { flex: none; width: 20px; height: 20px; border: 2px dashed var(--line); }
.cv-comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cv-who { display: flex; gap: 8px; font-family: var(--pixel); font-size: 10px; }
.cv-built li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 52px; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.cv-built-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cv-built-title { font-size: 13px; }
.cv-built .cost, .cv-run-top .cost { text-align: right; font-family: var(--pixel); font-size: 11px; }
.cv-stands { display: flex; align-items: center; gap: 12px; }
.cv-cost { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cost.big { font-family: var(--pixel); font-size: 16px; }
.cv-runs li { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.cv-run-top { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 10px; }
.cv-run-sessions, .cv-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-run-sessions .btn, .cv-filters .btn { height: 28px; padding: 0 8px; font-size: 10px; }
.cv-summary { display: block; }
.cv-session { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font: 12px/1.45 var(--mono); }
.cv-entry { display: grid; grid-template-columns: 44px 64px minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.cv-entry .kind { font-family: var(--pixel); font-size: 9.5px; color: var(--muted); }
.cv-entry .text { white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.cv-entry.error .kind, .cv-entry.error .text { color: var(--red); }
.cv-entry.refused .kind { color: var(--amber); }
.cv-entry.agent .text { font-family: var(--sans); }
.cv-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 3px solid var(--frame); background: var(--panel2); flex-wrap: wrap; font-size: 12.5px; }
.bcard-meta .ref, .bline .ref, .bstate .ref, .cv-built .ref, .cv-for .ref { flex: none; white-space: nowrap; }
.bcard-meta .tiny { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Credentials: its own window, the same size as the board */
.keys-strip { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel2); border-bottom: 3px solid var(--frame); flex-wrap: wrap; font-size: 12.5px; }
.keys-strip .chip { font-family: var(--pixel); font-size: 10px; }
.keys-strip .btn { height: 32px; font-size: 11px; }
.keys-body { flex: 1; min-height: 0; display: flex; }
.keys-left { flex: none; width: 400px; max-width: 45%; display: flex; flex-direction: column; border-right: 3px solid var(--frame); min-height: 0; }
.keys-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 14px; }
.keys-group { display: flex; flex-direction: column; gap: 6px; }
.keys-group-head { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 11px; color: var(--ink); }
.keys-group-head .count { min-width: 20px; height: 20px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--frame); background: var(--panel); font-size: 10px; }
.keys-sub { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.cred-item { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 9px 10px; border: 2px solid var(--line); background: var(--field); color: var(--ink); text-align: left; cursor: pointer; }
.cred-item:hover { border-color: var(--frame); }
.cred-item.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cred-item.revoked { opacity: .6; }
.cred-item.needs { border-left: 6px solid var(--amber-fill); }
.mono-chip { font-family: var(--mono); font-size: 11px; text-transform: none; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono-chip.big { height: 26px; font-size: 13px; user-select: text; }
.small-text { font-size: 12px; }
.cred-item-top { display: flex; align-items: center; gap: 6px; }
.cred-name { font-family: var(--pixel); font-size: 11px; }
.cred-desc { font-size: 12.5px; color: var(--ink2); line-height: 1.4; }
.cred-chips, .keys-hosts, .keys-toggles { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.chip-s { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border: 2px solid var(--line); background: var(--panel); font-family: var(--pixel); font-size: 9.5px; color: var(--ink2); }
.chip-s.tone-green { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.chip-s.tone-amber { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.chip-s.tone-red { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.cv-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cv-file { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; background: var(--panel2); border: 2px solid var(--line); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.cv-file:hover, .cv-file:focus-visible { border-color: var(--accent); }
.cv-file .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chip-s.tone-accent { border-color: var(--accent); color: var(--accent); }
.chip-s.granted .avatar { margin-left: -2px; }
.chip-s.link, .chip-s.toggle { cursor: pointer; }
.chip-s.toggle.on { background: var(--head); color: var(--head-ink); border-color: var(--frame); }
.chip-s .x { padding: 0 2px; border: 0; background: none; color: inherit; cursor: pointer; font-size: 13px; }
.keys-none { display: flex; flex-wrap: wrap; gap: 6px; }
.keys-rules { flex: none; padding: 10px 12px; border-top: 3px solid var(--frame); background: var(--panel2); display: flex; flex-direction: column; gap: 6px; }
.keys-rules ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink2); }
.keys-rules li { display: flex; gap: 8px; align-items: flex-start; }
.keys-rules li svg { flex: none; margin-top: 3px; }
.keys-empty { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink2); }
.keys-pane { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
/* The Models window's right side: the pane scrolls, the footer stays, as in Settings. */
.models-right { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
/* Its model map's inputs sit in a line, not a field: give them the form's input look. */
.models-right .keys-value-line input { min-width: 110px; padding: 7px 9px; border: 2px solid var(--frame); background: var(--field); color: var(--ink); font: 13px var(--mono); }
.keys-pane h2 { margin: 0; font-family: var(--pixel); font-size: 14px; font-weight: 400; }
.keys-detail-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.keys-detail-top .chip { font-family: var(--pixel); font-size: 10px; }
.keys-title { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.keys-desc { margin: 0; font-size: 14px; line-height: 1.5; user-select: text; }
.keys-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.keys-prepared { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 2px solid var(--amber); background: var(--amber-soft); font-size: 12.5px; color: var(--ink2); }
.keys-prepared strong { color: var(--amber); font-weight: 400; }
.keys-dfield { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.keys-dfield-head { display: flex; align-items: center; gap: 8px; }
.keys-dfield textarea, .keys-dfield input, .keys-value input { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 3px solid var(--frame); background: var(--field); color: var(--ink); font: 13px var(--mono); }
.keys-dfield textarea { min-height: 60px; font-family: inherit; resize: vertical; }
.keys-dfield.editing { padding: 8px; border: 2px solid var(--accent); background: var(--accent-soft); }
.btn.small { height: 24px; padding: 0 7px; font-size: 9.5px; }
.keys-value { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 2px solid var(--line); background: var(--field); }
.keys-value-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.keys-value-line input { flex: 1; min-width: 200px; width: auto; }
.keys-value .bactions .btn, .keys-value-line .btn { height: 30px; font-size: 10px; }
.dots { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; color: var(--ink2); }
.keys-warning { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; border: 2px solid var(--amber); background: var(--amber-soft); color: var(--ink2); font-size: 12.5px; }
.keys-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.keys-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.keys-choice-card { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 2px solid var(--line); background: var(--field); color: var(--ink); text-align: left; cursor: pointer; }
.keys-choice-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.keys-choice-card .tiny { color: var(--ink); }
.pcred .plink.name { font-family: var(--pixel); font-size: 10.5px; color: var(--ink); }
.keys-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 10px 12px; background: var(--panel2); border: 2px solid var(--line); user-select: text; }
.keys-fields > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mono { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.keys-test { display: flex; align-items: center; gap: 10px; font-size: 12.5px; flex-wrap: wrap; }
.keys-test > span, .keys-uses li { user-select: text; }
.keys-confirm { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px solid var(--red); background: var(--red-soft); font-size: 12.5px; }
.keys-confirm strong { font-family: var(--pixel); font-size: 11px; color: var(--red); font-weight: 400; }
.btn.danger { background: var(--red-fill); color: #FFFFFF; }
.keys-who, .keys-uses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.keys-who li { display: flex; align-items: center; gap: 10px; }
.keys-who .faces { display: flex; gap: 2px; }
.who-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.who-text strong { font-family: var(--pixel); font-size: 10px; font-weight: 400; }
.who-others { font-size: 12.5px; }
.keys-who .btn, .keys-test .btn { height: 28px; font-size: 10px; }
.keys-uses li { display: grid; grid-template-columns: 70px 90px auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 12px; }
.use-who { display: flex; align-items: center; gap: 6px; }
.use-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keys-form-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.keys-form-cols > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.keys-step { margin: 0; padding: 10px 12px 12px; border: 2px solid var(--line); background: var(--panel2); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.keys-step.bad { border-color: var(--red); }
.keys-step legend { display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.step { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border: 2px solid var(--frame); background: var(--head); color: var(--head-ink); font-family: var(--pixel); font-size: 10px; }
.keys-choice { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 2px solid var(--line); background: var(--field); }
.keys-choice.on { border-color: var(--accent); }
.keys-choice .choice { display: flex; flex-direction: column; gap: 3px; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.keys-field { display: flex; flex-direction: column; gap: 4px; }
.keys-field input, .keys-field textarea, .keys-hosts input { padding: 7px 9px; border: 2px solid var(--frame); background: var(--field); color: var(--ink); font: 13px var(--mono); }
.keys-field textarea { min-height: 64px; font-family: var(--sans); resize: vertical; }
.keys-hosts input { flex: 1; min-width: 140px; height: 30px; padding: 0 8px; }
.keys-field.bad input, .keys-field.bad textarea { border-color: var(--red); }
.keys-help { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.keys-problem { font-size: 12px; color: var(--red); }
.keys-commands { display: flex; align-items: center; gap: 10px; }
.keys-commands-text { display: flex; flex-direction: column; gap: 2px; }
.keys-preview { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 2px dashed var(--line); font-size: 12.5px; }
.keys-from { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--amber-soft); border: 2px solid var(--amber); font-size: 12.5px; }
.keys-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.keys-steps > li { display: flex; gap: 10px; align-items: flex-start; }
.keys-steps > li > div { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; }
.keys-steps p { margin: 0; }
.keys-steps code { font-family: var(--mono); font-size: 12px; padding: 1px 4px; background: var(--panel2); }
.keys-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.keys-way { padding: 8px 10px; border: 2px solid var(--line); background: var(--field); display: flex; flex-direction: column; gap: 4px; }
.keys-way.now { border-color: var(--green); }
.keys-way .tiny { display: flex; gap: 6px; align-items: center; }
.keys-example { padding: 8px 10px; background: var(--panel2); border: 2px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.board-tools .btn .count { min-width: 18px; height: 18px; padding: 0 3px; display: grid; place-items: center; border: 2px solid var(--frame); background: var(--panel); color: var(--ink); font-size: 9.5px; }
.board-tools .btn .count.amber { background: var(--amber-fill); color: #2A211B; }

/* Team panel: change a teammate's look */
.rows li { position: relative; }
.rows li.has-look .row { padding-right: 78px; }
.look-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); height: 26px; gap: 5px; padding: 0 7px; font-size: 9.5px; }
.look-btn.on { background: var(--btn-shade); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .2); }

/* The look editor, beside the team panel */
.look { left: 372px; top: 64px; bottom: 92px; width: 660px; max-width: calc(100vw - 388px); z-index: 6; display: flex; flex-direction: column; }
.look-stage { flex: none; display: flex; align-items: flex-end; gap: 10px; padding: 12px; background: var(--panel2); border-bottom: 3px solid var(--frame); }
.look-tile { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.look-tile > .lpc { border: 2px solid var(--line); background-color: #CDBA9B; box-sizing: content-box; }
.look-tile .tiny { color: var(--ink2); }
.face-tile { margin-left: auto; align-self: stretch; justify-content: flex-end; }
.look-turn { display: flex; align-items: center; gap: 6px; }
.look-turn .btn { height: 26px; padding: 0 6px; }
.look-turn .tiny { min-width: 96px; text-align: center; }
.look-body { flex: 1; min-height: 0; overflow-y: auto; }
.look-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.look-row { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--field); border: 2px solid var(--line); }
.look-row-top { display: flex; align-items: center; gap: 4px; }
.look-label { width: 82px; flex: none; font-family: var(--pixel); font-size: 10px; color: var(--muted); }
.look-part { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-family: var(--pixel); font-size: 10.5px; }
.look-part.none { color: var(--muted); }
.btn.small { height: 24px; padding: 0 5px; border-width: 2px; box-shadow: inset -2px -2px 0 var(--btn-shade), inset 2px 2px 0 var(--hi); }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.swatches .swatch { width: 18px; height: 18px; padding: 0; border: 2px solid var(--frame); background: var(--swatch); cursor: pointer; }
.swatches .swatch.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.look-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 3px solid var(--frame); background: var(--panel2); }
.look-problem { flex: none; margin: 0; padding: 8px 12px; background: var(--red-soft); color: var(--red); font-size: 12.5px; border-top: 2px solid var(--line); }
.look-credits { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.look-note { margin: 0; font-size: 12.5px; color: var(--ink2); user-select: text; }
.credit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.credit { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; background: var(--field); border: 2px solid var(--line); }
.credit-top { display: flex; align-items: center; gap: 8px; }
.credit-part { font-family: var(--pixel); font-size: 10px; }
.credit-authors { font-size: 12px; color: var(--ink2); user-select: text; }
.credit-link { margin: 0; }

/* Hiring: hires under way in the team panel, and the hire card under Cards with three candidates
   side by side, like picking a character. */
.who .chip-s.new { height: 16px; padding: 0 4px; font-size: 8.5px; align-self: center; }
.hire-faces { flex: none; display: flex; gap: 2px; }
.row.hiring .who { min-width: 0; }
.row.hiring .who .role { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidates { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.candidate { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 6px; background: var(--panel); border: 2px solid var(--frame); box-shadow: inset 0 0 0 2px var(--hi); }
.cand-tile { display: grid; place-items: center; height: 96px; overflow: hidden; border: 2px solid var(--frame); background: repeating-conic-gradient(#2E2620 0 25%, #241E19 0 50%) 0 0 / 16px 16px; }
.cand-name { font-family: var(--pixel); font-size: 12px; }
.cand-role { margin-top: -4px; font-size: 12px; color: var(--muted); }
.cand-pitch { font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--accent); text-wrap: pretty; }
.cand-config, .cand-skills { display: flex; flex-wrap: wrap; gap: 3px; }
.candidate .chip-s { height: auto; min-height: 18px; max-width: 100%; padding: 1px 4px; font-size: 9px; overflow-wrap: anywhere; }
.cand-label { margin-top: 2px; font-family: var(--pixel); font-size: 9px; color: var(--muted); }
.cand-summary { font-size: 11.5px; line-height: 1.4; color: var(--ink2); text-wrap: pretty; user-select: text; }
.cand-none { font-size: 11px; color: var(--muted); }
.cand-cost { margin-top: auto; padding-top: 2px; font-family: var(--pixel); font-size: 10px; }
.candidate .cand-hire { height: auto; min-height: 32px; padding: 4px 6px; justify-content: center; font-size: 10px; white-space: normal; text-align: center; }
.bcard .hire-faces { margin-top: -2px; }

/* The login page, and the project's folder on its page. */
.login-page { display: grid; place-items: center; min-height: 100vh; margin: 0; background: #1E1A17; }
.login-box { width: min(340px, calc(100vw - 32px)); padding: 24px; background: #FFFDF8; color: #2A211B; border: 3px solid #2A211B; box-shadow: 6px 6px 0 rgba(0, 0, 0, .35); }
.login-box h1 { margin: 0 0 18px; font-family: var(--pixel); font-size: 18px; font-weight: 400; }
.login-form { display: grid; gap: 8px; }
.login-form input { font: inherit; padding: 8px; border: 2px solid #2A211B; background: #fff; color: inherit; }
.login-form button { justify-self: start; margin-top: 6px; }
.login-problem { margin: 0; color: #B3261E; }
.login-note { margin: 0; line-height: 1.4; }
.claude-signin { display: grid; gap: 10px; justify-items: start; margin-top: 12px; }
.claude-signin-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.claude-signin .claude-code { font: inherit; width: min(420px, 100%); padding: 8px; border: 2px solid var(--ink, #2A211B); background: #fff; color: #2A211B; }
.login-form a.btn { justify-self: start; margin-top: 6px; text-decoration: none; }
.plink-folder { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-top: 10px; }
.plink-folder .mono { word-break: break-all; }
.completo .keys-form { overflow: auto; }
.completo .actions { display: flex; gap: 8px; margin: 12px 0; }
.completo-result { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.completo-result li { display: flex; gap: 6px; align-items: baseline; }
