/* SpaceOps — Weekly Pattern.
 *
 * Scoped to the three pattern pages. Everything is .wp-* prefixed. Colours come
 * from the Kadence tokens only — nothing here hard-codes a hex.
 *
 * Density is deliberate. This screen replaces a spreadsheet, and a planner who
 * lives in Excel reads a sparse layout as a toy.
 */

/* Team colour palette, mirrored from the stack-plan artefact in
   space-ops/agent/conversation so a team keeps one colour across both surfaces.
   Index is hashString(name) % 51, same derivation as _shared/js/seed.js. */
/* Team colour palette (subset of space-ops-colors.scss — first 16). */
:root {
  --space-ops-0:  hsl(357, 96%, 58%);
  --space-ops-1:  hsl(25, 100%, 50%);
  --space-ops-2:  hsl(36, 100%, 50%);
  --space-ops-3:  hsl(44, 100%, 47%);
  --space-ops-4:  hsl(84, 100%, 41%);
  --space-ops-5:  hsl(144, 100%, 39%);
  --space-ops-6:  hsl(160, 100%, 37%);
  --space-ops-7:  hsl(174, 100%, 37%);
  --space-ops-8:  hsl(190, 100%, 43%);
  --space-ops-9:  hsl(199, 100%, 48%);
  --space-ops-10: hsl(216, 100%, 58%);
  --space-ops-11: hsl(241, 100%, 69%);
  --space-ops-12: hsl(261, 100%, 66%);
  --space-ops-13: hsl(273, 100%, 64%);
  --space-ops-14: hsl(293, 96%, 58%);
  --space-ops-15: hsl(328, 92%, 58%);
  --space-ops-16: hsl(345, 100%, 56%);
  --space-ops-17: hsl(359, 100%, 82%);
  --space-ops-18: hsl(31, 100%, 71%);
  --space-ops-19: hsl(47, 100%, 59%);
  --space-ops-20: hsl(52, 100%, 56%);
  --space-ops-21: hsl(81, 88%, 64%);
  --space-ops-22: hsl(143, 82%, 71%);
  --space-ops-23: hsl(157, 77%, 64%);
  --space-ops-24: hsl(172, 81%, 60%);
  --space-ops-25: hsl(187, 98%, 66%);
  --space-ops-26: hsl(199, 100%, 73%);
  --space-ops-27: hsl(210, 100%, 78%);
  --space-ops-28: hsl(229, 100%, 82%);
  --space-ops-29: hsl(254, 100%, 85%);
  --space-ops-30: hsl(271, 100%, 85%);
  --space-ops-31: hsl(292, 100%, 83%);
  --space-ops-32: hsl(328, 98%, 82%);
  --space-ops-33: hsl(351, 100%, 81%);
  --space-ops-34: hsl(358, 100%, 38%);
  --space-ops-35: hsl(16, 100%, 40%);
  --space-ops-36: hsl(25, 100%, 37%);
  --space-ops-37: hsl(34, 100%, 33%);
  --space-ops-38: hsl(85, 100%, 25%);
  --space-ops-39: hsl(145, 100%, 25%);
  --space-ops-40: hsl(162, 100%, 24%);
  --space-ops-41: hsl(176, 100%, 24%);
  --space-ops-42: hsl(193, 100%, 29%);
  --space-ops-43: hsl(203, 100%, 33%);
  --space-ops-44: hsl(225, 84%, 49%);
  --space-ops-45: hsl(248, 68%, 51%);
  --space-ops-46: hsl(268, 94%, 47%);
  --space-ops-47: hsl(276, 100%, 43%);
  --space-ops-48: hsl(295, 100%, 36%);
  --space-ops-49: hsl(332, 100%, 39%);
  --space-ops-50: hsl(344, 100%, 39%);
}
.stack-plan-tab { display: flex; flex-direction: column; }

/* ------------------------------------------------------------------ page */

wx-weekly-pattern {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
  padding: 0 2rem 1rem;
  background: var(--bulma-background);
}

.wp-topline {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.625rem 0 0.4375rem; flex-shrink: 0;
}
.wp-topline__left { display: flex; align-items: baseline; gap: 0.75rem; min-width: 0; }
/* The building name never wraps. When space is tight the meta line gives way
   first — a two-line title costs a row of the grid. */
.wp-topline__title { font-size: 1.25rem; font-weight: 700; color: var(--bulma-text); margin: 0; white-space: nowrap; }
.wp-topline__meta { font-size: 0.75rem; font-weight: 500; color: var(--bulma-text-weak); white-space: nowrap; }
.wp-topline__meta b { color: var(--bulma-text); font-weight: 600; }
.wp-toolbar { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* A number the planner tunes, sitting inline in the toolbar rather than buried
   in a settings page — the ledger recalculates on every keystroke. */
.wp-rate { display: flex; align-items: center; gap: 0.375rem; }
.wp-rate label { font-size: 0.75rem; font-weight: 600; color: var(--bulma-text-weak); white-space: nowrap; }
.wp-rate input.input {
  width: 4.25rem; font-size: 0.8125rem; height: 1.75rem;
  text-align: right; font-variant-numeric: tabular-nums; padding: 0 0.25rem;
}

.wp-banner {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.3125rem 0.625rem; margin-bottom: 0.375rem; flex-shrink: 0;
  border-radius: var(--bulma-radius-large);
  background: var(--kadence-blue-100);
  font-size: 0.75rem; font-weight: 500; color: var(--kadence-blue-600);
}
.wp-banner--warning { background: var(--kadence-yellow-100); color: var(--kadence-yellow-600); }
.wp-banner a { color: inherit; text-decoration: underline; font-weight: 700; }
.wp-banner__spacer { flex: 1; }
.wp-banner .delete { background: rgba(0,0,0,0.12); }

/* ------------------------------------------------------- staged reveal */

/* The grid is built in two passes, because the workbook itself has two layers.
   Pass one is the floor-day totals — those are the real figures photographed from
   Sandy's sheet, and they are what turn Floor 33 red. Pass two places the teams.
   Landing on both at once buries the capacity finding under fourteen team names.

   Columns reserve their space from the start, so nothing reflows as days arrive
   and the whole week still fits one viewport on the first frame. */
.wp-reveal {
  opacity: 0; transform: translateY(0.25rem);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.wp-reveal.is-in { opacity: 1; transform: none; }

.wp-grid .wp-bar__seg,
.wp-grid .wp-teams > li {
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.wp-grid .wp-teams > li { transform: scale(0.97); }
.wp-grid.is-teams .wp-bar__seg { opacity: 1; }
.wp-grid.is-teams .wp-teams > li { opacity: 1; transform: none; }

/* Holds the pills' height before they arrive so the reveal does not push the
   ledger around underneath them. */
.wp-teams { min-height: var(--wp-teams-h, 0); }

/* Per-day generation. A day that has not been generated shows its shape but not
   its numbers — there has to be something left for the click to do. */
.wp-cell--ungenerated {
  align-items: stretch; justify-content: center;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 6px,
    var(--bulma-scheme-main-bis) 6px, var(--bulma-scheme-main-bis) 12px);
}
.wp-cell--ungenerated .wp-placeholder {
  border: 1px dashed var(--kadence-grey-300); border-radius: var(--bulma-radius-large);
  background: var(--bulma-scheme-main);
  padding: 0.5rem 0.375rem; text-align: center;
  font-size: 0.625rem; font-weight: 600; color: var(--kadence-grey-350);
}

.wp-gen {
  display: inline-flex; align-items: center; gap: 0.25rem;
  margin-top: 0.1875rem; padding: 0.0625rem 0.4375rem;
  border: 1px solid var(--kadence-pink-200); border-radius: 999px;
  background: var(--kadence-pink-100); color: var(--kadence-pink-600);
  font-size: 0.625rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.wp-gen:hover { background: var(--kadence-pink-200); }
.wp-gen[disabled] { opacity: 0.45; cursor: default; }
.wp-gen.is-running { background: var(--kadence-grey-200); border-color: var(--kadence-grey-300); color: var(--kadence-grey-500); }

/* Reasoning lines in the generate modal. Each one is computed, so each one is
   worth reading — colour-coded by what kind of statement it is. */
.wp-reasons { display: flex; flex-direction: column; gap: 0.4375rem; min-height: 12rem; }
.wp-reason {
  display: flex; gap: 0.5rem; align-items: flex-start;
  font-size: 0.8125rem; line-height: 1.45; font-weight: 500; color: var(--bulma-text);
  opacity: 0; transform: translateY(0.1875rem);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.wp-reason.is-in { opacity: 1; transform: none; }
.wp-reason__dot {
  width: 0.4375rem; height: 0.4375rem; border-radius: 50%; flex-shrink: 0; margin-top: 0.375rem;
  background: var(--kadence-grey-300);
}
.wp-reason--scope .wp-reason__dot { background: var(--kadence-blue-400); }
.wp-reason--constraint .wp-reason__dot { background: var(--kadence-blue-400); }
.wp-reason--continuity .wp-reason__dot { background: var(--kadence-green-400); }
.wp-reason--placement .wp-reason__dot { background: var(--kadence-green-500); }
.wp-reason--finding .wp-reason__dot { background: var(--kadence-red-500); }
.wp-reason--finding { color: var(--kadence-red-600); font-weight: 600; }
.wp-reason--done .wp-reason__dot { background: var(--bulma-primary); }
.wp-reason--done { font-weight: 700; }

.wp-genfoot { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 600; color: var(--bulma-text-weak); }

.wp-import[hidden] { display: none; }
.wp-import {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.5rem;
  padding: 2rem; text-align: center;
}
.wp-import__title { font-size: 1rem; font-weight: 700; color: var(--bulma-text); }
.wp-import__sub { font-size: 0.8125rem; font-weight: 500; color: var(--bulma-text-weak); max-width: 26rem; line-height: 1.5; }
.wp-import__meta { font-size: 0.6875rem; font-weight: 600; color: var(--kadence-grey-350); }

.wp-progress {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 600; color: var(--bulma-text-weak);
}
.wp-progress__dots { display: inline-flex; gap: 0.1875rem; }
.wp-progress__dot { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--kadence-grey-300); }
.wp-progress__dot.is-in { background: var(--bulma-primary); }

/* ------------------------------------------------------------- week grid */

.wp-gridwrap {
  flex: 1; min-height: 0; overflow: auto;
  background: var(--bulma-scheme-main);
  border-radius: var(--bulma-radius-large);
  box-shadow: var(--bulma-shadow);
}
/* .wp-grid's display would otherwise beat [hidden] on specificity order. */
.wp-grid[hidden] { display: none; }
.wp-grid {
  display: grid;
  grid-template-columns: 8.5rem repeat(5, minmax(0, 1fr));
  /* Five days must survive first paint at 1440. Anything wider than this and
     Friday falls off the edge, which is the one thing this screen cannot do. */
  min-width: 50rem;
  font-variant-numeric: tabular-nums;
}

.wp-head {
  position: sticky; top: 0; z-index: 3;
  background: var(--bulma-scheme-main);
  border-bottom: 1px solid var(--bulma-border);
  padding: 0.4375rem 0.5rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
}
.wp-head--corner {
  position: sticky; left: 0; z-index: 4;
  font-size: 0.6875rem; font-weight: 600; color: var(--bulma-text-weak);
}
.wp-head__day { font-size: 0.8125rem; font-weight: 700; color: var(--bulma-text); }
.wp-head__bu { display: block; font-size: 0.625rem; font-weight: 500; color: var(--bulma-text-weak); line-height: 1.3; }
.wp-head__bu--contested { color: var(--kadence-orange-600); font-weight: 600; }

.wp-floorlabel {
  position: sticky; left: 0; z-index: 2;
  background: var(--bulma-scheme-main);
  border-right: 1px solid var(--bulma-border);
  border-bottom: 1px solid var(--bulma-border);
  padding: 0.4375rem 0.5rem;
  text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 0.125rem;
}
.wp-floorlabel:hover { background: var(--kadence-table-hover); }
.wp-floorlabel__top { display: flex; align-items: center; gap: 0.375rem; }
.wp-floorlabel__chev { color: var(--bulma-primary); font-size: 0.625rem; transition: transform 0.15s ease; }
.wp-floorlabel[aria-expanded="true"] .wp-floorlabel__chev { transform: rotate(90deg); }
.wp-floorlabel__name { font-size: 0.875rem; font-weight: 700; color: var(--bulma-text); }
.wp-floorlabel__note { font-size: 0.625rem; font-weight: 500; color: var(--bulma-text-weak); line-height: 1.35; }
.wp-floorlabel__cap {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.6875rem; font-weight: 600; color: var(--bulma-text-weak);
}
.wp-floorlabel__cap wx-icon { color: var(--kadence-grey-350); }

.wp-nbhdlabel {
  position: sticky; left: 0; z-index: 2;
  background: var(--bulma-scheme-main-bis);
  border-right: 1px solid var(--bulma-border);
  border-bottom: 1px solid var(--bulma-border);
  padding: 0.3125rem 0.5rem 0.3125rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.0625rem;
}
.wp-nbhdlabel__name { font-size: 0.75rem; font-weight: 600; color: var(--bulma-text); }
.wp-nbhdlabel__meta { font-size: 0.625rem; font-weight: 500; color: var(--bulma-text-weak); }

.wp-cell {
  border-right: 1px solid var(--bulma-border);
  border-bottom: 1px solid var(--bulma-border);
  padding: 0.4375rem 0.5rem 0.375rem;
  display: flex; flex-direction: column; gap: 0.3125rem;
  min-width: 0;
}
.wp-cell--nbhd { background: var(--bulma-scheme-main-bis); padding-top: 0.3125rem; padding-bottom: 0.3125rem; }

/* Utilisation bar, borrowed from the stack-plan screen: one segment per team in
   that team's colour, grey for the seats still free. When a floor-day is over its
   cap the segments fill the bar and it takes a red rule, because there is no
   honest way to draw 110% of a bar. */
.wp-bar {
  display: flex; height: 0.375rem; border-radius: 999px; overflow: hidden;
  background: var(--kadence-grey-200); flex-shrink: 0;
}
.wp-bar--over { box-shadow: 0 0 0 1px var(--kadence-red-500); }
.wp-bar__seg { height: 100%; min-width: 1px; }

.wp-used { font-size: 0.6875rem; font-weight: 600; color: var(--bulma-text-weak); }
.wp-used b { color: var(--bulma-text); font-weight: 700; }
.wp-used.is-over, .wp-used.is-over b { color: var(--kadence-red-600); }

/* Headroom encoding. The three-state ramp is the same idiom the move manager
   uses for deadline urgency, so it reads as one product. */
.wp-cell--comfortable .wp-ledger__rem { color: var(--kadence-green-600); }
.wp-cell--tight { background: var(--kadence-yellow-100); }
.wp-cell--tight .wp-ledger__rem { color: var(--kadence-yellow-600); }
.wp-cell--over  { background: var(--kadence-red-100); }
.wp-cell--over .wp-ledger__rem { color: var(--kadence-red-600); }

.wp-teams { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.1875rem; }
.wp-team {
  display: flex; align-items: center; gap: 0.25rem; width: 100%;
  padding: 0.03125rem 0.3125rem;
  background: var(--bulma-scheme-main);
  border: 1px solid var(--bulma-border);
  border-radius: 999px;
  font-size: 0.6875rem; line-height: 1.5; font-weight: 500;
  color: var(--bulma-text); text-align: left; cursor: pointer;
}
.wp-team:hover { border-color: var(--kadence-pink-300); }
.wp-team__dot { width: 0.375rem; height: 0.375rem; border-radius: 50%; flex-shrink: 0; }
.wp-team__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-team__num {
  flex-shrink: 0; font-size: 0.625rem; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--kadence-blue-100); color: var(--kadence-blue-600);
  border-radius: 999px; padding: 0 0.25rem;
}
/* A team on Tue and Thu reads as one team without clicking: hovering any of its
   pills lights every other day it appears on. */
.wp-team.is-linked { border-color: var(--bulma-primary); background: var(--kadence-pink-50); }
.wp-team--empty { border-style: dashed; color: var(--kadence-grey-350); cursor: default; }
.wp-team--empty:hover { border-color: var(--bulma-border); }
/* A team sitting in more than one neighborhood on the same floor. Expand the
   floor to see how it splits. */
.wp-split { font-size: 0.5625rem; font-weight: 700; color: var(--bulma-text-weak); }

.wp-ledger {
  margin-top: auto;
  padding-top: 0.25rem;
  display: grid; grid-template-columns: 1fr auto; gap: 0 0.375rem;
  font-size: 0.625rem; line-height: 1.55;
}
.wp-ledger span { color: var(--kadence-grey-350); font-weight: 500; }
.wp-ledger b { font-weight: 600; color: var(--bulma-text-weak); text-align: right; font-variant-numeric: tabular-nums; }
.wp-ledger__rem { font-weight: 700 !important; }
.wp-ledger__lbl--rem { color: var(--bulma-text-weak) !important; font-weight: 600 !important; }

.wp-tag {
  display: inline-block; padding: 0 0.3125rem; border-radius: 999px;
  font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--kadence-chip-neutral-bg); color: var(--kadence-chip-neutral-text);
}
.wp-tag--heads-down { background: var(--kadence-blue-100); color: var(--kadence-blue-600); }
.wp-tag--collaborative { background: var(--kadence-orange-100); color: var(--kadence-orange-600); }
.wp-tag--activity-based { background: var(--kadence-green-100); color: var(--kadence-green-600); }

/* ---------------------------------------------------------- side panels */

.wp-shell { flex: 1; min-height: 0; display: flex; gap: 0.75rem; position: relative; }
.wp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }

.wp-rail {
  width: 16rem; flex-shrink: 0; display: flex; flex-direction: column; gap: 0.5rem;
  min-height: 0; overflow-y: auto;
}
.wp-card {
  background: var(--bulma-scheme-main);
  border-radius: var(--bulma-radius-large);
  box-shadow: var(--bulma-shadow);
  padding: 0.625rem 0.75rem;
}
.wp-card__title {
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--bulma-text-weak); margin-bottom: 0.375rem;
}
.wp-item {
  display: block; padding: 0.375rem 0; border-top: 1px solid var(--bulma-border);
  font-size: 0.75rem; color: var(--bulma-text); text-decoration: none;
}
.wp-item:first-of-type { border-top: none; }
.wp-item:hover .wp-item__title { color: var(--bulma-primary); }
.wp-item__title { font-weight: 600; line-height: 1.35; display: block; }
.wp-item__meta { font-size: 0.6875rem; color: var(--bulma-text-weak); font-weight: 500; }

/* --------------------------------------------------------- change request */

.wp-page { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 1rem; }
.wp-section { margin-bottom: 1rem; }
.wp-section__title { font-size: 0.9375rem; font-weight: 700; color: var(--bulma-text); margin-bottom: 0.375rem; }
.wp-section__sub { font-size: 0.75rem; color: var(--bulma-text-weak); font-weight: 500; margin-bottom: 0.5rem; }

/* Delta chips are the contract between what the planner said and what the engine
   will solve. Editable, and never solved on until confirmed. */
.wp-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.wp-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.5rem; border-radius: 999px;
  background: var(--kadence-pink-100); color: var(--kadence-pink-600);
  font-size: 0.75rem; font-weight: 600;
}
.wp-chip__kind {
  font-size: 0.5625rem; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bulma-scheme-main); color: var(--kadence-pink-600);
  border-radius: 999px; padding: 0 0.3125rem; font-weight: 700;
}
.wp-chip input.input {
  width: 3.5rem; height: 1.5rem; font-size: 0.75rem; text-align: right;
  border-bottom-color: var(--kadence-pink-400); font-variant-numeric: tabular-nums;
}
.wp-chip .delete { background: rgba(0,0,0,0.14); }
.wp-chip--unconfirmed { background: var(--kadence-grey-200); color: var(--kadence-grey-500); }

/* The solve names what it is evaluating. A spinner with no content invites the
   question this screen exists to answer. */
.wp-solve { display: flex; flex-direction: column; gap: 0.5rem; max-width: 34rem; }
.wp-solve__step {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; font-weight: 500; color: var(--kadence-grey-350);
  transition: color 0.2s ease;
}
.wp-solve__step.is-active { color: var(--bulma-text); font-weight: 600; }
.wp-solve__step.is-done { color: var(--bulma-text-weak); }
.wp-solve__dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%; flex-shrink: 0;
  background: var(--kadence-grey-300);
}
.wp-solve__step.is-active .wp-solve__dot { background: var(--bulma-primary); }
.wp-solve__step.is-done .wp-solve__dot { background: var(--bulma-success); }

.wp-option {
  background: var(--bulma-scheme-main);
  border: 1px solid var(--bulma-border);
  border-radius: var(--bulma-radius-large);
  margin-bottom: 0.625rem; overflow: hidden;
}
.wp-option.is-open { border-color: var(--bulma-primary); }
.wp-option.is-blocked { border-color: var(--kadence-red-400); }
.wp-option__head {
  display: flex; align-items: flex-start; gap: 0.75rem; width: 100%;
  padding: 0.625rem 0.75rem; background: none; border: none; cursor: pointer; text-align: left;
}
.wp-option__head:hover { background: var(--kadence-table-hover); }
.wp-option__rank {
  font-size: 0.6875rem; font-weight: 700; color: var(--bulma-text-weak);
  background: var(--kadence-grey-200); border-radius: 999px;
  padding: 0.0625rem 0.4375rem; flex-shrink: 0; margin-top: 0.125rem;
}
.wp-option__main { flex: 1; min-width: 0; }
.wp-option__label { display: block; font-size: 0.875rem; font-weight: 700; color: var(--bulma-text); }
/* The blast radius sits directly under the label, on its own line. It is the
   first thing a planner reads and the direct answer to "what did you touch?". */
.wp-option__radius { display: block; font-size: 0.75rem; font-weight: 600; color: var(--bulma-text-weak); margin-top: 0.0625rem; }
.wp-option__main .tag { display: inline-block; }
.wp-option__body { padding: 0 0.75rem 0.75rem; border-top: 1px solid var(--bulma-border); }

/* Score chips reuse the segmented-stat idiom from the move manager. */
.wp-scores { display: flex; gap: 0.25rem; flex-shrink: 0; }
.wp-score {
  min-width: 4.25rem; padding: 0.1875rem 0.375rem; border-radius: 0.375rem;
  background: var(--bulma-scheme-main-bis); text-align: center;
}
.wp-score__num { display: block; font-size: 0.9375rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wp-score__lbl { display: block; font-size: 0.5625rem; font-weight: 600; color: var(--bulma-text-weak); line-height: 1.3; }
.wp-score--good .wp-score__num { color: var(--kadence-green-500); }
.wp-score--mid  .wp-score__num { color: var(--kadence-orange-600); }
.wp-score--poor .wp-score__num { color: var(--kadence-red-600); }

/* Move chains render as chains. A cascaded move sits under the move that forced
   it — that relationship is the answer to "why did my team move?". */
.wp-moves { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.wp-move {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.3125rem 0; font-size: 0.75rem; border-top: 1px solid var(--bulma-border);
}
.wp-move--cascaded { padding-left: 1.5rem; position: relative; }
.wp-move--cascaded::before {
  content: ""; position: absolute; left: 0.5rem; top: 0; bottom: 50%;
  border-left: 1px solid var(--kadence-grey-300);
  border-bottom: 1px solid var(--kadence-grey-300);
  width: 0.5rem; border-bottom-left-radius: 4px;
}
.wp-move__day {
  font-size: 0.625rem; font-weight: 700; color: var(--bulma-text-weak);
  background: var(--kadence-grey-200); border-radius: 999px; padding: 0 0.375rem; flex-shrink: 0;
}
.wp-move__team { font-weight: 600; color: var(--bulma-text); }
.wp-move__path { color: var(--bulma-text-weak); font-weight: 500; }
.wp-move__cause { font-size: 0.6875rem; color: var(--kadence-orange-600); font-weight: 600; }

.wp-violation {
  display: flex; gap: 0.5rem; align-items: flex-start;
  padding: 0.375rem 0.5rem; border-radius: 0.375rem; margin-top: 0.3125rem;
  font-size: 0.75rem; font-weight: 500; line-height: 1.4;
}
.wp-violation--hard { background: var(--kadence-red-100); color: var(--kadence-red-600); }
.wp-violation--soft { background: var(--kadence-yellow-100); color: var(--kadence-yellow-600); }
.wp-violation--inherited { background: var(--kadence-grey-200); color: var(--kadence-grey-500); }
.wp-violation b { font-weight: 700; }

/* Diff: only the affected floor-days by default, with the full week always one
   click away. Hiding the rest permanently is what destroys trust. */
.wp-diff { width: 100%; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.wp-diff th {
  text-align: left; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--bulma-text-weak); font-weight: 700; padding: 0.25rem 0.5rem;
  position: sticky; top: 0; background: var(--bulma-scheme-main); z-index: 1;
}
.wp-diff td { padding: 0.1875rem 0.5rem; border-top: 1px solid var(--bulma-border); }
.wp-diff .num { text-align: right; }
.wp-diff tr.is-outside { opacity: 0.5; }
.wp-diff .was { color: var(--bulma-text-weak); text-decoration: line-through; margin-right: 0.25rem; }
.wp-diff .now { font-weight: 700; }
.wp-diff td.is-changed { background: var(--kadence-blue-100); }
.wp-diff td.is-over .now { color: var(--kadence-red-600); }

/* ------------------------------------------------------- drag and drop */

.wp-team[draggable="true"] { cursor: grab; }
.wp-team[draggable="true"]:active { cursor: grabbing; }
.wp-team.is-dragging { opacity: 0.35; border-style: dashed; }

/* Shows where the pill will land, and carries the count it will bring with it.
   pointer-events off so it cannot steal the drag's own enter/leave events. */
.wp-team--ghost {
  pointer-events: none;
  border-style: dashed; border-color: var(--bulma-primary);
  background: var(--kadence-pink-50); color: var(--kadence-pink-600);
}
.wp-team--ghost .wp-team__num { background: var(--kadence-pink-200); color: var(--kadence-pink-600); }

.wp-cell.is-droptarget { box-shadow: inset 0 0 0 2px var(--bulma-primary); }
.wp-cell.is-blocked { box-shadow: inset 0 0 0 2px var(--kadence-red-500); }
.wp-cell.is-blocked .wp-blockreason {
  font-size: 0.5625rem; font-weight: 700; line-height: 1.3;
  color: var(--kadence-red-600);
}

/* Unsaved manual moves. They sit outside the committed pattern until applied, so
   the change-request loop stays the way allocations actually change. */
.wp-editbar {
  display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
  margin-top: 0.5rem; padding: 0.4375rem 0.75rem;
  border-radius: var(--bulma-radius-large);
  background: var(--kadence-pink-100); color: var(--kadence-pink-600);
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.wp-editbar > * { flex-shrink: 0; }
.wp-editbar__spacer { flex: 1 1 auto; min-width: 0.5rem; }
.wp-editbar__list,
.wp-editbar__block {
  flex-shrink: 1; min-width: 0;
  font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wp-editbar__block { font-weight: 700; }
.wp-editbar--blocked { background: var(--kadence-red-100); color: var(--kadence-red-600); }

/* ---------------------------------------------------- constraints drawer */

.wp-constraint { padding: 0.5rem 0; border-top: 1px solid var(--bulma-border); }
.wp-constraint:first-child { border-top: none; }
.wp-constraint__top { display: flex; align-items: baseline; gap: 0.5rem; }
.wp-constraint__label { font-size: 0.8125rem; font-weight: 600; color: var(--bulma-text); flex: 1; }
.wp-constraint__detail { font-size: 0.75rem; color: var(--bulma-text-weak); margin-top: 0.125rem; line-height: 1.45; }
.wp-constraint__breach { font-size: 0.75rem; color: var(--kadence-red-600); margin-top: 0.1875rem; line-height: 1.4; }
.wp-sev {
  border: none; border-radius: 999px; cursor: pointer;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.03em; padding: 0.0625rem 0.5rem;
}
.wp-sev--hard { background: var(--kadence-red-100); color: var(--kadence-red-600); }
.wp-sev--soft { background: var(--kadence-grey-200); color: var(--kadence-grey-500); }

/* --------------------------------------------------------------- review */

.wp-review { max-width: 46rem; margin: 0 auto; }
.wp-review__day { border-top: 1px solid var(--bulma-border); padding: 0.625rem 0; }
.wp-review__daylabel { font-size: 0.8125rem; font-weight: 700; color: var(--bulma-text); margin-bottom: 0.25rem; }
.wp-beforeafter { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.75rem; align-items: center; }
.wp-ba {
  background: var(--bulma-scheme-main-bis); border-radius: 0.375rem; padding: 0.5rem 0.625rem;
  font-size: 0.75rem;
}
.wp-ba__ttl { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; color: var(--bulma-text-weak); }
.wp-ba__place { font-weight: 700; color: var(--bulma-text); }
.wp-ba__neighbors { color: var(--bulma-text-weak); font-weight: 500; line-height: 1.45; }
.wp-ba--after { background: var(--kadence-blue-100); }
.wp-ba--after .wp-ba__place { color: var(--kadence-blue-600); }

.wp-empty { padding: 1.25rem; text-align: center; color: var(--bulma-text-weak); font-size: 0.8125rem; }

@media (max-width: 1215px) {
  .wp-rail { display: none; }
}
