/* views.css
   The look of the views (inbox, open card), following frames 1 and 4 of
   the design board: calm, monochrome, heavier border = focus, no colour. */

.view {
  border: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: clip; /* a frame: only the area inside scrolls (layout rule) */
}

/* A view that has the keyboard shows it with its heavier parts, not a browser outline. */
.view:focus {
  outline: none;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.view-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.view-count {
  color: var(--muted);
  font-size: 0.85rem;
}

/* One line of key hints; when the window is too narrow it is cut off with "…"
   instead of making the page wider. */
.key-hints {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: auto;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  white-space: pre;
}

.key-hints-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ⌨ Keys at the end of a hint bar: opens the keys of this view (shared/keys-overview.js). */
.key-hints-keys {
  flex: none;
  font: inherit;
  font-size: 0.8rem;
  padding: 0 0.45rem;
  border: 1px solid var(--line-mid);
  border-radius: 5px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.key-hints-keys:hover { background: var(--fill); color: var(--ink); }

/* The keys window. */
.keys-overview { height: auto; max-height: 80vh; width: min(40rem, 92vw); }
.keys-overview-body { overflow: auto; padding: 0.4rem 1.25rem 1rem; }
.keys-overview-body h3 { font-size: 0.9rem; margin: 1rem 0 0.3rem; color: var(--ink-soft); }
.keys-overview .keys-table .key { width: 11rem; }

/* ---- inbox ------------------------------------------------------------ */

.new-card-box {
  margin: 1rem 1.25rem 0.5rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  border: 1px dashed var(--muted);
  border-radius: 8px;
}

.new-card-box:focus {
  outline: none;
  border: 1.5px solid var(--focus);
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 1rem;
  overflow-y: auto;
  flex: 1;
}

.card-list:focus {
  outline: none;
}

.card {
  position: relative;
  margin-bottom: 0.6rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-mid);
  border-radius: 8px;
  cursor: default;
}

.card.actionable,
.card.milestone {
  padding-left: 2.6rem;
}

.card.selected {
  border: 1px solid var(--focus);
  box-shadow: 0 0 0 1.5px var(--focus);
}

/* Only show the focus border strongly while the list has the keyboard. */
.card-list:not(:focus) .card.selected {
  box-shadow: none;
}

.actionable-mark {
  position: absolute;
  left: 0.9rem;
  top: 0.8rem;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--stroke);
  font-size: 0.75rem;
  line-height: 1.1rem;
  text-align: center;
}

/* A card in a list is two rows: the title with the date (or count) beside
   it, then the first line of the text across the whole width. The date has
   its own column, so a long title wraps before it instead of running under
   it (Stany, 5 Dec 2026: "Daarna Ubuntu" ran through "today 12:29"). */
.card-list .card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.75rem;
  align-items: baseline;
}

.card-title {
  font-size: 1rem;
  overflow-wrap: anywhere; /* one very long word wraps too, and never pushes the date out */
}

.card-first-line {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.empty-list {
  color: var(--muted);
  padding: 1rem 0;
}

/* ---- open card --------------------------------------------------------- */

.crumb {
  font-size: 1rem;
}

/* border-box: the padding counts inside the width, so the card never runs
   past the edge of its window (testing note 2). */
.card-sheet {
  box-sizing: border-box;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 1.25rem auto;
  width: min(48rem, calc(100% - 2.5rem));
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 1.25rem 1.75rem;
  position: relative;
}

.card-kind {
  position: absolute;
  right: 1.75rem;
  top: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.card-title-field {
  font: inherit;
  font-size: 1.6rem;
  border: none;
  padding: 0.25rem 0;
  margin-right: 7rem;
}

.card-title-field:focus {
  outline: none;
}

/* ---- block editor: the card's text, shown as what it means ----------------
   No Markdown signs on screen (design/VISION.md section 1, "No syntax needed"). */

.card-text-place {
  flex: 1;
  overflow-y: auto;
  margin-top: 0.75rem;
}

.block-editor {
  font-size: 1.05rem;
  line-height: 1.5;
  min-height: 100%;
}

.block-editor:focus {
  outline: none;
}

.block {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 1.6em;
  margin-left: calc(var(--indent, 0) * 1.6rem); /* indented list items (Tab) */
}

.block-text {
  flex: 1;
  outline: none;
  white-space: pre-wrap;
  min-width: 1px;
}

/* The dot or number is drawn here (data-label), so it is never part of selected or copied text. */
.block-marker {
  user-select: none;
  color: var(--ink-soft);
}

.block-marker::before {
  content: attr(data-label);
}

.block-paragraph .block-marker,
.block-heading .block-marker,
.block-heading2 .block-marker {
  display: none;
}

.block-heading .block-text {
  font-size: 1.45rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.block-heading2 .block-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

.block-bullet,
.block-numbered,
.block-check {
  padding-left: 0.4rem;
}

.block-bullet .block-marker,
.block-numbered .block-marker {
  min-width: 1.2rem;
  text-align: right;
}

/* A real check box, drawn quietly; a ticked item is greyed and struck through. */
.block-check .block-marker {
  width: 0.95rem;
  height: 0.95rem;
  border: 1.5px solid var(--focus);
  border-radius: 3px;
  align-self: center;
  cursor: pointer;
  position: relative;
  flex: none;
}

.block-check.checked .block-marker::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.05rem;
  width: 0.25rem;
  height: 0.5rem;
  border: solid var(--stroke);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.block-check.checked .block-text {
  color: var(--muted);
  text-decoration: line-through;
}

/* A link to another card: an underlined name, opened with Ctrl+click or Ctrl+Enter. */
.card-link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.card-link:hover {
  background: var(--fill);
}

/* ---- formatting menu ------------------------------------------------------ */

/* The app's one menu (shared/menu.js): right-click everywhere, and the
   formatting menu in an open card. */
.format-menu {
  position: fixed;
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
  min-width: 15rem;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: 4px 4px 0 var(--line);
}

.format-menu:focus {
  outline: none;
}

.format-menu li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  cursor: default;
}

.format-menu li.chosen {
  background: var(--fill);
}

.format-menu li.separator-before {
  border-top: 1px solid var(--line);
  margin-top: 0.3rem;
  padding-top: 0.55rem;
}

.format-menu li > span:nth-child(2) { flex: 1; }

.menu-check {
  width: 0.9rem;
  color: var(--ink);
}

.menu-key {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 1.5rem;
}

/* ---- card outliner (frame 2) ---------------------------------------------
   Each level is one column further right; grey lines join each card to the
   card it hangs under, and the top level to the project line. */

.outline-canvas {
  position: relative;
  flex: 1;
  overflow: auto;
  padding: 1rem 1.25rem 2rem;
}

.outline-lines {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.outline-lines path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.outline-tree {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: max-content;
}

.outline-tree:focus {
  outline: none;
}

.outline-project {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  width: max-content;
}

.outline-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: calc(var(--depth) * 15rem + 3.5rem);
}

.outline-card {
  position: relative;
  min-width: 11rem;
  max-width: 13rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--surface);
  cursor: default;
}

.outline-card.actionable,
.outline-card.milestone {
  padding-left: 2.3rem;
}

.outline-card .actionable-mark {
  left: 0.7rem;
  top: 0.55rem;
}

.outline-card.selected {
  box-shadow: 0 0 0 1.5px var(--focus);
}

.outline-tree:not(:focus) .outline-card.selected {
  box-shadow: none;
}

.outline-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outline-folded {
  color: var(--muted);
  font-size: 0.85rem;
}

.outline-input {
  font: inherit;
  width: 13rem;
  padding: 0.5rem 0.8rem;
  border: 1.5px solid var(--focus);
  border-radius: 8px;
}

.outline-input:focus {
  outline: none;
}

.outline-empty {
  padding-left: 3.5rem;
}

/* ---- kanban board (frame 6) ------------------------------------------------
   Columns side by side on a light grey; the selected card has the heavier
   border; Done cards are greyed. The context pane sits on the right. */

.board-body,
.grid-body {
  overflow: clip; /* a frame: only the board, grid and pane inside scroll (layout rule) */
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 17rem;
  min-height: 0;
}

.board-body.pane-hidden,
.grid-body.pane-hidden {
  grid-template-columns: 1fr;
}

.board-body.pane-hidden .context-pane,
.grid-body.pane-hidden .context-pane {
  display: none;
}

.board-columns {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  overflow: auto;
  align-items: flex-start;
}

.board-columns:focus {
  outline: none;
}

/* Columns share the width (at least 10.5rem each); a narrow window scrolls sideways. */
.board-column {
  flex: 1 0 10.5rem;
  max-width: 16rem;
  background: var(--lane);
  border-radius: 10px;
  padding: 0.6rem;
  border: 1.5px solid transparent;
}

.board-column.drop-here {
  border-color: var(--muted);
  border-style: dashed;
}

.board-columns:focus .board-column.selected-column {
  border-color: var(--focus);
}

.board-column-head {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0.3rem 0.6rem;
}

.board-column-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 1rem;
}

.board-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 0.55rem 0.7rem 0.55rem 2.2rem;
  cursor: grab;
}

.board-card .actionable-mark {
  left: 0.65rem;
  top: 0.6rem;
}

.board-card.selected {
  box-shadow: 0 0 0 1.5px var(--focus);
}

.board-columns:not(:focus) .board-card.selected {
  box-shadow: none;
}

.board-card.done {
  color: var(--muted);
  border-color: var(--line-strong);
}

.board-card.dragging {
  opacity: 0.4;
}

.board-card-title {
  display: block;
  overflow-wrap: anywhere;
}

.board-card-meta {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.board-add {
  margin-top: 0.5rem;
  width: 100%;
  text-align: left;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: transparent;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
}

.board-new-card {
  margin-top: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 0.45rem 0.7rem;
  border: 1.5px solid var(--focus);
  border-radius: 8px;
}

.board-new-card:focus {
  outline: none;
}

/* ---- context pane (board and grid planner; views/context-pane) --------------- */

.context-pane {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pane-title {
  padding: 0.7rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.pane-cards {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0.75rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pane-card {
  position: relative;
  margin-left: calc(var(--depth) * 0.9rem);
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  font-size: 0.9rem;
  background: var(--surface);
}

.pane-card.actionable,
.pane-card.milestone {
  padding-left: 2rem;
}

.pane-card .actionable-mark {
  left: 0.5rem;
  top: 0.45rem;
  transform: scale(0.9);
}

/* A card picked in the pane (click), for T, M and Enter. */
.pane-cards:focus { outline: none; }

/* (A picked card looks like the greyed one below: .this-task moves to it.) */

/* The selected task, greyed in its place among its neighbours (round 4 note). */
.pane-card.this-task {
  color: var(--muted);
  background: var(--fill);
  border-style: dashed;
  border-color: var(--muted);
}

.pane-empty {
  padding: 0.75rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.pane-new-card {
  margin: 0.6rem 0.75rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0.6rem;
  border: 1px dashed var(--muted);
  border-radius: 7px;
}

.pane-new-card:focus {
  outline: none;
  border: 1.5px solid var(--focus);
}


/* ---- several cards selected with Shift --------------------------------------
   The chosen cards get a light grey background and the heavier border; the
   card where the cursor is keeps its extra outline. Still no colour. */

.card.chosen,
.outline-card.chosen,
.board-card.chosen {
  background: var(--fill-strong); /* --fill was hardly visible in the dark theme (4 Dec 2026) */
  border-color: var(--stroke);
}


/* ---- the sign that a card has text, and the outliner's zoom levels ---------- */

.text-mark {
  color: var(--muted);
  margin-left: 0.4rem;
  font-size: 0.95em;
}

.outline-text {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
  white-space: pre-line;
  margin-top: 0.15rem;
}

.outline-card.zoom-2 .outline-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outline-card.zoom-3 {
  max-width: 17rem;
}

.outline-card.zoom-3 .outline-title {
  white-space: normal;
}

/* ---- grid planner (frame 5) -------------------------------------------------
   A table: the task columns stay on the left and the date rows on top while
   the rest scrolls. Weekends and holidays are shaded grey; today has a heavier
   line; the cursor cell has the heavy border; the active row a bar on the left. */

.grid-scroller {
  flex: 1;
  overflow: auto;
  position: relative;
  /* No text selection in the grid: a double-click or a drag selected words,
     and Edge then showed its own little menu (Stany, 4 Dec 2026). The typing
     box in a cell can still select its text. */
  user-select: none;
}
.grid-scroller input { user-select: text; }

.grid-scroller:focus {
  outline: none;
}

.grid-scroller.panning {
  cursor: grabbing;
}

.grid-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.grid-table th,
.grid-table td {
  border-right: 1px solid var(--fill);
  border-bottom: 1px solid var(--fill);
  padding: 0 0.3rem;
  height: 1.9rem;
  white-space: nowrap;
  background: var(--surface);
  box-sizing: border-box;
}

.grid-table thead th {
  position: sticky;
  z-index: 2;
  font-weight: 400;
  color: var(--muted);
}

.grid-weeks th { top: 0; height: 1.6rem; }
.grid-days th { top: 1.6rem; height: 2.6rem; vertical-align: bottom; padding-bottom: 5px; } /* room for the line under today */

.grid-week {
  text-align: left;
  border-left: 1px solid var(--line);
}

.grid-month {
  color: var(--muted);
}

/* The columns on the left stay put while the days scroll. */
.grid-table .fixed {
  position: sticky;
  z-index: 1;
}

.grid-table thead .fixed { z-index: 3; }

.fixed-task { left: 0; width: 15rem; min-width: 15rem; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; }
.fixed-col { left: 15rem; width: 2.4rem; min-width: 2.4rem; text-align: center; color: var(--muted); }
.fixed-who { left: 17.4rem; width: 3rem; min-width: 3rem; max-width: 3rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixed-bud { left: 20.4rem; width: 3.2rem; min-width: 3.2rem; text-align: right; color: var(--muted); }
.fixed-plan { left: 23.6rem; width: 3.2rem; min-width: 3.2rem; text-align: right; border-right: 1px solid var(--stroke) !important; }

.grid-day {
  width: 2.1rem;
  min-width: 2.1rem;
  max-width: 2.1rem;
  text-align: center;
}

.grid-days .grid-day span {
  display: block;
  line-height: 1.1;
}

.grid-day-number { color: var(--ink); }

.grid-day.week-start { border-left: 1px solid var(--line); }

/* Weekends and holidays: shaded, like on the design board. */
.grid-table .free-day { background: var(--fill); }

/* Today: a heavier line under its date in the header, and a faint line down the column. */
.grid-table thead .grid-day.today { box-shadow: inset 0 -2px 0 var(--stroke); }
.grid-table tbody .grid-day.today { border-left: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); }
.grid-days .grid-day.today .grid-day-number { font-weight: 700; }

.grid-project td {
  font-weight: 600;
  color: var(--ink-soft);
}

.grid-project td.grid-day { font-weight: 600; color: var(--ink-soft); } /* the project's day totals read as totals (Stany: they did not show with several projects) */

/* A person's header row in the by-person view (6b-2): like a project's. */
.grid-person td {
  font-weight: 600;
  color: var(--ink-soft);
}

.grid-person td.grid-day { font-weight: 600; color: var(--ink-soft); }

.grid-person .person-capacity,
.load-table .person-capacity {
  font-weight: 400;
  color: var(--line-strong);
  margin-left: 0.4rem;
}

/* In the by-person view, a task shows its project in grey after its name. */
.grid-task .task-project {
  color: var(--line-strong);
  margin-left: 0.4rem;
}

/* Leave: the person is away that day (hours in a leave planner project),
   so their cells are hatched. Hatching keeps it monochrome (design/VISION.md section 3). */
.grid-table td.leave-day {
  background-image: repeating-linear-gradient(135deg, var(--line-mid) 0 1px, transparent 1px 5px);
}

/* A day planned over the person's capacity: the one place with a colour
   (design/VISION.md section 3, Load tab; same rule in the person's header row). */
.grid-person td.over-capacity {
  color: var(--red);
  font-weight: 700;
  background-color: var(--red-soft);
  box-shadow: inset 0 -2px 0 var(--red);
}

/* Milestones (6c-2): a ◆ on their day, in their own row. */
.grid-milestone .fixed-task { padding-left: 1.2rem; }
.grid-milestone td.grid-day { font-size: 0.9rem; }

/* A milestone's day: a dashed line through the project's empty cells. */
.grid-table td.milestone-line {
  background-image: linear-gradient(var(--line-strong) 55%, transparent 55%);
  background-size: 1px 7px;
  background-repeat: repeat-y;
  background-position: center top;
}

/* Dependencies (6c-2): lines over the table, under the columns on the left. */
.grid-lines {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.dependency-line {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.2;
}

.dependency-arrow { fill: var(--muted); }

.dependency-line.too-early { stroke: var(--red); }
.dependency-arrow.too-early { fill: var(--red); }

.dependency-mark {
  color: var(--line-strong);
  margin-left: 0.35rem;
}

.dependency-mark.too-early { color: var(--red); }

/* Planned before its dependencies allow: a red edge (warn only). */
.grid-table td.too-early {
  box-shadow: inset 2px 0 0 var(--red), inset -2px 0 0 var(--red);
  color: var(--red);
}

/* The buttons in the grid planner's header, all one look (Stany, 4 Dec 2026):
   "Print / export" (Ctrl+P), the By project | By person switch (Alt+R) and
   "Lines" (Alt+L). Same border, height, font and colours; what is on or
   chosen is dark, like the chosen half of the switch. */
.grid-button,
.grid-switch button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 0.15rem 0.6rem;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.grid-button {
  margin-left: 1rem;
  border: 1px solid var(--line-mid);
  border-radius: 6px;
  vertical-align: middle;
}
.grid-button:hover,
.grid-switch button:hover:not(.chosen) { background: var(--fill); color: var(--ink); }
.grid-lines-button { margin-left: 0.6rem; }
.grid-lines-button[aria-pressed="true"],
.grid-switch button.chosen { background: var(--ink); color: var(--on-ink); }

/* The tabs of the grid planner: Planning | Load (Alt+T; step 6d). */
.grid-tabs {
  display: inline-flex;
  gap: 0.2rem;
  margin-left: 1rem;
  vertical-align: middle;
}

.grid-tab {
  font: inherit;
  font-weight: 400;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  padding: 0.1rem 0.4rem;
  color: var(--muted);
}

.grid-tab.chosen {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--stroke);
}

/* The Load tab (step 6d): one row per project or person, one total per column. */
.load-table .fixed-name {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 14rem;
  min-width: 14rem;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid var(--stroke) !important;
}

.load-table thead .fixed-name { z-index: 3; }

.load-table .load-cell { text-align: center; }
.load-table.scale-days .load-cell { width: 2.1rem; min-width: 2.1rem; max-width: 2.1rem; }
.load-table.scale-weeks .load-cell { width: 3.6rem; min-width: 3.6rem; }
.load-table.scale-months .load-cell { width: 4.2rem; min-width: 4.2rem; }

.load-table thead .load-cell span { display: block; line-height: 1.1; }

/* By person: the breakdown per project under the total (where the hours go). */
.load-table .load-breakdown-title td {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  height: 2.2rem;
  vertical-align: bottom;
}

.load-table .load-breakdown td { color: var(--ink-soft); }
.load-table .load-breakdown .fixed-name { padding-left: 1.2rem; }

/* How full a person is: four greys (a quarter, half, three quarters, full). */
.load-table td.load-1 { background-color: var(--fill-soft); }
.load-table td.load-2 { background-color: var(--fill-strong); }
.load-table td.load-3 { background-color: var(--line); }
.load-table td.load-4 { background-color: var(--line-mid); }

.load-table td.over-capacity {
  color: var(--red);
  font-weight: 700;
  background-color: var(--red-soft);
  box-shadow: inset 0 -2px 0 var(--red);
}

.load-table thead .load-cell.today { box-shadow: inset 0 -2px 0 var(--stroke); }
.load-table thead .load-cell.today .grid-day-number { font-weight: 700; color: var(--ink); }

/* Selected cells (Shift+arrows, Shift+click; 6e-2): a light shade with a thin frame. */
.grid-table td.selected-cell {
  background-color: var(--fill-strong);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* Grouped blocks move together: a dotted line under the whole group, gaps too. */
/* The blocks of the group under the cursor (Stany, 4 Dec 2026). */
.grid-table td.group-lit { box-shadow: inset 0 0 0 2px var(--focus); }

/* Grouped blocks: a bar under each block of the group, a dashed line over
   the gaps between them (Stany, 4 Dec 2026). */
.grid-table td.group-block {
  background-image: linear-gradient(var(--focus), var(--focus));
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: left bottom 2px;
}
.grid-table td.group-span {
  background-image: linear-gradient(to right, var(--focus) 50%, transparent 50%);
  background-size: 6px 2px;
  background-repeat: repeat-x;
  background-position: left bottom 2.5px;
}

/* Dragging hours: the day they will land on. */
.grid-table td.drop-day { box-shadow: inset 0 0 0 2px var(--ink-soft); }
.grid-scroller.dragging-hours { cursor: grabbing; }

/* The switch in the grid's header: By project | By person (Alt+R). */
.grid-switch {
  display: inline-flex;
  margin-left: 1rem;
  border: 1px solid var(--line-mid);
  border-radius: 6px;
  overflow: hidden;
  vertical-align: middle;
}

.grid-switch button {
  border: none;
  border-radius: 0;
}

.grid-task .fixed-task { padding-left: 1.2rem; }

.grid-add .fixed-task { padding-left: 1.2rem; color: var(--line-strong); }

.grid-total td {
  border-top: 1px solid var(--stroke);
  font-weight: 600;
}

/* The cursor cell and the active row (the pane on the right follows this row in 6c). */
.grid-table td.cursor {
  box-shadow: inset 0 0 0 2px var(--stroke);
}

.grid-scroller:not(:focus-within) td.cursor {
  box-shadow: inset 0 0 0 1px var(--muted);
}

.grid-table tr.active-row .fixed-task {
  box-shadow: inset 4px 0 0 var(--stroke);
}

.grid-table tr.active-row td.cursor.fixed-task {
  box-shadow: inset 4px 0 0 var(--stroke), inset 0 0 0 2px var(--stroke);
}

.grid-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  border: none;
  outline: none;
  text-align: inherit;
  background: transparent;
  padding: 0;
}

/* ---- the left pane as the planner's filter ---------------------------------- */

.nav-item.filter-item {
  justify-content: flex-start;
  gap: 0.5rem;
}

.tick-box {
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid var(--stroke);
  font-size: 0.75rem;
  line-height: 0.9rem;
  text-align: center;
  flex: none;
  align-self: center;
}

/* A milestone (6c-2): a ◆ where a task has its A, and its date in grey. */
.actionable-mark.milestone-mark {
  border: none;
  font-size: 0.85rem;
}

.milestone-date {
  color: var(--muted);
  margin-left: 0.5rem;
  font-size: 0.85em;
}

/* ---- printing the grid planner (step 6e-1; views/grid/print-export.js) -------------
   On screen the print area is never seen. When printing, only it is shown:
   one table per page-wide slice of days, with plain (not sticky) cells and
   the greys kept. The header rows repeat on every page by themselves. */

.print-area { display: none; }

@media print {
  body.printing > *:not(.print-area) { display: none !important; }
  body.printing .print-area { display: block; }

  .print-area {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-size: 9pt;
  }

  .print-page + .print-page { break-before: page; }

  .print-page h1 {
    font-size: 11pt;
    font-weight: 600;
    margin: 0 0 3mm;
  }

  .print-table { border-collapse: collapse; }

  .print-table th,
  .print-table td {
    position: static !important;
    height: auto;
    padding: 1px 3px;
    border: 0.5pt solid var(--line-mid);
    box-shadow: none;
  }

  .print-table thead { display: table-header-group; }
  .print-table tr { break-inside: avoid; }
  .print-table td.over-capacity { box-shadow: none; border-bottom: 1.5pt solid var(--red); }
  .print-table td.too-early { box-shadow: none; border-left: 1.5pt solid var(--red); border-right: 1.5pt solid var(--red); }
}

/* Words found in an open card (Ctrl+F): marked without touching the text. */
::highlight(card-find) { background-color: var(--line); }
::highlight(card-find-current) { background-color: var(--line-strong); }

/* ---- the Columns box of a board (views/board/columns-box.js) ------------------- */

.board-columns-button { margin-left: 1rem; }
.board-column-head[draggable="true"] { cursor: grab; }
.board-column.dragging { opacity: 0.5; }

.view-header { position: relative; }
.columns-box {
  position: absolute;
  right: 3rem;
  top: 100%;
  z-index: 20;
  width: 20rem;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--backdrop);
  padding-bottom: 0.5rem;
}
.columns-box-list { list-style: none; margin: 0; padding: 0.4rem 0.5rem; }
.columns-box-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: 5px;
}
.columns-box-row:focus { outline: 1.5px solid var(--focus); outline-offset: -1.5px; }
.columns-box-row.hidden-column .columns-box-name { color: var(--muted); }
.columns-box-row.dragging { opacity: 0.5; }
.columns-box-grip { color: var(--muted); cursor: grab; }
.columns-box-name { flex: 1; cursor: text; }
.columns-box-remove { font: inherit; border: none; background: none; color: var(--muted); cursor: pointer; }
.columns-box-remove:hover { color: var(--red); }
.columns-box .settings-input { margin: 0.2rem 0.5rem; width: calc(100% - 1rem); }
.columns-box-hint { color: var(--muted); font-size: 0.75rem; padding: 0.3rem 0.9rem 0; }
