/* =============================================================================
   Workforce - the plan's styles
   -----------------------------------------------------------------------------
   Carried over from the clickable demo (prototype/src/app.css), which was built on
   the same Eyvi.Design tokens: no literal colours, so both themes follow. The
   colours' meaning: yellow room for more, green well used, red overbooked.
   ============================================================================= */

:root {
  /* Red / Yellow / Green: Eyvi's severity fills, solid in both themes, with dark text on them. */
  --rag-green: var(--color-severity-good);
  --rag-yellow: var(--color-severity-minor);
  --rag-red: var(--color-severity-moderate);
  --rag-ink: var(--color-on-severity);
  --rag-none: var(--color-surface-inset);
  --app-page-max: 110rem;
  --app-cell-w: 4.4rem;
  --app-name-w: 13.5rem;
  --app-open: var(--color-text-muted);
}

.muted { color: var(--color-text-secondary); }
.small { font-size: var(--font-size-sm); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- Page */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--font-size-sm); color: var(--color-text-secondary); margin-bottom: var(--space-1); }
.crumbs a { color: var(--color-text-secondary); }
.crumbs span[aria-hidden] { opacity: 0.6; }
.section { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.section > h2 { margin: 0; font-size: var(--font-size-lg); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.section-head h2 { margin: 0; font-size: var(--font-size-lg); }
.surface { background: var(--color-surface-container); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); min-width: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
@media (min-width: 64rem) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cols.wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.empty { padding: var(--space-4); color: var(--color-text-secondary); background: var(--color-surface-inset); border-radius: var(--radius-md); margin: 0; }
.button.small, button.small { min-height: 2.25rem; padding: var(--space-1) var(--space-3); font-size: var(--font-size-sm); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }


/* ---------------------------------------------------------------- Status chips and lights */
.chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 0 var(--space-2); border-radius: var(--radius-pill);
  font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); line-height: 1.7; white-space: nowrap;
  background: var(--rag-none); color: var(--color-text-secondary);
  border: var(--border-width) solid var(--color-border);
}
.chip.red { background: var(--rag-red); color: var(--rag-ink); border-color: transparent; }
.chip.yellow { background: var(--rag-yellow); color: var(--rag-ink); border-color: transparent; }
.chip.green { background: var(--rag-green); color: var(--rag-ink); border-color: transparent; }
.chip.info { background: var(--color-info-subtle); color: var(--color-info-text); border-color: var(--color-info); }
.chip.open { background: transparent; border-style: dashed; color: var(--color-text-secondary); }
.chip.chance { background: var(--color-surface-container); color: var(--color-text); border-color: var(--color-border-strong); font-weight: var(--font-weight-semibold); }


/* ---------------------------------------------------------------- Headline lights */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-4); }
/* The slim lights over the overview's grid: one line each, the colour a small swatch at the start. */
.tiles:has(.light) { gap: var(--space-3); margin-bottom: var(--space-5); }
.light {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: stretch; min-width: 0;
  background: var(--color-surface-container); border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.light__swatch { display: flex; align-items: center; justify-content: center; color: var(--rag-ink); background: var(--rag-none); }
.light__swatch.red { background: var(--rag-red); }
.light__swatch.yellow { background: var(--rag-yellow); }
.light__swatch.green { background: var(--rag-green); }
.light__swatch .pct { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); font-variant-numeric: tabular-nums; }
.light__body { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-3); min-width: 0; font-size: var(--font-size-sm); }
.light__title { font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.04em; font-size: var(--font-size-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.light__when { font-weight: var(--font-weight-regular); text-transform: none; letter-spacing: 0; margin-left: var(--space-1); }
/* Up to two lines: a red light says which team and how short, and that must not be cut away. */
.light__line { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.light__red { color: var(--color-danger-text); font-weight: var(--font-weight-medium); }


/* ---------------------------------------------------------------- Heatmap and board */
.grid-frame { overflow-x: auto; min-width: 0; border: var(--border-width) solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-container); }
/* Fixed layout: the name column keeps --app-name-w and the columns share the rest evenly, never
   narrower than --app-cell-w (the frame scrolls instead). --cols is set on each table. */
.heat {
  border-collapse: separate; border-spacing: 3px; margin: 0; font-variant-numeric: tabular-nums;
  table-layout: fixed; width: 100%;
  min-width: calc(var(--app-name-w) + var(--cols, 12) * (var(--app-cell-w) + 3px) + 6px);
}
.heat col.c-name { width: var(--app-name-w); }
.heat.small { --app-name-w: 16rem; --app-cell-w: 3.1rem; }
.heat th, .heat td { padding: 0; border: 0; background: none; }
.heat thead th { font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); text-align: center; padding: var(--space-2) 0 var(--space-1); white-space: nowrap; }
.heat thead th .yr { display: block; font-weight: var(--font-weight-regular); opacity: 0.8; min-height: 1.2em; }
.heat .name {
  position: sticky; left: 0; z-index: 1;
  overflow: hidden;
  background: var(--color-surface-container);
  text-align: left; padding: 0 var(--space-3) 0 var(--space-2);
  font-weight: var(--font-weight-medium); font-size: var(--font-size-sm);
  text-transform: none; letter-spacing: normal;
}
.heat .name .sub { display: block; font-weight: var(--font-weight-regular); color: var(--color-text-secondary); font-size: var(--font-size-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat .name a, .heat .name button.link { color: var(--color-text); }
.heat tr.total .name { font-weight: var(--font-weight-bold); }
.heat tr.group .name { padding-top: var(--space-3); }
.heat tr.sep td, .heat tr.sep th { padding-top: var(--space-2); }

/* Groups on the People board: a header band with a coloured edge and the group's totals, the people
   indented under it, and space between groups. */
.heat tr.grp-gap td { height: var(--space-4); }
.heat tr.grp-head th.name {
  background: var(--color-surface-inset);
  border-left: 4px solid var(--gc, var(--color-accent));
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
}
.heat tr.grp-head .cell { font-weight: var(--font-weight-bold); min-height: 2.6rem; }
.heat tr.member th.name { padding-left: calc(var(--space-5) + 4px); font-weight: var(--font-weight-regular); }
.grp-toggle {
  display: flex; align-items: center; justify-content: flex-start; gap: var(--space-2);
  width: 100%; min-height: 0; padding: 2px 0; margin: 0;
  border: 0; border-radius: var(--radius-sm); background: none;
  color: var(--color-text); font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); text-align: left;
}
.grp-toggle:hover:not(:disabled) { background-image: none; text-decoration: underline; }
.grp-toggle .chev { flex: none; width: 0.5rem; height: 0.5rem; margin: 0 3px 3px 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.grp-toggle[aria-expanded="false"] .chev { transform: rotate(-45deg); margin-bottom: 0; }
.grp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.plain { background: var(--color-surface-inset); color: var(--color-text); }
.board-note { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2); }

.cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  width: 100%; min-width: 0; min-height: 2.75rem; padding: 2px var(--space-1);
  border: 2px solid transparent; border-radius: var(--radius-sm);
  background: var(--rag-none); color: var(--color-text-secondary);
  font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
button.cell { cursor: pointer; }
button.cell:hover:not(:disabled) { background-image: none; border-color: var(--color-text); }
.cell.green { background: var(--rag-green); color: var(--rag-ink); }
.cell.yellow { background: var(--rag-yellow); color: var(--rag-ink); }
.cell.red { background: var(--rag-red); color: var(--rag-ink); }
.cell .fte { font-size: var(--font-size-xs); font-weight: var(--font-weight-regular); }
.cell.closed { background: transparent; border: var(--border-width) dashed var(--color-border); font-weight: var(--font-weight-regular); }
.cell.away { font-weight: var(--font-weight-regular); font-size: var(--font-size-xs); }
.cell[aria-pressed="true"], .cell.selected { border-color: var(--color-text); box-shadow: 0 0 0 2px var(--color-surface-container), 0 0 0 4px var(--color-focus-ring); }
.cell.changed { border-color: var(--color-text); border-style: dashed; }
.cell .mark { font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); }
.heat.small .cell { min-height: 2.25rem; font-size: var(--font-size-xs); }
.heat .now { color: var(--color-text); font-weight: var(--font-weight-bold); }

.legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.legend .key { display: inline-flex; align-items: center; gap: var(--space-2); }
.legend .sw { width: 1.1rem; height: 1.1rem; border-radius: var(--radius-sm); background: var(--rag-none); flex: none; }
.legend .sw.green { background: var(--rag-green); } .legend .sw.yellow { background: var(--rag-yellow); } .legend .sw.red { background: var(--rag-red); }
.legend .sw.closed { background: transparent; border: var(--border-width) dashed var(--color-border-strong); }


/* ---------------------------------------------------------------- Drill-down */
.drill { display: flex; flex-direction: column; gap: var(--space-4); scroll-margin-top: var(--space-4); }
.drill-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.drill-head h2 { margin: 0; font-size: var(--font-size-xl); }
.drill-head .figures { margin: var(--space-1) 0 0; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
.drill h3 { margin: 0 0 var(--space-2); font-size: var(--font-size-base); }
.drill .lead { margin: 0; }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rows > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); align-items: center; padding: var(--space-2) 0; border-top: var(--border-width) solid var(--color-border-subtle, var(--color-border)); }
.rows > li:first-child { border-top: 0; }
.rows .who { min-width: 0; }
.rows .who a, .rows .who .title { font-weight: var(--font-weight-medium); }
.rows .who .meta { display: block; font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.rows .bar { grid-column: 1 / -1; }
.rows .end { display: flex; align-items: center; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; }

.loadbar { display: flex; height: 0.75rem; border-radius: var(--radius-pill); overflow: hidden; background: var(--color-surface-inset); }
.loadbar span { display: block; height: 100%; background: var(--pc, var(--color-accent)); }
.loadbar span.tentative { background: repeating-linear-gradient(135deg, var(--pc, var(--color-accent)) 0 3px, transparent 3px 6px); }
.loadbar-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-1); font-size: var(--font-size-xs); color: var(--color-text-secondary); }
.loadbar-legend i { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 2px; background: var(--pc, var(--color-accent)); margin-right: var(--space-1); vertical-align: baseline; }

.done-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-success-subtle); border: var(--border-width) solid var(--color-success); color: var(--color-text); font-size: var(--font-size-sm); }


/* ---------------------------------------------------------------- Forms */
.form-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; margin: 0; }
.field > span { font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); }
.field select, .field input { min-width: 9rem; }
.field.grow { flex: 1 1 14rem; }
.field.grow input, .field.grow select { width: 100%; }


/* ---------------------------------------------------------------- Projects */
.tabs { display: flex; gap: var(--space-1); border-bottom: var(--border-width) solid var(--color-border); }
.tabs a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--layout-touch-target-min); padding-inline: var(--space-3); color: var(--color-text-secondary); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--color-text); font-weight: var(--font-weight-semibold); box-shadow: inset 0 -3px 0 var(--color-accent); }

.timeline { display: grid; grid-template-columns: var(--app-name-w) minmax(var(--tl-min, 36rem), 1fr); min-width: 0; font-size: var(--font-size-sm); }
.timeline .tl-months.wk span { border-left: 0; overflow: visible; padding-left: 2px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 2.6rem; }
.timeline .tl-months.wk span.nm { border-left: var(--border-width) solid var(--color-border); }
.timeline .tl-months.wk span b { font-weight: var(--font-weight-regular); font-size: 10px; opacity: 0.75; }
.timeline .tl-head { display: contents; }
.timeline .tl-months { position: relative; display: grid; border-bottom: var(--border-width) solid var(--color-border); }
.timeline .tl-months span { padding: var(--space-2) 0 var(--space-1) var(--space-1); color: var(--color-text-secondary); font-size: var(--font-size-xs); border-left: var(--border-width) solid var(--color-border); white-space: nowrap; overflow: hidden; }
.timeline .tl-months span.jan { color: var(--color-text); font-weight: var(--font-weight-semibold); }
.timeline .tl-name { position: sticky; left: 0; z-index: 1; background: var(--color-surface-container); padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2); min-width: 0; display: flex; flex-direction: column; justify-content: center; border-bottom: var(--border-width) solid var(--color-border-subtle, var(--color-border)); }
.timeline .tl-name a { font-weight: var(--font-weight-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline .tl-name .meta { color: var(--color-text-secondary); font-size: var(--font-size-xs); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.timeline .tl-track { position: relative; min-height: 3rem; border-bottom: var(--border-width) solid var(--color-border-subtle, var(--color-border)); background-image: var(--tl-grid, none); }
.timeline .tl-group { grid-column: 1 / -1; padding: var(--space-3) var(--space-2) var(--space-1); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-secondary); position: sticky; left: 0; }
.tl-bar {
  position: absolute; top: 0.7rem; height: 1.6rem; border-radius: var(--radius-sm);
  background: var(--pc, var(--color-accent)); color: var(--color-text-inverse);
  display: flex; align-items: center; padding: 0 var(--space-2); overflow: hidden; white-space: nowrap;
  font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); text-decoration: none;
  border: 2px solid var(--pc, var(--color-accent));
}
.tl-bar:hover { color: var(--color-text-inverse); filter: brightness(1.08); }
.tl-bar.tentative { background: repeating-linear-gradient(135deg, var(--pc, var(--color-accent)) 0 6px, var(--color-surface-container) 6px 11px); color: var(--color-text); }
.tl-bar.tentative span { background: var(--color-surface-container); padding: 0 var(--space-1); border-radius: 2px; }
.tl-bar.internal { background: var(--color-surface-inset); border-color: var(--color-border-strong); color: var(--color-text-secondary); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--color-accent); pointer-events: none; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--space-3) var(--space-5); margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary); font-weight: var(--font-weight-semibold); }
.facts dd { margin: 2px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.link-chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); border: var(--border-width) solid var(--color-border-strong); font-size: var(--font-size-sm); color: var(--color-text); background: var(--color-surface-container); }
.link-chip b { font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.04em; }

.table-frame { overflow-x: auto; min-width: 0; }
table.staff { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); font-variant-numeric: tabular-nums; margin: 0; }
table.staff th { text-align: left; font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary); padding: var(--space-2); border-bottom: var(--border-width) solid var(--color-border-strong); white-space: nowrap; }
table.staff td { padding: var(--space-2); border-bottom: var(--border-width) solid var(--color-border); vertical-align: middle; }
table.staff tr.open-row td { background: var(--color-surface-inset); }
table.staff td.right, table.staff th.right { text-align: right; }
table.staff tr.picker td { background: var(--color-surface-inset); padding: var(--space-3); }
.pick-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.pick-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--color-surface-container); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); }
.pick-list .meta { display: block; font-size: var(--font-size-xs); color: var(--color-text-secondary); }


/* ---------------------------------------------------------------- Charts */
.chart { width: 100%; min-width: 40rem; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--color-text-secondary); font-size: 11px; font-family: var(--font-family-base); }
.chart .grid line { stroke: var(--color-border); stroke-width: 1; }
.chart .axis { stroke: var(--color-border-strong); }
.chart .cap { fill: none; stroke: var(--color-text); stroke-width: 2; }
.chart .open-bar { fill: url(#hatch-open); stroke: var(--app-open); stroke-width: 1; }
.chart .named-bar { fill: var(--color-accent); }
.chart .closed-band { fill: var(--color-surface-inset); }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--font-size-xs); color: var(--color-text-secondary); }
.chart-legend i { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 2px; background: var(--pc, var(--color-accent)); margin-right: var(--space-1); vertical-align: -1px; }
.chart-legend i.line { height: 2px; vertical-align: 3px; background: var(--color-text); }
.chart-legend i.hatch { background: repeating-linear-gradient(135deg, var(--app-open) 0 2px, transparent 2px 4px); border: 1px solid var(--app-open); }


/* ---------------------------------------------------------------- What if */
.from-ticket { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-info-subtle); border: var(--border-width) solid var(--color-info); font-size: var(--font-size-sm); }


/* ---------------------------------------------------------------- Department desk */
.desk { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-4); align-items: start; }
.desk-card { display: flex; flex-direction: column; gap: var(--space-2); }
.desk-card h3 { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--font-size-base); }
.picker-inline { display: block; padding: var(--space-3); margin-top: var(--space-1); background: var(--color-surface-inset); border-radius: var(--radius-md); }
.picker-inline .pick-list { grid-template-columns: minmax(0, 1fr); }
a.cell { text-decoration: none; }
a.cell:hover { border-color: var(--color-text); }


/* ---------------------------------------------------------------- Phases and templates */
.phase-dot { display: inline-block; flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--pc, var(--color-accent)); margin-right: var(--space-2); }
.heat .phase-row th { padding: var(--space-2) 0 0; }
.phase-band {
  display: block; padding: 2px var(--space-2); border-radius: var(--radius-sm);
  background: var(--pc, var(--color-accent)); color: var(--color-text-inverse);
  font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); text-align: left;
  text-transform: none; letter-spacing: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field-inline { display: flex; align-items: center; gap: var(--space-2); margin: 0; }
.field-inline select { width: auto; }
.tpl-phase h2 { display: flex; align-items: center; margin: 0; font-size: var(--font-size-lg); }
table.staff select { min-height: 2.25rem; width: auto; max-width: 100%; }


/* ---------------------------------------------------------------- Phone */
@media (max-width: 48rem) {
  :root { --app-name-w: 9.5rem; --app-cell-w: 3.6rem; }
  .page-head h1 { font-size: var(--font-size-xl); }
  .heat.small { --app-name-w: 9rem; }
  .heat tr.member th.name { padding-left: var(--space-4); }
  .timeline { grid-template-columns: 8.5rem minmax(var(--tl-min, 36rem), 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ---------------------------------------------------------------- The app's own */
.crumbs button.link { padding: 0; min-height: 0; border: 0; background: none; color: var(--color-text-secondary); text-decoration: underline; font-size: inherit; }
.spaced { margin-top: var(--space-4); }
.tight { margin: 0 0 var(--space-2); }
.bad { color: var(--color-danger-text); font-weight: var(--font-weight-semibold); }
.wide-page { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }

/* A section's choices share its heading's row, taking the room the heading leaves. */
.section-head > .actions { flex: 1 1 auto; justify-content: flex-end; align-items: flex-end; }

/* The year under the first month and each January of the timeline, as in the grids. */
.timeline .tl-months span .yr { display: block; font-size: 10px; font-weight: var(--font-weight-regular); opacity: 0.75; }

/* ---------------------------------------------------------------- Who is free? on one line */
.finder { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.finder__ask { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.finder__ask h2 { margin: 0 var(--space-1) 0 0; font-size: var(--font-size-lg); }
.finder__ask .field-inline { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
.finder__ask select { width: auto; }
.finder__found { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.free-chip {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: 2px var(--space-2) 2px var(--space-3);
  border: var(--border-width) solid var(--color-border); border-radius: 999px; background: var(--color-surface-container);
  color: var(--color-text); font-size: var(--font-size-sm); text-decoration: none;
}
.free-chip:hover { border-color: var(--color-border-strong); }
.free-chip b { padding: 0 var(--space-2); border-radius: 999px; background: var(--color-info-subtle); color: var(--color-info-text); font-weight: var(--font-weight-semibold); }

/* ---------------------------------------------------------------- The verdict in one line */
.verdict-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2); margin: var(--space-3) 0;
  border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-container);
}
.verdict-line__swatch {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 var(--space-2);
  border-radius: var(--radius-md); color: var(--rag-ink); font-weight: var(--font-weight-bold); font-variant-numeric: tabular-nums;
}
.verdict-line.fits .verdict-line__swatch { background: var(--rag-green); }
.verdict-line.red .verdict-line__swatch { background: var(--rag-red); }
.verdict-line__text { flex: 1 1 20rem; min-width: 0; }
.verdict-line a { white-space: nowrap; }

/* Where it pinches, quietly under a grid: one short line a role. */
.pinches { margin: var(--space-2) 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.pinches b { display: inline-block; min-width: 2.5rem; color: var(--color-danger-text); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Changing a booking */
.row-actions { display: inline-flex; gap: var(--space-1); }
.booking-editor { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-container); }
.booking-editor .form-row { margin: 0; }
.check-inline { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--font-size-sm); font-weight: var(--font-weight-regular); cursor: pointer; }
.rows.bookings li.editing { display: block; padding: var(--space-2) 0; }
