/* --- Theme: charter v2, shared by the office and the Pro page. Neutrals do the layout; colour only says state, with
   three hues (amber = needs you, green = working and the main control, red = failed). One family, Roboto. --- */
@font-face { font-family: 'Roboto'; src: url('fonts/Roboto-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
:root {
  --cb-bg: #121212;       /* page, and the office's canvas around the room */
  --cb-surface: #1c1c1c;  /* panels, cards, bars */
  --cb-raised: #262626;   /* hover, active, quiet buttons */
  --cb-line: #2e2e2e;     /* hairlines; the edge of what floats over the canvas */
  --cb-text: #f2f2f2;
  --cb-text-2: #b3b3b3;
  --cb-text-3: #8c8c8c;
  --cb-green: #44d62c;
  --cb-amber: #ffb000;
  --cb-red: #ff5a4f;
  --cb-on-accent: #0b0c0e;
  --cb-font: 'Roboto', system-ui, 'Segoe UI', sans-serif;
  --cb-mono: ui-monospace, 'Cascadia Code', Consolas, monospace; /* code only */
  --cb-r: 8px;
  --cb-r-sm: 6px;

  /* The office's former names, on the same values */
  --bg: var(--cb-bg);
  --bg-panel: var(--cb-surface);
  --bg-hover: var(--cb-raised);
  --border: var(--cb-line);
  --text: var(--cb-text);
  --text-muted: var(--cb-text-2);
  --font-ui: var(--cb-font);
  --font-mono: var(--cb-mono);
  color-scheme: dark;
}

/* --- Base --- */
/* A page for signed-in accounts stays hidden until gate.js has checked the token with the hub. */
.gated body { visibility: hidden; }
/* hidden always hides: a rule that sets display (a button's inline-flex) must not bring an element back */
[hidden] { display: none !important; }
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--cb-bg);
  color: var(--cb-text);
  font: 14px/1.45 var(--cb-font);
  font-variant-numeric: tabular-nums;
}
:where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--cb-green); outline-offset: 2px; }

#scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.muted { color: var(--cb-text-3); }

/* A quiet button (the default) and the one main button: shared by the bars, panels and windows below. */
.quiet,
.userbar button,
.userbar a,
.camctl button,
.camctl select,
.card-button,
.inbox-head button,
.inbox-focus,
.labpanel-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  box-sizing: border-box;
  background: none;
  color: var(--cb-text-2);
  border: 0;
  border-radius: var(--cb-r-sm);
  font: 13px var(--cb-font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.userbar button:hover, .userbar a:hover, .camctl button:hover, .camctl select:hover, .card-button:hover,
.inbox-head button:hover, .inbox-focus:hover, .labpanel-buttons button:hover { background: var(--cb-raised); color: var(--cb-text); }
.userbar button.active, .camctl button.active, .labpanel-buttons button.active { background: var(--cb-raised); color: var(--cb-text); }
.card-button, .inbox-focus, .inbox-head button { background: var(--cb-raised); }
:where(button):disabled { opacity: 0.5; cursor: default; }
.userbar .primary,
.modal-action,
.auth-actions button {
  background: var(--cb-green);
  color: var(--cb-on-accent);
  font-weight: 600;
}
.userbar .primary:hover, .modal-action:hover:not(:disabled), .auth-actions button:hover { background: var(--cb-green); color: var(--cb-on-accent); filter: brightness(1.08); }

/* Panels floating over the canvas: a surface with a hairline edge (the room is busy behind them), no shadow. */
.card, .camctl, .labpanel, .lift, .userbar, .inbox, .status {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-r);
}

/* --- Loading screen (until the hub sends the first state) --- */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cb-bg);
  color: var(--cb-text-3);
  font-size: 13px;
}
.loading[hidden] { display: none; }
/* Waiting for the office: a green line runs under the word; then the screen fades over the desks landing (main.js) */
.loading { flex-direction: column; gap: 10px; transition: opacity .26s ease-out; }
.loading::after { content: ''; width: 72px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, transparent, var(--cb-green), transparent) no-repeat; background-size: 50% 100%; animation: loading-run 1.1s ease-in-out infinite; }
@keyframes loading-run { from { background-position: -100% 0; } to { background-position: 200% 0; } }
.loading.is-fading { opacity: 0; pointer-events: none; }
/* The entrance's reveal (entrance.js): over the scene, under the bars and the loading screen; clicks go through */
.entrance { position: fixed; inset: 0; z-index: 40; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
@media (prefers-reduced-motion: reduce) { .loading::after { animation: none; background-position: 50% 0; } }

/* --- Buddy or project card --- */
.card {
  position: fixed;
  z-index: 100;
  box-sizing: border-box;
  width: max-content;
  max-width: min(340px, calc(100vw - 16px));
  padding: 14px 16px;
}
.card[hidden] { display: none; }
.card-title { font-weight: 600; overflow-wrap: anywhere; }
.card-meta,
.card-foot { color: var(--cb-text-3); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.card-button { margin-top: 8px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card-actions .card-button { margin-top: 0; }
.card-status {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0;
  min-width: 0;
  color: var(--cb-text-2);
  font-size: 13px;
}
.card-status.st-needs-you .card-state { color: var(--cb-amber); }
/* A project's own colour, where the card lists projects (it matches its zone on the floor) */
.dot { flex: none; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--cb-text-3); }

/* A state's mark, as on the Pro page: dot, check, ring or cross, in the state's colour. */
.st-needs-you { --state: var(--cb-amber); }
.st-working { --state: var(--cb-green); }
.st-done { --state: var(--cb-text-2); }
.st-idle { --state: var(--cb-text-3); }
.st-failed { --state: var(--cb-red); }
.mark { display: inline-flex; flex: none; align-self: center; align-items: center; justify-content: center; width: 10px; height: 10px; color: var(--state); font-size: 11px; font-weight: 700; line-height: 1; }
.mark.st-needs-you::before, .mark.st-working::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--state); }
.mark.st-idle::before { content: ''; width: 6px; height: 6px; border: 1.5px solid var(--state); border-radius: 50%; }

/* --- Connection banner --- */
.status {
  position: fixed;
  z-index: 500;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 8px 14px;
  color: var(--cb-red);
  font-size: 13px;
  white-space: nowrap;
}
.status[hidden] { display: none; }

/* --- Camera controls --- */
.camctl {
  position: fixed;
  z-index: 60;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
}
.camctl button, .camctl select { min-width: 32px; }
/* The frame recorder (?fps, ?lod, ?lab; js/perf.js): bottom centre, clear of the elevator and the camera buttons */
.perf { position: fixed; z-index: 60; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); box-sizing: border-box; padding: 6px; background: var(--cb-surface); border: 1px solid var(--cb-line); border-radius: var(--cb-r); }
.perf-graph { display: block; width: 100%; height: 72px; border-radius: var(--cb-r-sm); }
.perf-line { margin: 4px 2px 0; color: var(--cb-text-2); font: 11px var(--cb-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perf-buttons { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; }
.perf-buttons button { height: 22px; padding: 0 8px; background: var(--cb-raised); border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text); font: 11px var(--cb-font); cursor: pointer; opacity: 0.85; }
.perf-buttons button:hover { opacity: 1; }
.camctl select { background: var(--cb-raised); }
.camctl-tag { padding: 0 8px; color: var(--cb-text-3); font-size: 12px; }

/* --- Needs of a buddy on a break (not .needs: that's the "Needs you" panel, fixed on the right) --- */
.break-needs {
  display: grid;
  grid-template-columns: auto 120px;
  gap: 4px 10px;
  align-items: center;
  margin-top: 6px;
  color: var(--cb-text-2);
  font-size: 12px;
}
.break-needs-bar { display: block; height: 6px; background: var(--cb-raised); border-radius: 3px; overflow: hidden; }
.break-needs-bar > span { display: block; height: 100%; background: var(--cb-text-2); }
.break-needs-bar > span.low { background: var(--cb-red); }

/* --- Team city sketch (?lab&city, city.js) --- */
.citypanel {
  position: fixed;
  z-index: 60;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 260px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  padding: 10px 12px;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-r);
  font-size: 13px;
}
.citypanel-head { font-weight: 600; }
.citypanel-note { color: var(--cb-text-3); font-size: 12px; line-height: 1.5; }
.citypanel select { height: 28px; background: var(--cb-raised); color: var(--cb-text); border: 0; border-radius: var(--cb-r-sm); font: 13px var(--cb-font); padding: 0 6px; }
.citypanel a { color: var(--cb-text-2); font-size: 12px; }
.city-tip { padding: 6px 10px; font-size: 12px; pointer-events: none; }
.city-card .dot { display: inline-block; vertical-align: middle; }
.city-card .card-button.is-primary, .city-card .card-button.is-primary:hover { background: var(--cb-green); }
.city-card .card-button.is-armed, .city-card .card-button.is-armed:hover { background: var(--cb-amber); color: var(--cb-on-accent); }
.city-admin { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--cb-line); }
.city-input { flex: 1; min-width: 0; height: 30px; box-sizing: border-box; padding: 0 8px; background: var(--cb-bg); border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); color: var(--cb-text); font: 13px var(--cb-font); }
.city-input:focus { outline: none; border-color: var(--cb-green); }
.citypanel-back { height: 30px; background: var(--cb-raised); border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text); font: 13px var(--cb-font); cursor: pointer; }
.citypanel-back:hover { filter: brightness(1.15); }
/* The live page in the city (the elevator's Street stop): the office's own controls wait behind it */
.in-city .lift, .in-city .camctl:not(.city-camctl), .in-city .free-bar, .in-city .card:not(.city-card):not(.city-tip) { display: none !important; }
@media (pointer: coarse) { .citypanel-back, .city-card .card-button { min-height: 44px; } }
@media (max-width: 640px) { .in-city .citypanel { top: 92px; } .in-city .citypanel-note { display: none; } } /* under the top bar, which wraps on a phone */

/* --- Lab control panel --- */
.labpanel {
  position: fixed;
  z-index: 60;
  bottom: 12px;
  left: 12px;
  width: 300px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 80px);
  overflow: auto;
  font-size: 13px;
}
.labpanel-head {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: 0;
  color: var(--cb-text);
  font: 600 13px var(--cb-font);
  text-align: left;
  cursor: pointer;
}
.labpanel-head::after { content: ' ▾'; color: var(--cb-text-3); }
.labpanel-head.closed::after { content: ' ▸'; }
.labpanel-body { padding: 0 12px 10px; }
.labpanel-body[hidden] { display: none; }
.labpanel-row { padding: 8px 0; border-top: 1px solid var(--cb-line); }
.labpanel-label { display: block; margin-bottom: 4px; color: var(--cb-text-3); font-size: 12px; }
.labpanel-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.labpanel-ctl input[type=range] { flex: 1; min-width: 0; accent-color: var(--cb-green); }
.labpanel-value { min-width: 38px; text-align: right; }
.labpanel-buttons { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; }
.labpanel-buttons button { height: 26px; padding: 0 8px; font-size: 12px; }
.labpanel-note { width: 100%; color: var(--cb-text-3); font-size: 12px; }
.labpanel-check { display: flex; align-items: center; gap: 6px; color: var(--cb-text-2); cursor: pointer; }
.labpanel-check input { accent-color: var(--cb-green); }

/* --- Activity curve in the wall screen's card --- */
.spark { display: block; width: 220px; max-width: 100%; height: 36px; margin: 6px 0; }
.spark-area { fill: rgba(68, 214, 44, 0.15); }
.spark-line { fill: none; stroke: var(--cb-green); stroke-width: 1.5; }

/* --- World clocks (tapping the wall clock or a window) --- */
.clocks {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 2px 12px;
  margin-top: 6px;
  font-size: 13px;
}
.clocks-time { font-weight: 600; color: var(--cb-text); }

/* --- Sign-in screen --- */
.auth {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--cb-bg);
}
.auth[hidden],
.auth-box[hidden] { display: none; }
.auth-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  padding: 24px;
  box-sizing: border-box;
  background: var(--cb-surface);
  border-radius: var(--cb-r);
}
.auth-title { font-weight: 600; font-size: 16px; color: var(--cb-text); }
.auth-sub { color: var(--cb-text-2); font-size: 13px; margin-bottom: 4px; }
.auth-box input,
.suggest-form input,
.suggest-form textarea {
  box-sizing: border-box;
  height: 36px;
  padding: 0 10px;
  background: var(--cb-bg);
  color: var(--cb-text);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-r-sm);
  font: 14px var(--cb-font);
}
.auth-box input::placeholder, .suggest-form ::placeholder { color: var(--cb-text-3); }
.auth-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.auth-actions button { flex: 1; height: 36px; padding: 0 12px; border: 0; border-radius: var(--cb-r-sm); font: 600 14px var(--cb-font); cursor: pointer; }
.auth-actions .btn-secondary,
.auth-actions .btn-secondary:hover { background: var(--cb-raised); color: var(--cb-text); font-weight: 400; filter: none; }
.auth-error { margin: 0; min-height: 1.2em; color: var(--cb-red); font-size: 13px; }
.auth-error.is-ok { color: var(--cb-green); }
#confirmEmail { color: var(--cb-text); font-weight: 600; word-break: break-all; }

/* --- The sign-in's motion (2026-11-24): the box rises in, a green edge draws across its top, its lines follow one
   by one; the field's edge turns green; an error shakes in; the button waits with a spinner. Transforms, opacity and
   colours only (charter v2: no shadow). Nothing moves for someone who asked for less motion. --- */
.auth::before, .auth::after { /* two faint green lights drifting behind the box (fixed: they never make the page scroll) */
  content: ''; position: fixed; width: 60vmax; height: 60vmax; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(68, 214, 44, .09), rgba(68, 214, 44, 0) 62%);
  animation: auth-drift 22s ease-in-out infinite alternate;
}
.auth::before { left: -18vmax; top: -22vmax; }
.auth::after { right: -22vmax; bottom: -26vmax; animation-duration: 28s; animation-direction: alternate-reverse; }
@keyframes auth-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(8vmax, 6vmax) scale(1.15); } }
.auth-box { position: relative; z-index: 1; overflow: hidden; animation: auth-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.auth-box::before { /* the green edge, drawn from the left */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--cb-green);
  transform-origin: left; animation: auth-edge .7s .15s cubic-bezier(.65, 0, .35, 1) both;
}
.auth-box > * { animation: auth-item .45s cubic-bezier(.2, .8, .2, 1) both; }
.auth-box > :nth-child(1) { animation-delay: .12s; }
.auth-box > :nth-child(2) { animation-delay: .17s; }
.auth-box > :nth-child(3) { animation-delay: .22s; }
.auth-box > :nth-child(4) { animation-delay: .27s; }
.auth-box > :nth-child(5) { animation-delay: .32s; }
.auth-box > :nth-child(6) { animation-delay: .37s; }
.auth-box > :nth-child(7) { animation-delay: .42s; }
.auth-box > :nth-child(n+8) { animation-delay: .47s; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes auth-edge { from { transform: scaleX(0); } }
@keyframes auth-item { from { opacity: 0; transform: translateY(8px); } }
.auth-box input { transition: border-color .2s, background-color .2s; }
.auth-box input:focus { border-color: var(--cb-green); outline: none; }
.auth-box input:hover:not(:focus) { border-color: var(--cb-text-3); }
#authEmail:not([hidden]) { animation: auth-open .35s cubic-bezier(.2, .8, .2, 1) both; } /* "Create an account" opens it */
@keyframes auth-open { from { opacity: 0; height: 0; padding-block: 0; border-width: 0; margin-top: -10px; transform: translateY(-6px); } }
.auth-error.is-shown { animation: auth-shake .4s cubic-bezier(.36, .07, .19, .97) both; }
.auth-error.is-ok.is-shown { animation: auth-item .35s both; }
@keyframes auth-shake { 0% { opacity: 0; transform: translateX(0); } 20% { opacity: 1; transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.auth-actions button { position: relative; transition: transform .12s, filter .15s, background-color .15s; }
.auth-actions button:active:not(:disabled) { transform: scale(.97); }
.auth-actions button:disabled { cursor: default; opacity: .6; }
.auth-actions button.is-busy { color: transparent !important; opacity: 1; }
.auth-actions button.is-busy::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border: 2px solid var(--cb-on-accent); border-right-color: transparent; border-radius: 50%; animation: auth-spin .7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* The code box: an envelope that lands (its green dot: a new mail), six cells over one transparent field */
.confirm-icon { position: relative; width: 48px; height: 48px; align-self: center; margin-bottom: 2px; }
.confirm-icon svg { position: absolute; inset: 0; width: 48px; height: 48px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.confirm-mail { stroke: var(--cb-text-2); animation: mail-land .7s .1s cubic-bezier(.34, 1.56, .64, 1) both; }
.confirm-dot { fill: var(--cb-green); stroke: var(--cb-surface); stroke-width: 2.5; transform-origin: 40px 12px; animation: dot-pop .45s .7s cubic-bezier(.34, 1.56, .64, 1) both; }
.confirm-icon.is-again .confirm-dot { animation: dot-pop .45s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes mail-land { 0% { opacity: 0; transform: translate(-22px, -10px) rotate(-14deg) scale(.8); } 60% { opacity: 1; } }
@keyframes dot-pop { 0% { transform: scale(0); } }
.confirm-check { opacity: 0; stroke: var(--cb-green); }
.confirm-check circle { stroke-dasharray: 120; stroke-dashoffset: 120; }
.confirm-check path { stroke-dasharray: 30; stroke-dashoffset: 30; stroke-width: 2.8; }
.confirm-box.is-done .confirm-mail { animation: mail-off .3s ease-in both; }
.confirm-box.is-done .confirm-check { opacity: 1; }
.confirm-box.is-done .confirm-check circle { animation: draw .5s .25s cubic-bezier(.65, 0, .35, 1) forwards; }
.confirm-box.is-done .confirm-check path { animation: draw .35s .65s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes mail-off { to { opacity: 0; transform: translateY(10px) scale(.7); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confirm-box .auth-title { align-self: center; }
.confirm-box > .auth-sub { text-align: center; }

.code-cells { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 6px 0 2px; }
.auth-box .code-cells input { /* the real field, over the cells: clicks, typing, a paste, the phone's code suggestion */
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: transparent;
  color: transparent; caret-color: transparent; font-size: 16px; opacity: 0; cursor: text; animation: none;
}
.code-cell {
  position: relative; display: flex; align-items: center; justify-content: center; height: 52px; box-sizing: border-box;
  background: var(--cb-bg); border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm);
  font: 600 24px var(--cb-font); color: var(--cb-text); font-variant-numeric: tabular-nums;
  transition: border-color .2s, background-color .25s, color .25s, transform .25s;
}
.code-cell.is-filled { border-color: var(--cb-text-3); }
.code-cells:focus-within .code-cell.is-next { border-color: var(--cb-green); }
.code-cells:focus-within .code-cell.is-next::after { /* the caret, in the cell that comes next */
  content: ''; width: 2px; height: 24px; border-radius: 1px; background: var(--cb-green); animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.code-cell.is-pop { animation: cell-pop .28s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes cell-pop { 0% { transform: scale(.6); color: var(--cb-green); } 60% { transform: scale(1.12); } }
.code-cells.is-wrong { animation: auth-shake .45s cubic-bezier(.36, .07, .19, .97); }
.code-cells.is-wrong .code-cell { border-color: var(--cb-red); color: var(--cb-red); }
.confirm-box.is-busy .code-cell.is-filled { animation: cell-wait 1s ease-in-out infinite; }
.confirm-box.is-busy .code-cell:nth-child(3) { animation-delay: .08s; }
.confirm-box.is-busy .code-cell:nth-child(4) { animation-delay: .16s; }
.confirm-box.is-busy .code-cell:nth-child(5) { animation-delay: .24s; }
.confirm-box.is-busy .code-cell:nth-child(6) { animation-delay: .32s; }
.confirm-box.is-busy .code-cell:nth-child(7) { animation-delay: .4s; }
@keyframes cell-wait { 50% { border-color: var(--cb-green); } }
/* Right: a green wave across the cells */
.confirm-box.is-done .code-cell { border-color: var(--cb-green); background: var(--cb-green); color: var(--cb-on-accent); animation: cell-win .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.confirm-box.is-done .code-cell:nth-child(3) { transition-delay: .06s; animation-delay: .06s; }
.confirm-box.is-done .code-cell:nth-child(4) { transition-delay: .12s; animation-delay: .12s; }
.confirm-box.is-done .code-cell:nth-child(5) { transition-delay: .18s; animation-delay: .18s; }
.confirm-box.is-done .code-cell:nth-child(6) { transition-delay: .24s; animation-delay: .24s; }
.confirm-box.is-done .code-cell:nth-child(7) { transition-delay: .3s; animation-delay: .3s; }
@keyframes cell-win { 40% { transform: translateY(-7px); } }
.confirm-box.is-done .auth-actions, .confirm-box.is-done > .auth-sub, .confirm-box.is-done .auth-link, .confirm-box.is-done .auth-error { opacity: .35; transition: opacity .3s; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .auth::before, .auth::after, .auth-box, .auth-box::before, .auth-box > *, #authEmail:not([hidden]), .auth-error.is-shown,
  .confirm-mail, .confirm-dot, .code-cell, .code-cells.is-wrong, .confirm-box.is-done .code-cell, .confirm-box.is-done .confirm-mail,
  .auth-actions button.is-busy::after { animation: none !important; transition: none !important; }
  .confirm-box.is-done .confirm-mail { opacity: 0; }
  .confirm-box.is-done .confirm-check circle, .confirm-box.is-done .confirm-check path { animation: none; stroke-dashoffset: 0; }
}
.auth-link { align-self: center; padding: 4px 8px; border: 0; background: none; color: var(--cb-text-3); font: 12px var(--cb-font); cursor: pointer; }
.auth-link:hover { color: var(--cb-text); text-decoration: underline; }
/* "Sign in with Razer ID": shown, not working yet (the SSO comes later), so it reads as a promise, not a broken button */
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--cb-text-3); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--cb-line); }
.auth-razer { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); background: transparent; color: var(--cb-text-2); font: 14px var(--cb-font); }
.auth-razer:disabled { opacity: 1; cursor: default; }
.auth-about { align-self: center; color: var(--cb-text-3); font-size: 12px; text-decoration: none; }
.auth-about:hover { color: var(--cb-text); text-decoration: underline; }
.auth-soon { padding: 1px 6px; border-radius: 999px; background: var(--cb-raised); color: var(--cb-text-3); font-size: 11px; }

/* --- The elevator's panel (top left): floor display, call buttons, a car to drag along its rail --- */
.lift {
  position: fixed;
  z-index: 60;
  top: 12px;
  left: 12px;
  width: 92px;
  padding: 8px 8px 10px;
  box-sizing: border-box;
  user-select: none;
}
.lift-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  background: var(--cb-bg);
  border-radius: var(--cb-r-sm);
  color: var(--cb-text);
  font: 600 20px/1 var(--cb-font);
}
.lift-arrow { width: 12px; color: var(--cb-text-3); font-size: 11px; }
.lift.moving .lift-arrow { animation: lift-blink .5s steps(2) infinite; }
@keyframes lift-blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .lift.moving .lift-arrow { animation: none; } }
.lift-name { margin: 6px 0 8px; color: var(--cb-text-3); font-size: 11px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lift-shaft { position: relative; margin: 0 auto; width: 72px; }
.lift-rail { position: absolute; left: 4px; top: 0; bottom: 0; width: 14px; }
.lift-rail::before { content: ''; position: absolute; left: 6px; top: 0; bottom: -2px; width: 2px; background: var(--cb-line); border-radius: 1px; }
.lift-car {
  position: absolute;
  left: 0;
  width: 14px;
  height: 22px;
  background: var(--cb-raised);
  border: 1px solid var(--cb-text-3);
  border-radius: 3px;
  box-sizing: border-box;
  cursor: grab;
  touch-action: none;
}
.lift-car::after { content: ''; position: absolute; left: 5px; top: 3px; bottom: 3px; width: 1px; background: var(--cb-text-3); } /* the doors */
.lift-car.held { cursor: grabbing; border-color: var(--cb-text); }
.lift-stop {
  position: absolute;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--cb-line);
  color: var(--cb-text-2);
  font: 600 11px/1 var(--cb-font);
  cursor: pointer;
}
.lift-stop:hover { background: var(--cb-raised); color: var(--cb-text); }
.lift-stop.lit { background: var(--cb-raised); border-color: var(--cb-text-3); color: var(--cb-text); }
/* Your own floor: a green dot beside its button (as on the Pro page's switch), and a line at the panel's foot */
.lift-you { position: absolute; right: 34px; width: 6px; height: 6px; margin-top: 10px; overflow: hidden; border-radius: 50%; background: var(--cb-green); font-size: 0; pointer-events: none; }
/* The other tens of a big hub, above and below the shaft */
.lift-more { display: block; width: 100%; height: 24px; margin: 4px 0; padding: 0; background: none; border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text-2); font: 12px var(--cb-font); cursor: pointer; }
.lift-more:hover { background: var(--cb-raised); color: var(--cb-text); }
.lift-car[hidden] { display: none; }
.lift-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--cb-line); color: var(--cb-text-3); font-size: 11px; text-align: center; white-space: nowrap; }
.lift-note { margin-top: 8px; max-width: 130px; color: var(--cb-text-2); font-size: 11px; line-height: 1.4; text-align: center; }
button.lift-note { padding: 4px 6px; background: none; border: 0; border-radius: var(--cb-r-sm); font-family: var(--cb-font); cursor: pointer; }
button.lift-note:hover { background: var(--cb-raised); color: var(--cb-text); }

/* --- The top bar (top right, where the Pro page has its links), in the Pro page's order: Share an idea, the update
   and the panels, Admin, Pro view, then the account --- */
.userbar {
  position: fixed;
  z-index: 60;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  align-items: center;
  gap: 2px;
  padding: 4px;
  font-size: 13px;
}
.userbar[hidden], .userbar a[hidden], .userbar button[hidden] { display: none; }
/* Beside the elevator's panel (left, 92 px wide), never under it: on a phone the bar wraps instead of hiding
   "Share an idea" and "Needs you" behind the panel (seen at 375 px). In the city the panel is gone. */
.userbar { max-width: calc(100vw - 124px); }
.in-city .userbar { max-width: calc(100vw - 24px); }
.userbar .primary { margin-right: 10px; } /* first in the bar, set apart from the links */
/* "Share an idea": a bulb and the words, the office's and the Pro page's main button; the bulb alone on a phone,
   smaller and harder to hit by accident */
.idea-button { display: inline-flex; align-items: center; gap: 6px; }
.idea-button svg { flex: none; width: 16px; height: 16px; }
@media (max-width: 720px) {
  .idea-button .idea-label { display: none; }
  .userbar .idea-button, .pro-link-primary.idea-button { padding-inline: 8px; }
}
.userbar-account { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--cb-line); }
.userbar-name { padding-right: 4px; color: var(--cb-text); }

/* "Agent update" in a top bar: a computer of yours runs an older agent (amber: it waits for you) */
.update-button::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--cb-amber); vertical-align: 1px; }

/* --- Inbox: the leads' reports (top bar button and its panel) --- */
.inbox-button { gap: 6px; }
.inbox-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 9px;
  background: var(--cb-text);
  color: var(--cb-bg);
  font: 600 11px/18px var(--cb-font);
  text-align: center;
}
.inbox-badge[hidden] { display: none; }
.inbox {
  position: fixed;
  z-index: 110;
  top: 60px;
  right: 12px;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}
.inbox[hidden] { display: none; }
.inbox-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--cb-line); }
.inbox-title { flex: 1; font-weight: 600; }
.inbox-head button { height: 26px; padding: 0 10px; font-size: 12px; }
.inbox-list { overflow-y: auto; }
.inbox-empty { padding: 16px 18px; color: var(--cb-text-2); font-size: 13px; }
.inbox-item { display: flex; align-items: flex-start; border-top: 1px solid var(--cb-line); }
.inbox-item:first-child { border-top: 0; }
.inbox-item:hover { background: var(--cb-raised); }
.inbox-open {
  flex: 1;
  min-width: 0;
  padding: 10px 4px 10px 18px;
  background: none;
  color: var(--cb-text);
  border: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.inbox-focus { flex: none; margin: 8px 2px 0 0; height: 24px; font-size: 12px; }
.inbox-delete {
  flex: none;
  margin: 8px 8px 0 0;
  padding: 0 8px;
  height: 24px;
  background: none;
  color: var(--cb-text-3);
  border: 0;
  border-radius: var(--cb-r-sm);
  font: 12px var(--cb-font);
  cursor: pointer;
}
.inbox-delete:hover { background: var(--cb-raised); color: var(--cb-red); }
.inbox-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inbox-subject { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item .dot { visibility: hidden; background: var(--cb-text); }
.inbox-item.unread .dot { visibility: visible; }
.inbox-item.unread .inbox-subject { font-weight: 600; }
.inbox-meta { padding-left: 16px; color: var(--cb-text-3); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.inbox-text {
  padding: 4px 14px 12px 30px;
  color: var(--cb-text-2);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* --- Text actions and errors in the windows (install, update, share an idea) --- */
.settings-error { margin: 6px 0 0; color: var(--cb-red); font-size: 13px; }
.settings-error:empty { display: none; }
/* A text action: grey, white on hover (Install the agent, Later, Cancel) */
.settings-link { padding: 0; background: none; border: 0; color: var(--cb-text-2); font: 13px var(--cb-font); text-decoration: underline; text-decoration-color: var(--cb-line); text-underline-offset: 3px; cursor: pointer; }
.settings-link:hover { color: var(--cb-text); text-decoration-color: currentColor; }

/* --- "Find someone": a name field and the people it matches, with their floor (office: beside the elevator) --- */
.find {
  position: fixed;
  z-index: 112;
  top: 12px;
  left: 112px;
  box-sizing: border-box;
  width: min(320px, calc(100vw - 24px));
  padding: 8px;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-r);
  font: 14px/1.45 var(--cb-font);
  color: var(--cb-text);
}
.find[hidden] { display: none; }
.find-input { box-sizing: border-box; width: 100%; height: 36px; padding: 0 10px; background: var(--cb-bg); color: var(--cb-text); border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); font: 14px var(--cb-font); }
.find-input::placeholder { color: var(--cb-text-3); }
.find-list { margin: 6px 0 0; padding: 0; list-style: none; }
.find-row { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--cb-r-sm); color: var(--cb-text-2); cursor: pointer; }
.find-row.is-active, .find-row:hover { background: var(--cb-raised); color: var(--cb-text); }
.find-dot { flex: none; width: 6px; height: 6px; border: 1.5px solid var(--cb-text-3); border-radius: 50%; }
.find-dot.is-on { width: 8px; height: 8px; border: 0; background: var(--cb-green); } /* a machine of theirs is connected */
.find-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-floor { flex: none; color: var(--cb-text-3); font-size: 13px; }
.find-note { margin: 6px 10px 2px; color: var(--cb-text-3); font-size: 13px; }
.find-note:empty { display: none; }
.pro-page .find { top: 60px; left: 24px; }
.lift-find { display: block; width: 100%; margin-top: 8px; padding: 4px 0; background: none; border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text-2); font: 12px var(--cb-font); cursor: pointer; }
.lift-find:hover { background: var(--cb-raised); color: var(--cb-text); }

/* --- "Suggest a feature": a button in the top bar (office and Pro page), and its window --- */
.suggest-fab { display: none; }
.suggest-form input,
.suggest-form textarea { display: block; width: 100%; margin-top: 8px; }
.suggest-form textarea { height: auto; padding: 8px 10px; resize: vertical; }
.suggest-form [hidden] { display: none; }
.suggest-thanks { color: var(--cb-text); font-weight: 600; }

/* --- Windows: install, update, suggest --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
}
.modal[hidden] { display: none; }
.modal-box {
  box-sizing: border-box;
  width: min(480px, 100%);
  max-height: 100%;
  overflow: auto;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-r);
  color: var(--cb-text);
}
.modal-body { padding: 4px 18px 18px; color: var(--cb-text-2); font-size: 13px; line-height: 1.5; }
.modal-body p { margin: 10px 0; }
.modal-body b, .modal-body strong { color: var(--cb-text); }
.modal-body a { color: var(--cb-text); text-underline-offset: 3px; }
.modal-action { height: 32px; padding: 0 14px; border: 0; border-radius: var(--cb-r-sm); font: 600 13px var(--cb-font); cursor: pointer; }
.modal-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.modal-list { margin: 6px 0; padding-left: 18px; }
.modal-list li { margin: 4px 0; }
.modal-progress { width: 100%; height: 8px; margin-top: 10px; accent-color: var(--cb-green); }
.modal-code { display: block; padding: 8px 10px; background: var(--cb-bg); border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); color: var(--cb-text); font: 12px var(--cb-mono); overflow-wrap: anywhere; user-select: all; }
#scene { transition: opacity 0.25s; }

/* --- Admin console (/admin, /roadmap), on charter v2 like the office and the Pro page: a sidebar to find each section,
   a title with the key numbers, then one panel per section. Neutrals do the layout; colour only says state (amber =
   waits for you, green = live or in progress, red = revoked, failed or blocked). Roboto, no uppercase, no shadow. --- */
body.page { overflow: auto; } /* the body scrolls: html stays locked to the screen, as for the office */
.console {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--cb-bg);
  color: var(--cb-text);
  font: 14px/1.45 var(--cb-font);
  font-variant-numeric: tabular-nums;
}
.console a { color: var(--cb-text); text-underline-offset: 3px; }
.console .muted { color: var(--cb-text-3); }
.console .mono { font: 13px var(--cb-font); } /* names, versions, counts: the one family, digits aligned */
.console .cs-strong { font-weight: 600; }

.cs-side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100vh;
  box-sizing: border-box;
  overflow: auto;
  padding: 20px 12px 16px;
  background: var(--cb-surface);
  border-right: 1px solid var(--cb-line);
}
.cs-brand { padding: 0 10px; font: 600 16px/1.2 var(--cb-font); }
.cs-sub { margin: 2px 0 12px; padding: 0 10px; color: var(--cb-green); font-size: 13px; }
.cs-eyebrow { margin-top: 16px; padding: 0 10px 4px; color: var(--cb-text-3); font-size: 12px; }
.cs-nav { display: flex; flex-direction: column; gap: 2px; }
.console .cs-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--cb-r-sm);
  color: var(--cb-text-2);
  text-decoration: none;
}
.console .cs-nav a:hover { background: var(--cb-raised); color: var(--cb-text); }
.console .cs-nav a.is-active { background: var(--cb-raised); color: var(--cb-text); }
.cs-badge { color: var(--cb-text-3); font-size: 13px; }
.cs-badge.warn { color: var(--cb-amber); }
.cs-badge[hidden] { display: none; }
.cs-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--cb-line); }
.console .cs-foot a { color: var(--cb-text-2); font-size: 13px; text-decoration: none; }
.console .cs-foot a:hover { color: var(--cb-text); }

.cs-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 20px 24px 48px; }
.cs-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.cs-title { margin: 0; font: 600 20px/1.3 var(--cb-font); }
.cs-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
/* The key numbers: plain text, coloured only when they ask for something (warn) or went wrong (bad) */
.cs-chip { color: var(--cb-text-2); font-size: 13px; white-space: nowrap; }
.cs-chip.warn { color: var(--cb-amber); }
.cs-chip.bad { color: var(--cb-red); }
.cs-note { color: var(--cb-text-3); font-size: 13px; }

.cs-view { display: flex; flex-direction: column; gap: 16px; }
.cs-view[hidden] { display: none; }
.cs-panel { padding: 16px 20px; background: var(--cb-surface); border-radius: var(--cb-r); }
.cs-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cs-list { display: flex; flex-direction: column; }
.cs-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--cb-line); }
.cs-line:last-child { border-bottom: 0; }
.console a.cs-more { color: var(--cb-text-2); font-size: 13px; text-decoration: none; }
.console a.cs-more:hover { color: var(--cb-text); }
.cs-switch { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--cb-text); font-size: 14px; cursor: pointer; }
.console .cs-switch input { width: 16px; height: 16px; padding: 0; accent-color: var(--cb-green); }
.cs-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 12px; }
.cs-panel-head h2 { flex: 1; margin: 0; font: 600 14px/1.3 var(--cb-font); white-space: nowrap; }
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cs-tile { padding: 12px 14px; background: var(--cb-raised); border-radius: var(--cb-r); }
.console a.cs-tile { color: var(--cb-text); text-decoration: none; }
.console a.cs-tile:hover { background: #2e2e2e; }
.cs-tile b { display: block; font: 600 24px/1.2 var(--cb-font); }
.cs-tile span { color: var(--cb-text-2); font-size: 13px; }
.cs-tile.warn b { color: var(--cb-amber); }
.cs-tile.bad b { color: var(--cb-red); }

.cs-tiles + .cs-scroll { margin-top: 12px; }
.cs-scroll { overflow-x: auto; } /* a wide table scrolls inside its panel, never the page */
.console table { width: 100%; border-collapse: collapse; }
.console th { padding: 6px 10px; border-bottom: 1px solid var(--cb-line); color: var(--cb-text-3); font-size: 12px; font-weight: 400; text-align: left; white-space: nowrap; }
.console td { padding: 9px 10px; border-bottom: 1px solid var(--cb-line); text-align: left; vertical-align: top; }
.console tbody tr:last-child td { border-bottom: 0; }
.console tr.is-waiting td:first-child { box-shadow: inset 3px 0 0 var(--cb-amber); } /* waits for your approval: the amber edge of the Pro page's cards */
.cs-machine { margin-bottom: 4px; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 6px; white-space: nowrap; }

/* A status in a table: a mark and a word, as on the Pro page */
.console .tag { display: inline-flex; align-items: center; gap: 6px; color: var(--cb-text-2); font-size: 13px; white-space: nowrap; }
.console .tag::before { content: ''; flex: none; width: 6px; height: 6px; border: 1.5px solid var(--cb-text-3); border-radius: 50%; }
.console .tag.on::before { width: 8px; height: 8px; border: 0; background: var(--cb-green); }
.console .tag.wait { color: var(--cb-amber); }
.console .tag.wait::before { width: 8px; height: 8px; border: 0; background: var(--cb-amber); }
.console .tag.off { color: var(--cb-red); }
.console .tag.off::before { content: '✕'; width: auto; height: auto; border: 0; font-size: 11px; font-weight: 700; line-height: 1; }
.console .tag.plain::before { display: none; } /* a label, not a state: a section, a horizon, someone's name */

/* Buttons: quiet by default, one green main action, red text for what removes or cuts off */
.console button {
  height: 28px;
  padding: 0 12px;
  background: var(--cb-raised);
  border: 0;
  border-radius: var(--cb-r-sm);
  color: var(--cb-text-2);
  font: 13px var(--cb-font);
  cursor: pointer;
}
.console button:hover { color: var(--cb-text); background: #2e2e2e; }
.console button.primary,
.console button.primary:hover { background: var(--cb-green); color: var(--cb-on-accent); font-weight: 600; }
.console button.primary:hover { filter: brightness(1.08); }
.console button.danger { color: var(--cb-red); }
.console input, .console select, .console textarea {
  height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
  background: var(--cb-bg);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-r-sm);
  color: var(--cb-text);
  font: 13px var(--cb-font);
}
.console input::placeholder, .console textarea::placeholder { color: var(--cb-text-3); }
.console textarea { width: 100%; height: auto; padding: 8px 10px; resize: vertical; }
.console input[type="checkbox"] { height: auto; accent-color: var(--cb-green); }

/* The handbook, in the console: its own page (and version switcher), the height of the window */
.cs-handbook iframe { display: block; width: 100%; height: calc(100vh - 96px); border: 0; border-radius: var(--cb-r); background: var(--cb-bg); }
/* Shared with someone: read only (the hub refuses their writes; the page doesn't offer them) */
.read-only .cs-actions > *, .read-only .rm-add, .read-only .rm-item button { display: none; }
.read-only .rm-item select { pointer-events: none; }
.read-only .rm-item select, .read-only .cs-panel select:disabled { appearance: none; background: none; border-color: transparent; color: var(--cb-text-2); padding: 0; }

/* The roadmap, in the same console. */
.rm-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rm-views { display: flex; gap: 2px; padding: 2px; background: var(--cb-bg); border-radius: var(--cb-r); }
.console .rm-views button { height: 28px; background: none; color: var(--cb-text-2); font-weight: 400; }
.console .rm-views button.primary { background: var(--cb-raised); color: var(--cb-text); filter: none; }
.rm-add summary { color: var(--cb-text-2); font-size: 13px; cursor: pointer; }
.rm-add summary:hover { color: var(--cb-text); }
.rm-add form, .rm-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rm-add form > input, .rm-edit > input { width: 100%; }
.rm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rm-error { color: var(--cb-red); font-size: 13px; }
.rm-item { position: relative; overflow: hidden; margin-top: 8px; padding: 10px 14px; background: var(--cb-raised); border-radius: var(--cb-r-sm); }
.rm-item::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; }
.rm-item.s-doing::before { background: var(--cb-green); }
.rm-item.s-blocked::before { background: var(--cb-red); }
.rm-item.p-urgent:not(.s-done)::before { background: var(--cb-amber); }
.rm-item.s-done { opacity: 0.55; }
.rm-item.s-done .rm-title { text-decoration: line-through; }
.rm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 4px; }
.rm-title { margin-right: auto; font-weight: 600; }
.rm-detail { margin-bottom: 8px; color: var(--cb-text-2); font-size: 13px; white-space: pre-wrap; }
.rm-timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cs-main-list { display: flex; flex-direction: column; gap: 16px; }

/* The overview: the goal on top, then a row per pillar and a column per horizon; each item one line that opens. */
.rm-overview { display: flex; flex-direction: column; gap: 16px; }
.rm-goal { display: flex; align-items: baseline; gap: 12px; padding: 14px 20px; background: var(--cb-surface); border-left: 3px solid var(--cb-green); border-radius: var(--cb-r); font-size: 16px; font-weight: 600; }
.rm-goal-label { color: var(--cb-text-3); font-size: 13px; font-weight: 400; }
.rm-grid { display: grid; grid-template-columns: minmax(180px, 220px) repeat(3, minmax(0, 1fr)); gap: 2px; overflow: hidden; background: var(--cb-line); border-radius: var(--cb-r); }
.rm-grid > div { padding: 12px 14px; background: var(--cb-surface); }
.rm-corner { background: var(--cb-bg) !important; }
.rm-col-head { display: flex; flex-direction: column; gap: 2px; }
.rm-col-name { font-size: 15px; font-weight: 600; }
.rm-col-theme { color: var(--cb-text-2); font-size: 13px; }
.rm-gate { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--cb-line); color: var(--cb-text-3); font-size: 12px; }
.rm-pillar { display: flex; flex-direction: column; gap: 4px; }
.rm-pillar-name { font-weight: 600; }
.rm-pillar-line, .rm-pillar-count { color: var(--cb-text-3); font-size: 12px; }
.rm-bar { height: 4px; margin-top: 4px; background: var(--cb-raised); border-radius: 2px; }
.rm-bar span { display: block; height: 100%; background: var(--cb-green); border-radius: 2px; }
.rm-cell { display: flex; flex-direction: column; gap: 4px; }
.rm-cell-label { display: none; }
.console .rm-line { display: flex; align-items: baseline; gap: 8px; width: 100%; height: auto; padding: 6px 8px; background: none; border-radius: var(--cb-r-sm); color: var(--cb-text); font-size: 13px; font-weight: 400; text-align: left; }
.console .rm-line:hover { background: var(--cb-raised); }
.rm-dot { flex: none; width: 7px; height: 7px; border: 1.5px solid var(--cb-text-3); border-radius: 50%; transform: translateY(-1px); }
.rm-line.s-doing .rm-dot { border: 0; background: var(--cb-green); }
.rm-line.s-blocked .rm-dot { border: 0; background: var(--cb-red); }
.rm-line.p-urgent:not(.s-done) .rm-dot { border: 0; background: var(--cb-amber); }
.rm-line.s-done { color: var(--cb-text-3); text-decoration: line-through; }
.rm-line.p-high:not(.s-done) .rm-line-title { font-weight: 600; }
.rm-line-title { flex: 1; min-width: 0; }
.rm-line-state { flex: none; color: var(--cb-text-3); font-size: 12px; }
.rm-item.rm-open { margin-top: 0; }

@media (max-width: 860px) {
  .console { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cs-side { position: static; flex-direction: row; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: 4px 8px; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--cb-line); }
  .cs-sub, .cs-eyebrow { display: none; }
  .cs-brand { width: 100%; margin-bottom: 4px; }
  .cs-nav { flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .cs-foot { flex-direction: row; gap: 16px; margin: 0; padding: 0 10px; border-top: 0; }
  .cs-main { padding: 16px 16px 32px; }
  .cs-panel { padding: 14px 16px; }
  .rm-timeline, .cs-columns { grid-template-columns: 1fr; }
  .rm-grid { grid-template-columns: 1fr; }
  .rm-corner, .rm-col-head { display: none !important; }
  .rm-cell-label { display: block; color: var(--cb-text-3); font-size: 12px; }
}

/* --- Pro page (/pro): a supervision page in the Razer Synapse spirit, pared down. Neutrals do the layout (three
   surfaces, three text greys, one hairline), colour only says state, with three hues: amber = needs you, green =
   working (and the controls), red = failed. One family, Roboto, in two weights; RazerF5 only for the wordmark when the
   licensed parts are on. No shadow, no glow, no uppercase. --- */
@font-face { font-family: 'RazerF5'; src: url('fonts/RazerF5-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'RazerF5'; src: url('fonts/RazerF5-Semibold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'RazerF5'; src: url('fonts/RazerF5-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('fonts/Roboto-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* The tokens sit on the page's body: the windows it opens ("Suggest a feature") use them too. */
.pro-page {
  --p-bg: var(--cb-bg);        /* page */
  --p-surface: var(--cb-surface);   /* cards, top bar */
  --p-raised: var(--cb-raised);    /* hover, active tab, inputs */
  --p-line: var(--cb-line);      /* hairlines */
  --p-text: var(--cb-text);
  --p-text-2: var(--cb-text-2);    /* secondary: activity, machine */
  --p-text-3: var(--cb-text-3);    /* tertiary: counts, times, model (5:1 on the surface) */
  --p-green: var(--cb-green);     /* working, and the controls */
  --p-amber: var(--cb-amber);     /* needs you */
  --p-red: var(--cb-red);       /* failed */
  --p-on-accent: var(--cb-on-accent);
  --p-font: var(--cb-font);
  --p-brand: var(--p-font);
  --p-r: var(--cb-r);
  --p-side: clamp(16px, 3.5vw, 56px); /* the page's side margins: 16 px on a phone, about 50 on a desktop */
  color-scheme: dark;
  background: var(--p-bg);
}
html.licensed .pro-page { --p-brand: 'RazerF5', var(--p-font); }

.pro {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--p-bg);
  color: var(--p-text);
  font: 14px/1.45 var(--p-font);
  font-variant-numeric: tabular-nums;
}
.pro[hidden], .pro [hidden] { display: none; }
:where(.pro) button { font: inherit; color: inherit; }
.pro :focus-visible { outline: 2px solid var(--p-green); outline-offset: 2px; }

.pro .st-needs-you { --state: var(--p-amber); }
.pro .st-working { --state: var(--p-green); }
.pro .st-done { --state: var(--p-text-2); }
.pro .st-idle { --state: var(--p-text-3); }
.pro .st-failed { --state: var(--p-red); }

/* Top bar: brand, pages, then the links on the right. */
.pro-top {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 12px max(var(--p-side), env(safe-area-inset-right, 0px)) 12px max(var(--p-side), env(safe-area-inset-left, 0px));
  background: var(--p-surface);
  border-bottom: 1px solid var(--p-line);
}
.pro-brand { display: flex; align-items: baseline; gap: 8px; }
.pro-brand-name { font: 600 16px/1 var(--p-brand); }
.pro-brand-tag { color: var(--p-green); font-size: 13px; }
.pro-pages { display: flex; gap: 2px; padding: 2px; background: var(--p-bg); border-radius: var(--p-r); }
.pro-page-btn {
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--p-text-2);
  font-size: 13px;
  cursor: pointer;
}
.pro-page-btn:hover { color: var(--p-text); }
.pro-page-btn.is-active { background: var(--p-raised); color: var(--p-text); }
.pro-page-btn.is-home::after { content: ''; display: inline-block; width: 4px; height: 4px; margin-left: 6px; border-radius: 50%; background: var(--p-green); vertical-align: 2px; }
.pro-page-more { min-width: 24px; padding: 0 6px; color: var(--p-text-3); }
.pro-page-more:disabled { opacity: 0.35; cursor: default; }
.pro-status { color: var(--p-amber); font-size: 13px; }
.pro-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-left: auto; }
.pro-link { padding: 0; background: none; border: 0; color: var(--p-text-2); font-size: 13px; text-decoration: none; cursor: pointer; }
.pro-link:hover { color: var(--p-text); }
.pro-link-primary { padding: 6px 12px; border-radius: 6px; background: var(--p-green); color: var(--p-on-accent); font-weight: 600; }
.pro-link-primary:hover { color: var(--p-on-accent); filter: brightness(1.08); }
.pro-account { display: flex; align-items: center; gap: 12px; padding-left: 20px; border-left: 1px solid var(--p-line); }
.pro-account-name { color: var(--p-text); font-size: 13px; }

/* Body: the state tabs, then the board, scrolling as one page. */
.pro-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px max(var(--p-side), env(safe-area-inset-right, 0px)) 40px max(var(--p-side), env(safe-area-inset-left, 0px)); }
.pro-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.pro-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--p-text-2);
  cursor: pointer;
}
.pro-tab:hover { background: var(--p-surface); color: var(--p-text); }
.pro-tab.is-active { background: var(--p-raised); color: var(--p-text); }
.pro-tab-count { color: var(--p-text-3); }
.pro-tab.is-alert, .pro-tab.is-alert .pro-tab-count { color: var(--p-amber); }

/* The board: a column per project, as many as fit. */
.pro-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; gap: 32px 28px; }
.pro-project { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pro-project-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 0 4px 4px; white-space: nowrap; }
.pro-project-name { margin: 0; overflow: hidden; font: 600 14px/1.3 var(--p-font); text-overflow: ellipsis; }
.pro-project-machine { overflow: hidden; color: var(--p-text-3); font-size: 13px; text-overflow: ellipsis; }
.pro-project-count { margin-left: auto; color: var(--p-text-3); font-size: 13px; }
/* A team page: each person's projects under their name. */
.pro-person + .pro-person { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--p-line); }
.pro-person-name { margin: 0 4px 16px; font: 600 16px/1.3 var(--p-font); }

/* A session: title and time, its state in words with what it does, then its agents. */
.pro-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  background: var(--p-surface);
  position: relative;
  overflow: hidden;
  border-radius: var(--p-r);
}
/* Waiting for you: an amber edge down its left side. */
.pro-card.st-needs-you::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--p-amber); }
.pro-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pro-card-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; font: 600 14px/1.35 var(--p-font); text-overflow: ellipsis; white-space: nowrap; }
.pro-card-time { flex: none; color: var(--p-text-3); font-size: 13px; }
.pro-card-line { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.pro-card-status { display: inline-flex; flex: none; align-items: center; gap: 6px; color: var(--p-text-2); }
.pro-card.st-needs-you .pro-card-status { color: var(--p-amber); }
.pro-card-activity { flex: 1; min-width: 0; overflow: hidden; color: var(--p-text-2); text-overflow: ellipsis; white-space: nowrap; }
.pro-card-activity:not(:empty)::before { content: '·'; margin-right: 8px; color: var(--p-text-3); }
.pro-card.st-needs-you .pro-card-activity { color: var(--p-text); }
.pro-card-meta { min-width: 0; color: var(--p-text-3); font-size: 12px; line-height: 1.5; } /* wraps: none of it is cut */
/* A model's mark before its name: the office's 7-pixel badge drawn at 2×, in the line's grey */
.pro-model-mark { width: 14px; height: 14px; margin-right: 5px; vertical-align: -3px; shape-rendering: crispEdges; }
/* The task list: a thin progress bar, done/total, the step in progress */
.pro-card-task { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.pro-card-bar { flex: none; width: 48px; height: 4px; overflow: hidden; border-radius: 2px; background: var(--p-raised); }
.pro-card-bar > i { display: block; height: 100%; background: var(--p-text-2); }
.pro-card-step { flex: none; color: var(--p-text-3); }
.pro-card-step-text { min-width: 0; overflow: hidden; color: var(--p-text-2); text-overflow: ellipsis; white-space: nowrap; }
.pro-card-errors { color: var(--p-red); }
/* A click on the activity line opens it whole (a long Bash description, a long question) */
.pro-card-line:has(.pro-card-activity[title]) { cursor: pointer; }
.pro-card-line.is-open { align-items: flex-start; }
.pro-card-line.is-open .pro-card-activity { white-space: normal; overflow-wrap: anywhere; }
.pro-card-line.is-open .pro-card-status { padding-top: 0; }
.pro-focus { flex: none; height: 24px; padding: 0 10px; background: var(--p-raised); border: 0; border-radius: 6px; color: var(--p-text-2); font-size: 12px; cursor: pointer; }
.pro-focus:hover:not(:disabled) { color: var(--p-text); }
.pro-focus:disabled { cursor: default; }

/* The state's mark: dot, check, ring or cross, in the state's colour. */
.pro-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 10px; height: 10px; color: var(--state); font-size: 11px; font-weight: 700; line-height: 1; }
.pro-mark.st-needs-you::before, .pro-mark.st-working::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--state); }
.pro-mark.st-idle::before { content: ''; width: 6px; height: 6px; border: 1.5px solid var(--state); border-radius: 50%; }

.pro-rows { margin: 8px 0 0; padding: 4px 0 0; list-style: none; border-top: 1px solid var(--p-line); }
.pro-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) minmax(0, max-content) 52px; align-items: center; gap: 10px; height: 28px; font-size: 13px; }
.pro-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-row-task { color: var(--p-text); }
.pro-row-type { margin-right: 8px; color: var(--p-text-3); }
.pro-row-tool { max-width: 160px; color: var(--p-text-3); }
.pro-row.st-failed .pro-row-tool { color: var(--p-red); }
.pro-row-time { color: var(--p-text-3); text-align: right; }
.pro-empty { color: var(--p-text-2); }

/* "Suggest a feature" and its window, in the page's colours (the window is the office's, retinted). */
.pro-page .suggest-fab { display: none; }
.pro-page .modal-box { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-r); box-shadow: none; color: var(--p-text); font-family: var(--p-font); }
.pro-page .modal .inbox-head { border-color: var(--p-line); }
.pro-page .suggest-form input, .pro-page .suggest-form textarea { background: var(--p-bg); border-color: var(--p-line); border-radius: 6px; color: var(--p-text); font-family: var(--p-font); }
.pro-page .modal-action { border-radius: 6px; font-family: var(--p-font); }

/* Phones and narrow windows: one column; the top bar wraps. */
@media (max-width: 720px) {
  .pro-top { gap: 8px 16px; padding-block: 10px; }
  .pro-links { width: 100%; margin-left: 0; justify-content: space-between; }
  .pro-account { padding-left: 0; border-left: 0; }
  .pro-body { padding-top: 16px; }
  /* Sideways rather than one long pile: the state tabs and the pages in one line, the projects side by side, each
     nearly a screen wide with the next one peeking in, snapping as you swipe */
  .pro-tabs, .pro-pages { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pro-tabs::-webkit-scrollbar, .pro-pages::-webkit-scrollbar { display: none; }
  .pro-tab, .pro-page-btn { flex: none; }
  .pro-pages { max-width: 100%; }
  .pro-board {
    display: flex;
    gap: 12px;
    margin-inline: calc(-1 * var(--p-side));
    padding-inline: var(--p-side);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--p-side);
    scrollbar-width: none;
  }
  .pro-board::-webkit-scrollbar { display: none; }
  .pro-project { flex: 0 0 86%; scroll-snap-align: start; }
  .pro-row-tool { display: none; }
  .pro-row { grid-template-columns: 10px minmax(0, 1fr) 52px; }
}

/* Motion: a crisp rise-and-fade for what arrives; moves and departures are run by pro.js. */
@keyframes pro-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.pro .is-entering { animation: pro-enter 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.pro-ghost { position: fixed; z-index: 5; box-sizing: border-box; margin: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .pro .is-entering { animation: none; } }

/* A text field has its own grey edge: it turns green when the field is selected, rather than a ring added around it.
   Last in the file, so it wins over each page's field colours. */
:is(input:not([type=checkbox], [type=radio], [type=range]), select, textarea):focus-visible { outline: none; border-color: var(--cb-green); }

/* --- "Needs you" (js/requests.js): deciding from the office, in a panel docked on the right, on every floor. Its cards
   are the Pro page's (decide.css); the few Pro rules they lean on are repeated here, scoped to the panel. --- */
.needs-button { gap: 6px; }
.needs-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 9px;
  background: var(--cb-text-3);
  color: var(--cb-bg);
  font: 600 11px/18px var(--cb-font);
  text-align: center;
}
.needs-button.has-asks .needs-badge { background: var(--cb-amber); color: var(--cb-on-accent); }
.needs-badge[hidden] { display: none; }
.needs {
  position: fixed;
  z-index: 110;
  top: 60px;
  right: 12px;
  bottom: 12px;
  box-sizing: border-box;
  width: min(480px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-r);
}
.needs[hidden] { display: none; }
.needs-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--cb-line); }
.needs-title { flex: 1; font-weight: 600; }
.needs-switch { display: inline-flex; align-items: center; gap: 6px; color: var(--cb-text-2); font-size: 12px; cursor: pointer; }
.needs-switch input { margin: 0; accent-color: var(--cb-green); }
.needs-head > button { height: 26px; padding: 0 10px; background: var(--cb-raised); border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text-2); font: 12px var(--cb-font); cursor: pointer; }
.needs-head > button:hover { color: var(--cb-text); }
.needs-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.needs-note { margin: 0; padding: 4px 6px; color: var(--cb-text-2); font-size: 13px; line-height: 1.5; }
.needs-note.is-quiet { color: var(--cb-text-3); font-size: 12px; }
.needs-note.is-strong { color: var(--cb-amber); }
.needs-item { border: 1px solid var(--cb-line); border-radius: var(--cb-r); }
.needs-item.has-asks { border-color: var(--cb-amber); }
.needs-item-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 10px 14px; background: none; border: 0; border-radius: var(--cb-r); color: var(--cb-text); font: inherit; text-align: left; cursor: pointer; }
.needs-item-head:hover { background: var(--cb-raised); }
.needs-item-title { font-weight: 600; overflow-wrap: anywhere; }
.needs-item-where { color: var(--cb-text-3); font-size: 12px; overflow-wrap: anywhere; }
.needs-item-peek { color: var(--cb-text-2); font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.needs-item-body { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 10px; }
.needs .pc-decide { padding: 14px 16px; border: 0; background: var(--cb-raised); }
.needs .pc-decide-what { font-size: 16px; }
.needs .pc-card { padding: 14px 16px; background: var(--cb-raised); border-radius: var(--cb-r); }
.needs .pc-card-title { margin: 0 0 10px; color: var(--cb-text-3); font-size: 12px; font-weight: 400; }
.needs .pc-q-option { background: var(--cb-surface); }
.needs .pc-q-options { grid-template-columns: minmax(0, 1fr); }
.needs .pc-decide-code, .needs .pc-instruct-text, .needs .pc-md-code, .needs .pc-md-pre { background: var(--cb-bg); }
.needs .pc-button { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; box-sizing: border-box; background: var(--cb-surface); border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text); font: 13px var(--cb-font); white-space: nowrap; cursor: pointer; }
.needs .pc-button:hover:not(:disabled) { background: var(--cb-line); }
.needs .pc-button:disabled { opacity: 0.45; cursor: default; }
.needs .pc-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font: 700 17px/1 var(--cb-font); }
.needs .pc-needs-you { background: var(--cb-amber); color: var(--cb-on-accent); }

/* --- "Team" (js/teams.js): your team, its floors and people, invitation links; docked where "Needs you" is --- */
.team-panel { align-items: stretch; gap: 0; margin-top: 0; color: var(--cb-text); font-size: 13px; } /* not the buddy card's .needs grid */
.team-button.is-none { color: var(--cb-text-3); }
.team-status { margin: 0; padding: 8px 18px; border-bottom: 1px solid var(--cb-line); color: var(--cb-text); font-size: 13px; }
.team-status.is-error { color: var(--cb-red); }
.team-status[hidden] { display: none; }
.team-section { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--cb-line); border-radius: var(--cb-r); }
.team-h { margin: 0; font-size: 14px; font-weight: 600; }
.team-sub { margin-top: 6px; color: var(--cb-text-3); font-size: 12px; }
.team-big { margin: 0; padding: 0 6px; font-size: 16px; font-weight: 600; }
.team-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.team-line > .team-input[type=text] { flex: 1 1 160px; min-width: 0; }
.team-input { box-sizing: border-box; height: 32px; padding: 0 10px; background: var(--cb-bg); border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); color: var(--cb-text); font: 13px var(--cb-font); }
.team-input::placeholder { color: var(--cb-text-3); }
select.team-input { padding: 0 6px; max-width: 100%; cursor: pointer; }
.team-btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; box-sizing: border-box; background: var(--cb-raised); border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text); font: 13px var(--cb-font); text-decoration: none; white-space: nowrap; cursor: pointer; }
.team-btn:hover:not(:disabled) { background: var(--cb-line); }
.team-btn.is-primary { background: var(--cb-green); color: var(--cb-on-accent); font-weight: 600; }
.team-btn.is-primary:hover:not(:disabled) { background: var(--cb-green); filter: brightness(1.08); }
.team-btn.is-armed { background: var(--cb-amber); color: var(--cb-on-accent); }
/* Two-click buttons (two-clicks.js): both labels in one cell, so the button is as wide armed as at rest */
.two-clicks { display: inline-grid; place-items: center; }
.two-clicks > span { grid-area: 1 / 1; }
.two-clicks > .two-sure, .two-clicks.is-armed > .two-calm { visibility: hidden; }
.two-clicks.is-armed > .two-sure { visibility: visible; }
.team-btn:disabled { opacity: 0.45; cursor: default; }
.team-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--cb-line); }
.team-sub + .team-row { border-top: 0; }
.team-row-main { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; overflow-wrap: anywhere; }
.team-row-sub { color: var(--cb-text-3); font-size: 12px; }
.team-row > .team-input[type=text] { flex: 1 1 120px; min-width: 0; }
.team-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.team-row-actions select.team-input { max-width: 190px; }
.team-floor-n { flex: none; width: 56px; font-size: 13px; }
.team-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.team-tag { padding: 1px 6px; border-radius: 9px; background: var(--cb-raised); color: var(--cb-text-2); font-size: 11px; }
.team-tag.is-admin { color: var(--cb-text); }
.team-people { display: flex; flex-direction: column; }
.team-link { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--cb-raised); border-radius: var(--cb-r); }
.team-link .modal-code { user-select: all; }
.team-link .team-btn { background: var(--cb-surface); }
.team-link .team-btn:hover { background: var(--cb-line); }
.modal-action.team-quiet, .modal-action.team-quiet:hover { background: var(--cb-raised); color: var(--cb-text); font-weight: 400; filter: none; }
@media (max-width: 720px) {
  .team-btn, .team-input { height: 40px; }
  .team-row-actions { width: 100%; }
  .team-row-actions select.team-input { flex: 1 1 160px; max-width: none; }
}
.card-button.is-primary { background: var(--cb-amber); color: var(--cb-on-accent); font-weight: 600; }
.card-button.is-primary:hover { background: var(--cb-amber); color: var(--cb-on-accent); filter: brightness(1.08); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 720px) {
  .needs { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; border-width: 0; }
  .needs .pc-decide-actions .pc-button { flex: 1 1 140px; height: 44px; }
}

/* --- Free layout sketch (?lab&free, js/free-layout.js) --- */
.free-panel { position: fixed; z-index: 60; top: 12px; left: 12px; width: min(330px, calc(100vw - 24px)); box-sizing: border-box; padding: 10px 12px; background: var(--cb-surface); border: 1px solid var(--cb-line); border-radius: var(--cb-r); color: var(--cb-text); font: 13px var(--cb-font); }
.free-title { margin-bottom: 8px; font-weight: 600; }
.free-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.free-label { width: 84px; color: var(--cb-text-3); font-size: 12px; }
.free-row button { height: 28px; padding: 0 10px; background: var(--cb-raised); border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text-2); font: 12px var(--cb-font); cursor: pointer; }
.free-row button:hover:not(:disabled) { color: var(--cb-text); }
.free-row button.active { background: var(--cb-green); color: var(--cb-on-accent); font-weight: 600; }
.free-row button:disabled { opacity: 0.45; cursor: default; }
.free-row button[hidden] { display: none; }
.free-note { margin: 8px 0 0; color: var(--cb-text-2); font-size: 12px; line-height: 1.45; }
/* The team floor laid out freely (free-layout.js createTeamLayout): a bar at the bottom, the editor's buttons in it */
.free-bar { position: fixed; z-index: 55; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; max-width: calc(100vw - 32px); padding: 8px 10px; background: var(--cb-surface); border: 1px solid var(--cb-line); border-radius: var(--cb-r); color: var(--cb-text); font: 13px var(--cb-font); }
.free-bar[hidden] { display: none; }
.free-bar-label { padding: 0 4px; color: var(--cb-text-3); font-size: 12px; }
.free-bar button { height: 30px; padding: 0 12px; background: var(--cb-raised); border: 0; border-radius: var(--cb-r-sm); color: var(--cb-text-2); font: 13px var(--cb-font); cursor: pointer; }
.free-bar button:hover:not(:disabled) { color: var(--cb-text); }
.free-bar button.active, .free-bar button.primary { background: var(--cb-green); color: var(--cb-on-accent); font-weight: 600; }
.free-bar button:disabled { opacity: 0.45; cursor: default; }
.free-bar button[hidden] { display: none; }
.free-bar-note { flex-basis: 100%; text-align: center; color: var(--cb-text-2); font-size: 12px; }
.free-bar-note:empty { display: none; }
@media (pointer: coarse) { .free-bar button, .free-row button { height: 44px; min-width: 44px; padding: 0 14px; font-size: 14px; } }
@media (max-width: 640px) { .free-bar { bottom: 76px; } } /* above the camera's buttons, bottom right */

/* --- The Team page (/team, js/team-page.js): your team on a page of its own, charter v2 --- */
.team-body { min-height: 100vh; margin: 0; background: var(--cb-bg); color: var(--cb-text); font: 14px var(--cb-font); }
.team-top { display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--cb-line); background: var(--cb-surface); }
.team-brand { flex: 1; font-weight: 600; }
.team-nav { display: flex; align-items: center; gap: 4px; }
.team-nav a { padding: 6px 10px; border-radius: var(--cb-r-sm); color: var(--cb-text-2); text-decoration: none; font-size: 13px; }
.team-nav a:hover { background: var(--cb-raised); color: var(--cb-text); }
.team-who { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--cb-line); color: var(--cb-text); font-size: 13px; }
.team-page { box-sizing: border-box; width: min(1040px, 100%); margin: 0 auto; padding: 28px 24px 48px; }
.team-page-head { margin-bottom: 8px; }
.team-page-title { margin: 0; font-size: 26px; font-weight: 600; }
.team-page > .team-status { margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--cb-line); border-radius: var(--cb-r); background: var(--cb-surface); }
.team-page-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.team-page-body > .team-section { background: var(--cb-surface); padding: 18px 20px; gap: 10px; }
.team-page-body > .team-section:first-child, .team-page-body > .team-choices { grid-column: 1 / -1; }
.team-page .team-h { font-size: 16px; }
.team-page .needs-note { font-size: 14px; }
.team-lead { margin: 0; font-size: 20px; font-weight: 600; }
.team-intro { border: 0; padding: 4px 0 0 !important; background: none !important; }
.team-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; }
.team-choices > .team-section { background: var(--cb-surface); padding: 22px 24px; }
.team-page .team-btn, .team-page .team-input { height: 38px; font-size: 14px; }
@media (max-width: 720px) {
  .team-top { padding: 10px 16px; }
  .team-brand { display: none; }
  .team-page { padding: 20px 16px 40px; }
}
/* Joining by a team's rule (teams.js): the count of requests on the Team button, Open's confirmation */
.team-button[data-count]:not([data-count=""])::after { content: attr(data-count); display: inline-block; min-width: 16px; height: 16px; margin-left: 6px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--cb-amber); color: var(--cb-on-accent); font-size: 11px; font-weight: 600; line-height: 16px; text-align: center; vertical-align: 1px; }
.team-confirm { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--cb-amber); border-radius: var(--cb-r-sm); }
.team-confirm .needs-note { margin-top: 0; }
/* A team's identity (teams.js): its colour as a dot, its line, the swatches its admins pick from */
.team-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }
.team-about { margin: 0 0 6px; color: var(--cb-text); font-size: 14px; }
.team-row-about { color: var(--cb-text-2); font-size: 12px; }
.team-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.team-swatch { width: 24px; height: 24px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.team-swatch.is-on { border-color: var(--cb-text); }
.team-swatch:disabled { cursor: default; opacity: 0.6; }
@media (pointer: coarse) { .team-swatch { width: 36px; height: 36px; } }
.city-about { margin: 2px 0 4px; color: var(--cb-text); font-size: 13px; line-height: 1.4; }
/* Signing in from an invitation link (main.js showInvitation): the team it's for, its line, who invites */
.auth-invite { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); background: var(--cb-raised); }
.auth-invite-by { color: var(--cb-text-2); font-size: 13px; }
.auth-invite-team { color: var(--cb-text); font-size: 16px; font-weight: 600; }
.auth-invite-about { color: var(--cb-text-2); font-size: 13px; line-height: 1.4; }
.team-handover { border-color: var(--cb-amber); }

/* --- Office or Pro (chooser.js): the first screen after signing in, the two side by side --- */
.chooser { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 20px; box-sizing: border-box; padding-block: max(28px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-bottom, 0px)); padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); background: var(--cb-bg); color: var(--cb-text); font-family: var(--cb-font); transition: opacity 0.25s; }
.chooser.is-leaving { opacity: 0; pointer-events: none; }
.chooser-title { margin: 0; text-align: center; font-size: clamp(20px, 3vw, 28px); font-weight: 600; text-wrap: balance; }
.chooser-sides { display: flex; gap: 16px; min-height: 0; }
.chooser-side { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--cb-line); border-radius: var(--cb-r); background: var(--cb-surface); color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: flex-grow 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s, border-color 0.35s; }
.chooser-shot { flex: 1 1 auto; min-height: 0; overflow: hidden; background: #0d0d0d; }
.chooser-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
.chooser-words { display: grid; gap: 6px; padding: 16px 20px 20px; }
.chooser-name { font-size: 22px; font-weight: 600; }
.chooser-text { max-width: 52ch; color: var(--cb-text-2); font-size: 14px; line-height: 1.45; }
.chooser-go { justify-self: start; margin-top: 6px; padding: 8px 14px; border-radius: var(--cb-r-sm); background: var(--cb-raised); color: var(--cb-text); font-size: 14px; font-weight: 500; transition: background 0.25s, color 0.25s; }
/* The one hovered (or focused) grows and brightens; the other dims */
.chooser-sides:hover .chooser-side:not(:hover), .chooser-sides:focus-within:not(:hover) .chooser-side:not(:focus-visible) { filter: brightness(0.55) saturate(0.6) contrast(0.9); }
.chooser-side:hover, .chooser-sides:not(:hover) .chooser-side:focus-visible { flex-grow: 1.8; filter: brightness(1.06) contrast(1.12); border-color: var(--cb-green); }
.chooser-side:hover .chooser-shot img, .chooser-side:focus-visible .chooser-shot img { transform: scale(1.03); }
.chooser-side:hover .chooser-go, .chooser-side:focus-visible .chooser-go { background: var(--cb-green); color: var(--cb-on-accent); }
.chooser-side:focus-visible { outline: none; }
.chooser-foot { margin: 0; text-align: center; color: var(--cb-text-3); font-size: 13px; }
@media (max-width: 700px) {
  .chooser { gap: 14px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .chooser-sides { flex-direction: column; gap: 12px; }
  .chooser-side:hover, .chooser-sides:not(:hover) .chooser-side:focus-visible { flex-grow: 1.4; }
  .chooser-words { padding: 12px 14px 14px; }
  .chooser-text { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .chooser, .chooser-side, .chooser-shot img, .chooser-go { transition: none; } }
.chooser:focus { outline: none; }
/* Searching the other teams (teams.js): the field and the order on one line, wrapping on a phone */
.team-search { flex-wrap: wrap; }
.team-search input { flex: 1 1 180px; min-width: 0; }
.team-search select { flex: 0 1 auto; }
.team-count { margin: 4px 0 0; }
/* The city's search (city.js): a field, its results under it */
.citypanel-search { position: relative; }
.citypanel-find { width: 100%; height: 30px; box-sizing: border-box; padding: 0 8px; background: var(--cb-bg); border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); color: var(--cb-text); font: 13px var(--cb-font); }
.citypanel-find:focus { outline: none; border-color: var(--cb-green); }
.citypanel-results { position: absolute; z-index: 2; top: calc(100% + 4px); left: 0; right: 0; display: grid; padding: 4px; background: var(--cb-surface); border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); }
.citypanel-results[hidden] { display: none; }
.citypanel-result { display: flex; align-items: baseline; gap: 6px; padding: 6px 8px; border: 0; border-radius: var(--cb-r-sm); background: none; color: var(--cb-text); font: 13px var(--cb-font); text-align: left; cursor: pointer; }
.citypanel-result:hover, .citypanel-result:focus-visible { background: var(--cb-raised); outline: none; }
.citypanel-result .team-dot { flex: none; align-self: center; }
.citypanel-result-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citypanel-result-sub { flex: none; color: var(--cb-text-3); font-size: 12px; }
.citypanel-result-none { padding: 6px 8px; color: var(--cb-text-3); font-size: 13px; }
@media (pointer: coarse) { .citypanel-find { height: 40px; } .citypanel-result { padding: 10px; } }
/* Right now in the team (teams.js, the Team page): counts by state, then each person with their state's dot */
.team-activity-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.team-chip { padding: 3px 10px; border-radius: 999px; background: var(--cb-raised); color: var(--cb-text-2); font-size: 13px; }
.team-chip b { color: var(--cb-text); }
.team-chip.is-needs { background: color-mix(in srgb, var(--cb-amber) 18%, transparent); }
.team-chip.is-needs b { color: var(--cb-amber); }
.team-chip.is-working b { color: var(--cb-green); }
.team-activity-list { display: grid; }
.team-activity-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--cb-line); font-size: 13px; }
.team-activity-row .team-row-sub { margin-left: auto; }
.team-state { flex: none; width: 8px; height: 8px; border-radius: 50%; align-self: center; background: var(--cb-text-3); }
.team-state.is-needs { background: var(--cb-amber); }
.team-state.is-working { background: var(--cb-green); }
.team-state.is-idle { background: var(--cb-text-2); }
.team-state.is-away { background: transparent; border: 1px solid var(--cb-text-3); box-sizing: border-box; }
/* Visiting another team (main.js): the elevator, the requests and the free layout wait; a bar says where you are */
.visiting .lift, .visiting .needs-button, .visiting .needs:not(.team-panel), .visiting .free-bar { display: none !important; }
.visit-bar { position: fixed; z-index: 56; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; max-width: calc(100vw - 32px); padding: 8px 12px; background: var(--cb-surface); border: 1px solid var(--cb-amber); border-radius: var(--cb-r); color: var(--cb-text); font: 13px var(--cb-font); }
.visit-bar[hidden] { display: none; }
.visit-bar button { height: 30px; padding: 0 12px; border: 0; border-radius: var(--cb-r-sm); background: var(--cb-raised); color: var(--cb-text); font: 13px var(--cb-font); cursor: pointer; }
.visit-bar button:hover { filter: brightness(1.15); }
@media (pointer: coarse) { .visit-bar button { height: 44px; } }
@media (max-width: 640px) { .visit-bar { bottom: 76px; } }
/* "Add your @razer.com email" (email-notice.js): a corner of the office and of the Pro page until it's saved */
.email-notice { position: fixed; z-index: 57; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; width: 280px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 12px; background: var(--cb-surface); border: 1px solid var(--cb-amber); border-radius: var(--cb-r); color: var(--cb-text); font: 13px var(--cb-font); }
.email-notice-text { display: flex; flex-direction: column; gap: 2px; }
.email-notice-text span { color: var(--cb-text-2); }
.email-notice-row { display: flex; gap: 6px; }
.email-notice-row input { flex: 1; min-width: 0; height: 32px; padding: 0 8px; box-sizing: border-box; background: var(--cb-bg); color: var(--cb-text); border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); font: 13px var(--cb-font); }
.email-notice-save { height: 32px; padding: 0 12px; border: 0; border-radius: var(--cb-r-sm); background: var(--cb-raised); color: var(--cb-text); font: 600 13px var(--cb-font); cursor: pointer; }
.email-notice-error { color: var(--cb-red); font-size: 12px; }
.email-notice-error:empty { display: none; }
.team-usage { margin: 6px 0 0; padding-left: 18px; color: var(--cb-text-2); font-size: 13px; line-height: 1.6; }
.email-notice.is-right { left: auto; right: max(16px, env(safe-area-inset-right, 0px)); }
@media (max-width: 640px) { .email-notice { bottom: 76px; } .email-notice.is-right { bottom: 16px; } }
.visit-note { position: fixed; z-index: 56; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100vw - 32px); box-sizing: border-box; padding: 10px 14px; background: var(--cb-surface); border: 1px solid var(--cb-line); border-radius: var(--cb-r); color: var(--cb-text); font: 13px var(--cb-font); }
@media (max-width: 640px) { .visit-note { bottom: 76px; } }
/* What colleagues see of your work (teams.js): one line per choice, its box on the left */
.team-share { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--cb-line); cursor: pointer; }
.team-share input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--cb-green); cursor: pointer; }
.team-share-words { display: grid; gap: 2px; min-width: 0; }
.team-share-label { color: var(--cb-text); font-size: 14px; }
@media (pointer: coarse) { .team-share { padding: 12px 0; } .team-share input { width: 22px; height: 22px; } }

/* "Connect my computer" (install.js): the top bar's way in while none of your computers is connected, and its window */
.userbar .connect-button { outline: 1px solid var(--cb-amber); outline-offset: -1px; color: var(--cb-text); }
@media (max-width: 700px) { .userbar .connect-button { display: none; } }
.connect-status { margin: 6px 0 10px; color: var(--cb-text); font-size: 14px; }
.connect-status.is-done { color: var(--cb-green); }
.connect-status.is-warn { color: var(--cb-amber); }
.connect-status.is-error { color: var(--cb-red); }

/* A session's task list as a checklist (tasklist.js), on the Pro page's detail and the office's card: like the Code tab's */
.task-list { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; }
.task-item { display: flex; align-items: flex-start; gap: 10px; color: var(--cb-text-2); line-height: 1.4; }
.task-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-top: 1px; box-sizing: border-box; border-radius: 50%; font-size: 10px; font-weight: 700; }
.task-item.is-completed .task-mark { background: var(--cb-text-3); color: var(--cb-bg); }
.task-item.is-completed .task-text { color: var(--cb-text-3); }
.task-item.is-in-progress { color: var(--cb-text); }
.task-item.is-in-progress .task-mark { border: 2px solid var(--cb-line); border-top-color: var(--cb-green); animation: task-spin 1s linear infinite; }
.task-item.is-pending .task-mark { border: 1.5px dashed var(--cb-text-3); }
.task-item.is-in-progress.is-stopped .task-mark { animation: none; border: 2px solid var(--cb-text-3); border-right-color: transparent; border-bottom-color: transparent; } /* where a turn that ended stopped */
.task-more { padding-left: 26px; color: var(--cb-text-3); font-size: 12px; }
@keyframes task-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .task-item.is-in-progress .task-mark { animation: none; border-color: var(--cb-green); } }
.card .task-list { max-width: 320px; margin-bottom: 4px; }

/* --- The Team page as a console (2026-11-22): the team and its sections on the left, one section on the right --- */
.team-page { display: grid; grid-template-columns: 248px minmax(0, 1fr); width: 100%; max-width: none; margin: 0; padding: 0; min-height: calc(100vh - 49px); }
.team-side { display: flex; flex-direction: column; gap: 18px; padding: 16px 12px; box-sizing: border-box; border-right: 1px solid var(--cb-line); background: var(--cb-surface); }
.team-side-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); background: var(--cb-bg); }
.team-side-head .team-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.team-side-text { display: grid; min-width: 0; }
.team-side-name { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.team-side-meta { color: var(--cb-text-3); font-size: 12px; }
.team-side-group { display: grid; gap: 1px; }
.team-side-title { padding: 0 10px 6px; color: var(--cb-text-3); font-size: 12px; }
.team-side-item { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: var(--cb-r-sm); color: var(--cb-text-2); font-size: 13px; text-decoration: none; }
.team-side-item:hover { background: var(--cb-raised); color: var(--cb-text); }
.team-side-item.is-current { background: var(--cb-raised); color: var(--cb-text); }
.team-side-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-side-count { color: var(--cb-text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.team-side-alert { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--cb-amber); color: var(--cb-on-accent); font: 700 10px/1 var(--cb-font); }
.team-main { min-width: 0; box-sizing: border-box; padding: 24px 28px 48px; }
.team-main .team-page-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 880px; margin-top: 16px; }
.team-main .team-page-body > .team-section { grid-column: auto; }
.team-main .team-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.team-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.team-tile { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--cb-r); background: var(--cb-surface); color: var(--cb-text-2); font-size: 13px; text-decoration: none; }
.team-tile b { color: var(--cb-text); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.team-tile.is-amber b { color: var(--cb-amber); }
.team-tile.is-green b { color: var(--cb-green); }
a.team-tile:hover { background: var(--cb-raised); }
@media (max-width: 760px) {
  .team-page { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .team-side { position: relative; flex-direction: row; gap: 8px; padding: 10px 16px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--cb-line); }
  .team-side-head { flex: none; }
  .team-side-group { display: flex; flex: none; gap: 2px; align-items: center; }
  .team-side-title { display: none; }
  .team-side-item { flex: none; min-height: 32px; white-space: nowrap; }
  .team-main { padding: 18px 16px 40px; }
}
.team-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; margin: 0; font-size: 13px; }
.team-facts dt { color: var(--cb-text-3); }
.team-facts dd { margin: 0; color: var(--cb-text); }
.team-facts-link { margin-left: 6px; color: var(--cb-text-3); font-size: 12px; }
.team-facts-link:hover { color: var(--cb-text); }
@media (max-width: 480px) { .team-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; } .team-facts dd { margin-bottom: 8px; } }
/* A section alone on its page: the page's title already names it */
.team-main .team-page-body > .team-section:only-child > .team-h:first-child { display: none; }
.team-nav a[aria-current="page"] { background: var(--cb-raised); color: var(--cb-text); }
.team-nav a.team-who { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--cb-line); border-radius: 0; color: var(--cb-text); }
.team-out { margin-left: 4px; padding: 6px 10px; border: 0; border-radius: var(--cb-r-sm); background: transparent; color: var(--cb-text-2); font: inherit; font-size: 13px; cursor: pointer; }
.team-out:hover, .team-out.is-armed { background: var(--cb-raised); color: var(--cb-text); }
@media (max-width: 480px) { .team-nav { gap: 0; overflow-x: auto; } .team-nav a, .team-out { padding: 6px 8px; } .team-nav a.team-who { margin-left: 4px; padding-left: 8px; } }
.console .cs-foot .cs-out { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--cb-text-2); font: inherit; font-size: 13px; cursor: pointer; }
.console .cs-foot .cs-out:hover, .console .cs-foot .cs-out.is-armed { color: var(--cb-text); }

/* --- The beta's forms (feedback-forms.js): Report a bug in a window (bug-report.js), Feedback on its page
   (feedback.html). Antoine, 2026-11-24: the console's look (the Pro page, the Team page), all the questions one after
   another: no boxes, a line between questions; choices as full rows with a square check (several) or a dot (one); the
   rating as a segmented bar; text boxes like the sign-in's (a grey edge that turns green). Charter v2: no ring, no
   shadow; plain inputs underneath, so the keyboard, screen readers and dictation work. --- */
.fb-modal { width: min(600px, 100%); }
.fb-form .fb-intro { margin: 4px 0 2px; color: var(--cb-text-2); line-height: 1.5; }
.fb-form .fb-privacy { margin: 0; color: var(--cb-text-3); font-size: 12px; }
.fb-fields { display: flex; flex-direction: column; margin: 14px 0 0; border-top: 1px solid var(--cb-line); }
.fb-q { min-width: 0; margin: 0; padding: 18px 0 20px; border: 0; border-bottom: 1px solid var(--cb-line); }
.fb-label { display: flex; gap: 10px; float: left; width: 100%; padding: 0; margin: 0 0 12px; color: var(--cb-text); font-size: 15px; font-weight: 600; line-height: 1.4; }
.fb-label + * { clear: both; }
.fb-num { flex: none; min-width: 18px; color: var(--cb-text-3); font: 500 13px/1.6 var(--cb-mono); }
.fb-req { color: var(--cb-amber); font-weight: 400; }
.fb-q.is-missing .fb-label, .fb-q.is-missing .fb-num { color: var(--cb-red); }
/* Choices: full rows, a square or a dot drawn on the real input */
.fb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 8px; padding-left: 28px; }
.fb-option { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: var(--cb-r-sm); color: var(--cb-text-2); font-size: 14px; cursor: pointer; transition: background-color .15s, color .15s; }
.fb-option:hover { background: var(--cb-raised); color: var(--cb-text); }
.fb-option input { flex: none; appearance: none; width: 16px; height: 16px; margin: 0; border: 1.5px solid var(--cb-text-3); background: transparent center / 10px no-repeat; cursor: pointer; transition: border-color .15s, background-color .15s; }
.fb-option input[type="checkbox"] { border-radius: 4px; }
.fb-option input[type="radio"] { border-radius: 50%; }
.fb-option input:checked { border-color: var(--cb-green); }
.fb-option input[type="checkbox"]:checked { background-color: var(--cb-green); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2 4 7.6 8.6 2.6' fill='none' stroke='%230b0c0e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.fb-option input[type="radio"]:checked { background-image: radial-gradient(circle, var(--cb-green) 0 3.5px, transparent 4px); background-size: 100% 100%; }
.fb-option:has(input:checked) { color: var(--cb-text); }
.fb-option input:focus-visible { outline: 2px solid var(--cb-green); outline-offset: 2px; }
/* The rating: one bar of five */
.fb-rating { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 360px; margin-left: 28px; border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); overflow: hidden; }
.fb-score { position: relative; display: flex; align-items: center; justify-content: center; height: 38px; color: var(--cb-text-2); font: 600 14px var(--cb-font); font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .15s, color .15s; }
.fb-score + .fb-score { border-left: 1px solid var(--cb-line); }
.fb-score:hover { background: var(--cb-raised); color: var(--cb-text); }
.fb-score input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fb-score:has(input:checked) { background: var(--cb-green); color: var(--cb-on-accent); }
.fb-score:has(input:focus-visible) { outline: 2px solid var(--cb-green); outline-offset: -2px; }
.fb-ends { display: flex; justify-content: space-between; max-width: 360px; margin: 6px 0 0 28px; color: var(--cb-text-3); font-size: 12px; }
/* Text boxes */
.fb-text { box-sizing: border-box; display: block; width: calc(100% - 28px); margin: 10px 0 0 28px; padding: 9px 12px; border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); background: var(--cb-surface); color: var(--cb-text); font: 14px/1.45 var(--cb-font); resize: vertical; transition: border-color .2s; }
.fb-modal .fb-text, .fb-modal .fb-upload { background: var(--cb-bg); }
.fb-text:hover:not(:focus) { border-color: var(--cb-text-3); }
.fb-text:focus { border-color: var(--cb-green); outline: none; }
.fb-text::placeholder { color: var(--cb-text-3); }
input.fb-text { height: 36px; }
.fb-other:not([hidden]) { animation: fb-open .22s ease-out; }
@keyframes fb-open { from { opacity: 0; transform: translateY(-4px); } }
.fb-error:empty { display: none; }
.fb-error { margin: 12px 0 0; }
/* The screenshot */
.fb-shot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: 28px; padding: 16px; border: 1px dashed var(--cb-text-3); border-radius: var(--cb-r-sm); }
.fb-shot-hint { flex: 1 1 180px; margin: 0; color: var(--cb-text-2); }
.fb-file { display: none; }
.fb-upload { height: 32px; padding: 0 14px; border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); background: var(--cb-surface); color: var(--cb-text); font: 13px var(--cb-font); cursor: pointer; transition: border-color .15s; }
.fb-upload:hover { border-color: var(--cb-text-3); }
.fb-preview { display: block; max-width: 100%; max-height: 220px; border-radius: 4px; }
.fb-shot-note { margin: 8px 0 0 28px; color: var(--cb-text-3); font-size: 12px; }
.fb-shot .settings-error:empty { display: none; }
/* The page */
.fb-main { box-sizing: border-box; display: flex; justify-content: center; padding: 28px max(16px, env(safe-area-inset-left, 0px)) 56px; }
.fb-sheet { box-sizing: border-box; width: min(720px, 100%); }
.fb-title { margin: 6px 0 8px; font-size: 24px; font-weight: 600; text-wrap: balance; }
.fb-page .fb-intro { margin: 0 0 4px; color: var(--cb-text-2); }
.fb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
.fb-actions .modal-action { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; background: var(--cb-green); color: var(--cb-on-accent); text-decoration: none; }
.fb-thanks { padding-top: 32px; }
.fb-page .fb-q { animation: fb-rise .4s cubic-bezier(.22, .61, .36, 1) both; }
.fb-page .fb-q:nth-child(2) { animation-delay: .04s; }
.fb-page .fb-q:nth-child(3) { animation-delay: .08s; }
.fb-page .fb-q:nth-child(4) { animation-delay: .12s; }
.fb-page .fb-q:nth-child(n+5) { animation-delay: .16s; }
@keyframes fb-rise { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 480px) {
  .fb-options, .fb-rating, .fb-ends, .fb-shot { margin-left: 0; padding-left: 0; }
  .fb-options { grid-template-columns: 1fr; }
  .fb-text, .fb-shot-note { width: 100%; margin-left: 0; }
  .fb-rating, .fb-ends { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .fb-page .fb-q, .fb-other:not([hidden]) { animation: none; } }

/* /admin's Feedback tab */
.fb-admin-note { margin: 0 0 10px; max-width: 80ch; }
.fb-admin-exports { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 10px; }
.fb-admin-exports .cs-note:not(:first-child) { margin-left: 10px; }
.fb-admin-kinds { display: flex; gap: 6px; margin-bottom: 10px; }
.fb-admin-answers { min-width: 280px; }
.fb-admin-line { margin: 2px 0; line-height: 1.4; }

/* --- Phones (Antoine, 2026-11-24): the top bars on one line with a ☰ menu (bar-menu.js), the elevator's panel folded
   to its display, the Pro page's title on its own line. Above 640 px nothing changes. --- */
.has-menu .bar-menu-button { display: none; } /* above the bars' own button styles */
@media (max-width: 640px) {
  .has-menu { flex-wrap: nowrap; }
  .has-menu > :not(.bar-keep) { display: none !important; }
  .has-menu .bar-menu-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; padding: 0; }
  .has-menu.is-menu-open { flex-direction: column; align-items: stretch; gap: 2px; min-width: 200px; padding: 6px; background: var(--cb-surface); border: 1px solid var(--cb-line); border-radius: var(--cb-r); }
  .has-menu.is-menu-open > :not([hidden]) { display: flex !important; justify-content: flex-start; margin: 0; }
  .has-menu.is-menu-open > .bar-menu-button { order: -2; align-self: flex-end; justify-content: center; }
  /* The other view (Office ⇄ Pro) first and set apart: it's what the menu is opened for most */
  .has-menu.is-menu-open > :not(.bar-menu-button):not(.bar-view) { order: 1; }
  .has-menu.is-menu-open > .bar-view { order: -1; margin-bottom: 4px !important; padding: 0 12px; height: 40px; border: 1px solid var(--cb-green); border-radius: var(--cb-r-sm); color: var(--cb-text); font-weight: 600; }
  .has-menu.is-menu-open > .bar-view::after { content: '⇄'; margin-left: auto; color: var(--cb-green); }
  .has-menu.is-menu-open .idea-label { display: inline; }
  .has-menu.is-menu-open .userbar-account, .has-menu.is-menu-open .pc-account { margin: 4px 0 0; padding: 6px 0 0; border-left: 0; border-top: 1px solid var(--cb-line); }
  .userbar.has-menu { max-width: calc(100vw - 24px); }
  .pc-bar { position: relative; flex-wrap: nowrap; }
  .pc-links.is-menu-open { position: absolute; top: 8px; right: 12px; z-index: 40; }
  .pc-brand-name { font-size: 15px; }
  /* The elevator's panel: its display alone, the floors on a tap */
  .lift:not(.is-open) > :not(.lift-display) { display: none; }
  .lift .lift-display { cursor: pointer; }
  .lift .lift-display::after { content: '▾'; margin-left: 4px; color: var(--cb-text-3); font-size: 11px; }
  .lift.is-open .lift-display::after { content: '▴'; }
  /* The Pro page's title above its controls */
  .pc .pc-titlerow { flex-wrap: wrap; row-gap: 8px; }
  .pc .pc-titlerow .pc-title { flex: 1 1 100%; font-size: 18px; }
  .pc .pc-titlerow .pc-pageselect:not([hidden]) { flex: 1; min-width: 0; }
}

/* The beta's welcome card (beta-welcome.js): once, in a corner, after "During the test" */
.beta-welcome { position: fixed; z-index: 95; left: max(16px, env(safe-area-inset-left, 0px)); bottom: 16px; box-sizing: border-box; width: min(340px, calc(100vw - 32px)); padding: 16px 18px 14px; border: 1px solid var(--cb-line); border-top: 3px solid var(--cb-green); border-radius: var(--cb-r); background: var(--cb-surface); color: var(--cb-text-2); font: 13px/1.5 var(--cb-font); animation: beta-in .4s cubic-bezier(.22, .61, .36, 1) both; }
.beta-welcome.is-leaving { animation: beta-out .22s ease-in both; }
.beta-welcome p { margin: 6px 0; }
.beta-welcome strong { color: var(--cb-text); }
.beta-welcome-title { padding-right: 24px; color: var(--cb-text); font-size: 15px; font-weight: 600; }
.beta-welcome-close { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--cb-r-sm); background: none; color: var(--cb-text-3); cursor: pointer; }
.beta-welcome-close:hover { background: var(--cb-raised); color: var(--cb-text); }
.beta-welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.beta-welcome-go { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--cb-r-sm); background: var(--cb-green); color: var(--cb-on-accent); font-weight: 600; text-decoration: none; }
.beta-welcome-help { color: var(--cb-text); text-underline-offset: 3px; }
.beta-welcome-ok { margin-left: auto; padding: 0; border: 0; background: none; color: var(--cb-text-2); font: 13px var(--cb-font); text-decoration: underline; text-decoration-color: var(--cb-line); text-underline-offset: 3px; cursor: pointer; }
@keyframes beta-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes beta-out { to { opacity: 0; transform: translateY(8px); } }
@media (max-width: 640px) { .beta-welcome { bottom: 76px; } } /* above the office's camera buttons */
@media (prefers-reduced-motion: reduce) { .beta-welcome, .beta-welcome.is-leaving { animation: none; } }

/* /admin on a phone: its side pane is one line (the name and ☰), the tabs and links drop under it when opened */
.cs-toggle { display: none; }
@media (max-width: 640px) {
  .cs-side { flex-wrap: wrap; padding: 10px 16px; }
  .cs-side .cs-brand { width: auto; flex: 1; margin: 0; font-size: 15px; }
  .cs-side .cs-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; padding: 0; border: 1px solid var(--cb-line); border-radius: var(--cb-r-sm); background: transparent; color: var(--cb-text-2); cursor: pointer; }
  .cs-side .cs-toggle:hover, .cs-side.is-open .cs-toggle { background: var(--cb-raised); color: var(--cb-text); }
  .cs-side:not(.is-open) > :not(.cs-brand):not(.cs-toggle) { display: none !important; }
  .cs-side.is-open .cs-sub, .cs-side.is-open .cs-eyebrow { display: block; width: 100%; }
  .cs-side.is-open .cs-nav { flex-direction: column; width: 100%; }
  .cs-side.is-open .cs-foot { flex-direction: column; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 10px 4px; border-top: 1px solid var(--cb-line); }
}
/* /team and /account on a phone: the strip holds the sections only (the page's title names the team or you) */
@media (max-width: 760px) { .team-side .team-side-head { display: none; } }
