/*
 * The board is one CSS grid: a column per week, a row per lane. A bar is a grid item that spans
 * as many columns as it covers weeks, so a week is a column index and never a pixel measurement.
 *
 * Everything visual comes from the Nedbase tokens in tokens.css. The board is white; beige carries
 * the axes (week bar, team rows) and salmon is reserved for one thing only — a week that does not
 * fit. A week that is exactly full says nothing at all.
 */

.board-page {
    --cell-min: 3.5rem;
    --lane-height: 2.25rem;
    --strip-height: 1.5rem;
    --week-bar-height: 2.25rem;
    --month-bar-height: 1.25rem;
    --name-width: 13rem;
    --empty-lane-height: 1.25rem;
    --leave-lane-height: 1.5rem;
    --team-break-height: 1.75rem;

    flex: 1 1 auto;
    min-height: 0;
    /* The rail down the left, and the board with everything around it beside it. */
    display: flex;
    flex-direction: row;
    font-family: var(--font-body);
    font-size: var(--fs-15);
}

.board-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/*
 * How tightly the board is drawn, from the horizon in front of it rather than from a switch of its
 * own: eight weeks want air, twenty-six want colour instead of figures, thirteen want something in
 * between. Every measurement the grid is built from is a variable up there, so this is the whole of
 * it — no second set of rules, and nothing that can drift out of step. See assets/planning/reading.js.
 */
.board-page[data-reading="roomy"] {
    --lane-height: 2.75rem;
    --strip-height: 1.75rem;
    --name-width: 15rem;
}

.board-page[data-reading="dense"] {
    --cell-min: 2.25rem;
    --lane-height: 1.9rem;
    --strip-height: 0.65rem;
    --name-width: 9.5rem;
    --empty-lane-height: 0.8rem;
    --leave-lane-height: 1.2rem;
    --team-break-height: 1.4rem;
}

.board-page[data-reading="dense"] .row-name__capacity { display: none; }
.board-page[data-reading="dense"] .row-name__text { font-size: var(--tool-fs-13); }

/* De korte stand kent maar één breedte: die van de schijf. Zie `[data-names]` verderop. */
.board-page[data-reading="roomy"][data-names="initials"],
.board-page[data-reading="dense"][data-names="initials"] { --name-width: 3.25rem; }

/*
 * De kop: één regel van tweeënvijftig pixels met drie dingen erop — waar je in de tijd bent, waar
 * je naar zoekt, en wat je ziet. Het waren er acht op één rij, allemaal even luid: merknaam,
 * pager, periode, horizon, teams, zoeken, teller, ongedaan maken. De merknaam is weg (de rail zegt
 * al waar je bent), teams en horizon zitten achter "Weergave", en de periode is zelf de knop terug
 * naar vandaag.
 *
 * Nothing wraps here. A control that will not fit belongs in the panel, not on a second line that
 * pushes the board down.
 */
.board-header {
    flex: 0 0 auto;
    height: 52px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-1);
}

/*
 * De pager: twee pijlen met de periode ertussen. De periode is een knop — hij zegt welke weken op
 * het bord staan en brengt je met een klik terug naar vandaag, wat daarvoor een aparte knop was die
 * alleen iets deed als je al ergens anders keek.
 */
.pager {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.pager button {
    height: 32px;
    border: 0;
    border-radius: var(--r-pill);
    background: none;
    color: var(--fg-1);
    font-family: var(--font-body);
    cursor: pointer;
    transition: background-color var(--dur-base) var(--ease-out);
}

.pager button:hover { background: var(--bg-3); }
.pager button:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 2px; }

.pager__arrow {
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-2);
}

/* Unytour op knopformaat is elders in het bord voorbehouden aan de enige ingekte knop; hier draagt
   het de periode, omdat dat de kop van de pagina is en niet zomaar een label. */
.pager__window {
    min-width: 8.5rem;
    padding: 0 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-18);
    line-height: var(--lh-flat);
    letter-spacing: var(--tr-wide);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* The quiet tier: a control that is not the one thing you came to do. */
.ctl {
    height: var(--tool-control-h);
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    background: var(--nb-white);
    color: var(--fg-1);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: var(--tool-fs-13);
    line-height: var(--lh-flat);
    letter-spacing: var(--tr-tight);
    cursor: pointer;
    transition: border-color var(--dur-base) var(--ease-out);
}

.ctl:hover { border-color: var(--nb-ink); }
.ctl:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 2px; }
select.ctl { padding-right: 8px; }

/* Een knop die alleen een pictogram draagt: even hoog als de rest, en vierkant. */
.ctl--icon {
    width: var(--tool-control-h);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*
 * Zoeken staat in het midden en is het breedste ding in de kop: het is de manier waarop je iets
 * terugvindt op een bord van zesentwintig weken. De toetshint staat erin, omdat een sneltoets die
 * nergens staat niemand heeft.
 */
.board-search {
    flex: 0 1 26rem;
    min-width: 10rem;
    height: var(--tool-control-h);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 0 14px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    background: var(--bg-3);
    transition: background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}

.board-search:focus-within { background: var(--nb-white); border-color: var(--nb-ink); }
.board-search__icon { flex: 0 0 auto; display: flex; color: var(--fg-2); }

.board-search__field {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--fg-1);
    font: inherit;
    font-size: var(--tool-fs-13);
}

.board-search__field:focus-visible { outline: none; }
.board-search__field::-webkit-search-cancel-button { cursor: pointer; }

.board-search__key {
    flex: 0 0 auto;
    padding: 2px 6px;
    border: 1px solid var(--border-1);
    border-radius: 4px;
    background: var(--nb-white);
    color: var(--fg-2);
    font-family: var(--font-body);
    font-size: var(--tool-fs-11);
    font-variant-numeric: tabular-nums;
}

/* Zodra je typt zegt de teller wat er overblijft, en heeft de hint niets meer te melden. */
.board-search:focus-within .board-search__key { display: none; }

/* How much of the board is left. Empty unless something is narrowing it. */
.board-header__found:empty { display: none; }
.board-header__found {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: var(--tool-fs-12);
    color: var(--fg-2);
    font-variant-numeric: tabular-nums;
}

/* The one inked pill on the page, and the only place Unytour still runs at button size. */
.ctl--primary {
    padding: 0 var(--sp-20);
    background: var(--nb-ink);
    border-color: var(--nb-ink);
    color: var(--fg-on-dark);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-18);
    letter-spacing: var(--tr-wide);
}

.ctl--primary:hover { background: var(--nb-ink); border-color: var(--nb-ink); box-shadow: var(--ring-white), 0 0 0 5px var(--nb-ink); }

/* Reachable, never competing: undo and the legend are things you want only when you want them. */
.ctl--ghost { background: none; border-color: transparent; color: var(--fg-2); }
.ctl--ghost:hover { background: var(--nb-white); border-color: var(--border-1); color: var(--fg-1); }

/*
 * What a filter does to a board that is already drawn. A row with nothing left to say folds away —
 * every cell of it is placed in its own grid row, so hiding the cells collapses the row — and work
 * that did not match steps back rather than going, because a bar you can see is one you can drag.
 */
.is-hidden { display: none !important; }
.bar--dim { opacity: 0.25; }
.bar--dim:hover { opacity: 0.6; }
/* What pushes the primary action and its quiet neighbours to the far end of the row. */
.board-header__spacer { flex: 1 1 auto; }

/*
 * The teams on the board: one chip in the header that opens a tick per team. A <details>, so the
 * open state is the browser's business and not a controller's; the menu hangs out of the header on
 * top of the grid rather than pushing the one line of chrome into two.
 */
.chip {
    flex: 0 0 auto;
    position: relative;
}

.chip > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 14rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    list-style: none;
}

.chip > summary::-webkit-details-marker { display: none; }

/* The arrow says it opens, and turns when it is open. */
.chip > summary::after {
    content: '';
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--fg-2);
    border-bottom: 1.5px solid var(--fg-2);
    transform: rotate(45deg) translateY(-1px);
    transition: transform var(--dur-base) var(--ease-out);
}

.chip[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.chip[open] > summary { border-color: var(--nb-ink); }

.chip__menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    min-width: 12rem;
    padding: 6px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-xs);
    background: var(--nb-white);
    /* The same lift the right-click menu has: it is the same kind of thing over the same grid. */
    box-shadow: 0 2px 10px rgb(0 0 0 / 12%);
}

.chip__tick {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--r-xs);
    font-size: var(--tool-fs-13);
    white-space: nowrap;
    cursor: pointer;
}

.chip__tick:hover { background: var(--bg-2); }

/* "Alle teams" is a summary of the rest, so it stands off from the teams themselves. */
.chip__tick:first-child {
    margin-bottom: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-1);
    border-radius: 0;
    font-weight: 500;
}

/*
 * "Weergave": teams en horizon achter één knop. Allebei vragen die je één keer per sessie stelt, en
 * allebei stonden ze de hele dag in de kop. Het cijfer zegt dat het bord versmald is — hoeveel
 * teams je ziet — en de titel van de knop zegt welke, want dat is wat de kop niet meer zelf vertelt.
 */
.view__count {
    min-width: 18px;
    padding: 1px 6px;
    border-radius: var(--r-pill);
    background: var(--bg-2);
    color: var(--fg-1);
    font-size: var(--tool-fs-11);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.view__count:empty { display: none; }

/* Het menu hangt aan de rechterkant van de kop, dus het lijnt daar uit en niet links. */
.view__menu {
    left: auto;
    right: 0;
    min-width: 15rem;
    padding: 10px;
}

.view__caption {
    margin: 0 0 8px;
    font-size: var(--tool-fs-11);
    font-weight: 600;
    letter-spacing: var(--tr-wide);
    text-transform: uppercase;
    color: var(--fg-2);
}

.view__caption + div + .view__caption { margin-top: 12px; }

/*
 * De standen van "Balken" zijn twee kaartjes en geen twee pillen: "Naam" en "Vlak" zeggen op
 * zichzelf niet waar de keuze over gaat, dus elk kaartje doet het voor aan twee balkjes — één van
 * twee weken en één van één week, de breedtes waar de keuze over gaat. De balkjes zijn echte
 * `.bar`-elementen met een `data-fit`, zodat het voorbeeld niet naast het bord kan gaan lopen.
 */
.opts { display: flex; gap: 6px; }

.opt {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 7px;
    box-sizing: border-box;
    border: 1px solid var(--border-1);
    border-radius: var(--r-xs);
    color: var(--fg-2);
    font-size: var(--tool-fs-12);
    cursor: pointer;
    transition: border-color var(--dur-base) var(--ease-out);
}

.opt:hover { border-color: var(--nb-ink); }
.opt > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.opt:has(> input:checked) { border-color: var(--nb-ink); box-shadow: inset 0 0 0 1px var(--nb-ink); color: var(--fg-1); }
.opt:has(> input:focus-visible) { outline: 2px solid var(--nb-ink); outline-offset: 2px; }

.opt__name { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: 500; }

.opt__mark {
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
    box-sizing: border-box;
    border: 1px solid var(--border-1);
    border-radius: 50%;
}

.opt:has(> input:checked) .opt__mark { border-color: var(--nb-ink); background: var(--nb-ink); box-shadow: inset 0 0 0 2.5px var(--nb-white); }

/* Het voorbeeld: twee balkjes op een rij, elk met de breedte die hij op het bord ook heeft. */
.opt__demo { display: flex; flex-direction: column; gap: 3px; }
.opt__demo .bar { margin: 0; height: 19px; cursor: inherit; }
.opt__demo .bar[data-fit="narrow"] { width: 92px; }
.opt__demo .bar[data-fit="tiny"] { width: 40px; }
.opt__demo .bar:hover { box-shadow: none; }
.opt__demo .bar__name,
.opt__demo .bar__short { font-size: var(--tool-fs-11); }
/* Een voorbeeldbalk is geen balk op het bord: de tweede regel hoort er niet bij. */
.opt__demo .bar__sub { display: none; }

/* Het vlak-voorbeeld staat in een menu dat zelf geen stand heeft, dus het zegt het per balkje. */
.opt__demo[data-bars="block"] .bar {
    --project-ink: color-mix(in srgb, var(--project, var(--tool-project-1)) 72%, var(--nb-ink));

    background: color-mix(in srgb, var(--project, var(--tool-project-1)) 20%, var(--nb-white));
    border-color: color-mix(in srgb, var(--project, var(--tool-project-1)) 40%, var(--nb-white));
    color: var(--project-ink);
}

.opt__demo[data-bars="block"] .bar__dot { display: none; }
.opt__demo[data-bars="block"] .bar__name,
.opt__demo[data-bars="block"] .bar__short { font-weight: 600; }

/*
 * Het naam-voorbeeld: dezelfde twee standen, in het klein. Het menu heeft zelf geen stand, dus het
 * kaartje zegt het per voorbeeld — zoals het vlak-voorbeeld hierboven.
 */
.opt__demo--name { flex-direction: row; align-items: center; gap: 6px; height: 30px; padding: 0 5px; border: 1px solid var(--border-1); border-radius: var(--r-xs); background: var(--nb-white); }
.opt__demo--name .demo-name { flex: 0 1 auto; min-width: 0; font-size: var(--tool-fs-11); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt__demo--name .demo-hours { font-size: var(--tool-fs-11); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.opt__demo--name .demo-disc { display: flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-2); font-size: var(--tool-fs-11); font-weight: 600; }
.opt__demo--name .demo-weeks { flex: 0 0 28px; height: 22px; border-radius: 2px; background: repeating-linear-gradient(to right, var(--bg-3) 0 17px, var(--nb-white) 17px 18px); }

/* De horizon is drie keuzes, dus drie pillen: één klik in plaats van een select openen en kiezen. */
.pills { display: flex; align-items: center; gap: 6px; }
.pills__unit { font-size: var(--tool-fs-12); color: var(--fg-2); }

.pill > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.pill > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    color: var(--fg-2);
    font-size: var(--tool-fs-13);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color var(--dur-base) var(--ease-out);
}

.pill > span:hover { border-color: var(--nb-ink); color: var(--fg-1); }

.pill > input:checked + span {
    border-color: var(--nb-ink);
    background: var(--nb-ink);
    color: var(--fg-on-dark);
    font-weight: 500;
}

.pill > input:focus-visible + span { outline: 2px solid var(--nb-ink); outline-offset: 2px; }

/* A control that cannot mean anything on the board in view says so by being off, not by leaving. */
.ctl:disabled { opacity: 0.45; cursor: not-allowed; }
.ctl--primary:disabled:hover { box-shadow: none; }

/*
 * What the board has to say, stacked over the bottom right corner. Out of the layout entirely: a
 * message used to be a line that pushed the grid down and back up again as it came and went.
 */
.toasts {
    position: fixed;
    right: var(--sp-24);
    bottom: var(--sp-24);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(24rem, calc(100vw - 2 * var(--sp-24)));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    background: var(--nb-white);
    color: var(--fg-1);
    box-shadow: 0 2px 10px rgb(0 0 0 / 12%);
    font-size: var(--tool-fs-13);
    pointer-events: auto;
    animation: toast-in 120ms var(--ease-out);
}

/* Salmon is the board's one alarm colour, and a refusal is what it is for. */
.toast--alarm {
    border-color: var(--tool-alert-fg);
    background: var(--tool-alert-bg);
    color: var(--tool-alert-fg);
}

.toast__text { flex: 1 1 auto; }

.toast__close {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.toast__close:hover { background: rgb(0 0 0 / 8%); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .toast { animation: none; }
}

/*
 * Three columns that touch: the panel, the board, the inspector. There is no gap and no padding
 * between them — the hairlines do that work — because every pixel the chrome takes is a week the
 * board cannot show. The grid has none of its own either: it runs to the edges.
 */
.board-layout {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    min-height: 0;
    /* The inspector is laid out against this box, not beside the board — see .board-inspector. */
    position: relative;
}

.board-grid {
    flex: 1 1 auto;
    min-width: 0;
    overflow: auto;
    /* A step scrolls sideways, and the planner is not the one doing the scrolling: without this the
       glide would fight the momentum of a trackpad that is still moving. */
    overscroll-behavior-x: contain;
}

/*
 * A board that keeps the weeks around the window drawn, off-screen either side, so paging a step is
 * a movement instead of a knip — see assets/planning/board_scroll.js.
 *
 * Sideways it is not a scroll container the planner may drive: it holds more columns than fit on
 * purpose, and reaching them by hand would leave the board halfway between two windows with the
 * axis saying one thing and the buttons another. `scrollLeft` still moves, which is what a step is.
 */
.board-grid--buffered { overflow-x: hidden; }

/*
 * The weeks cannot share the room out between them here: there is more of them than there is room,
 * and `1fr` would divide it over the buffer as well. Each gets the width that makes the horizon —
 * and only the horizon — fill the board exactly, which board_scroll.js works out and the controller
 * writes onto the table.
 */
.board-grid--buffered .board-table {
    grid-template-columns: var(--name-width) repeat(var(--weeks), var(--cell-width));
    width: max-content;
}

/*
 * Waiting on a window this tab does not have yet. The weeks that are up stay where they are and
 * step back instead of being cleared: paging must not flash an empty board on the way, and a grid
 * that no longer answers to the mouse says the figures on it are last week's answer.
 */
.board-grid--loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 120ms var(--ease-out);
}

/* The shape of a board, for the one load that has no weeks to keep: a row per person, no figures. */
.board-skeleton { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; }

.board-skeleton__row {
    height: var(--lane-height);
    border-radius: var(--r-xs);
    background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 50%, var(--bg-2) 100%);
    background-size: 200% 100%;
    animation: board-skeleton-sweep 1200ms linear infinite;
}

@keyframes board-skeleton-sweep {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .board-grid--loading { transition: none; }
    .board-skeleton__row { animation: none; }
}
/* One tab strip: the backlog, the work in hand and a week of capacity, one of them in view. */
/*
 * The panel: what narrows *this* board, and what is still waiting for a week. The backlog is at the
 * bottom and scrolls inside itself, because it is a drag source — it has to be on screen at the
 * same time as the rows you would drag onto, which is exactly what it could not be as a tab.
 */
.board-panel {
    flex: 0 0 232px;
    box-sizing: border-box;
    min-height: 0;
    /* A flex item's min-width is its content by default, and a project's name runs to any length:
       without this a long name widens the panel and takes weeks off the board. */
    min-width: 0;
    background: var(--bg-3);
    border-right: 1px solid var(--border-1);
    /* De strook en de lijst liggen allebei in deze kolom, en in de kijkstand ligt de lijst over het
       bord: dan heeft hij iets nodig om overheen te liggen. */
    position: relative;
}

/*
 * Wat er in het paneel staat: de kop met het zoekvak en de lijst eronder. Het was het paneel zelf,
 * tot de backlog kon dichtklappen — de kolom blijft dan staan als strook, en dit is wat er weggaat.
 */
.board-panel__pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    height: 100%;
    padding-top: 14px;
}

/*
 * ---- de strook ----
 *
 * De backlog stond altijd open: tweehonderdtweeëndertig pixels bord eraf, ook op de dagen dat er
 * niets uit te delen viel. Dicht is hij achtenveertig pixels die één ding zeggen — hoeveel werk er
 * nog op een week wacht — en hij gaat open zodra je hem aanwijst. Zie assets/planning/backlog.js.
 */
/*
 * De kolom springt van breedte, hij schuift niet. Een `flex-basis` die animeert laat de browser het
 * hele rooster opnieuw indelen, elk beeld opnieuw, en dat is precies het rooster waarvan elders in
 * dit bestand elke maat een variabele is om die herindeling te vermijden. Wat wel beweegt is de
 * lijst zelf, en dat is opacity en transform — zie .board-panel__pane hieronder.
 */
.board-page[data-backlog="strip"] .board-panel,
.board-page[data-backlog="peek"] .board-panel { flex-basis: 48px; }

.backlog-strip {
    display: none;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.board-page[data-backlog="strip"] .backlog-strip,
.board-page[data-backlog="peek"] .backlog-strip { display: flex; }

.backlog-strip:hover { background: var(--bg-2); }
.backlog-strip:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: -2px; }

/* Het enige getal in de strook: hoeveel werk er nog op een week wacht. */
.backlog-strip__count {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-20);
    line-height: var(--lh-flat);
    letter-spacing: var(--tr-wide);
    font-variant-numeric: tabular-nums;
}

.backlog-strip__label {
    font-size: var(--tool-fs-11);
    font-weight: 600;
    letter-spacing: var(--tr-wide);
    text-transform: uppercase;
    color: var(--fg-2);
    writing-mode: vertical-rl;
}

/*
 * De kijkstand: open, maar over het bord en niet ernaast. Dat is dezelfde afweging als bij de
 * inspecteur — een kolom die opengaat verschuift elke rij eronder, en dat gebeurt dan precies op
 * het moment dat je ergens op mikt.
 */
.board-page[data-backlog="strip"] .board-panel__pane,
.board-page[data-backlog="peek"] .board-panel__pane {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 6;
    width: 232px;
    height: auto;
    background: var(--bg-3);
    border-right: 1px solid var(--border-1);
    transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out);
}

.board-page[data-backlog="strip"] .board-panel__pane {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
}

.board-page[data-backlog="peek"] .board-panel__pane { box-shadow: 8px 0 24px rgb(0 0 0 / 10%); }

@media (prefers-reduced-motion: reduce) {
    .board-panel__pane { transition: none; }
}

.board-panel__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    font-size: var(--tool-fs-11);
    font-weight: 600;
    letter-spacing: var(--tr-wide);
    text-transform: uppercase;
    color: var(--fg-2);
}

.board-panel__count {
    margin-left: auto;
    font-size: var(--tool-fs-11);
    font-weight: 500;
    letter-spacing: var(--tr-tight);
    color: var(--fg-2);
    font-variant-numeric: tabular-nums;
}

/* The head of the panel: the word Backlog and the box that narrows it. It does not scroll — the
   list under it does, and a search box that scrolls out of reach is a search box you cannot clear. */
.board-panel__head {
    flex: 0 0 auto;
    padding: 0 14px 12px;
}

/* The way into the form under the title: quiet, at the end of the line, so the word Backlog is
   still what the eye lands on first. */
.board-panel__add {
    margin-left: auto;
    height: 22px;
    padding: 0 6px;
    font-size: var(--tool-fs-11);
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}

.board-panel__add[aria-expanded="true"] { color: var(--fg-1); }

/*
 * De speld, naast "+ Nieuwe taak" en even stil als die. Ingedrukt is hij de enige stand die iets
 * vasthoudt: los gaat de lijst weer dicht zodra de muis van de kolom af is.
 */
.board-panel__pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--fg-2);
    cursor: pointer;
}

.board-panel__pin:hover { background: var(--bg-2); color: var(--fg-1); }
.board-panel__pin:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 1px; }
.board-panel__pin[aria-pressed="true"] { background: var(--bg-2); color: var(--fg-1); }

/* New work, made where it lands: a short form between the title and the search, gone when closed. */
.backlog-form {
    padding: 8px 10px 4px;
    margin: 0 0 10px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-xs);
    background: var(--nb-white);
}

.backlog-form input,
.backlog-form select {
    box-sizing: border-box;
    width: 100%;
    font: inherit;
    font-size: var(--tool-fs-12);
    padding: 4px 8px;
    border: 1px solid var(--border-1);
    border-radius: 4px;
    background: var(--nb-white);
    color: var(--fg-1);
}

.backlog-form input:focus-visible,
.backlog-form select:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: -1px; }

/* Two small pills that share the width of the form, whatever the panel's width: the header's
   36px inked button would not fit a 200px column, so the form keeps its own scale. */
.backlog-form__actions { display: flex; gap: 6px; margin: 6px 0 6px; }

.backlog-form__actions .ctl {
    flex: 1 1 0;
    min-width: 0;
    height: 28px;
    padding: 0 10px;
    font-family: var(--font-body);
    font-size: var(--tool-fs-12);
    font-weight: 600;
    letter-spacing: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.backlog-form__actions .ctl--ghost { flex: 0 1 auto; border-color: var(--border-1); }
.backlog-form__actions .ctl--primary:hover { box-shadow: var(--ring-white), 0 0 0 3px var(--nb-ink); }

.backlog-form .panel__error:empty { display: none; }

/* .panel__field is display: flex, which would otherwise beat the browser's own [hidden]. */
.backlog-form [hidden] { display: none; }

.board-panel__search {
    box-sizing: border-box;
    width: 100%;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    background: var(--nb-white);
    color: var(--fg-1);
    font-family: var(--font-body);
    font-size: var(--tool-fs-12);
}

.board-panel__search::placeholder { color: var(--fg-2); }
.board-panel__search:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: -1px; }

.board-panel__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 13px 14px 14px;
    border-top: 1px solid var(--border-1);
}

.board-table {
    position: relative;
    display: grid;
    /* Weeks share the room evenly and grow to fill it, so a short window fills the board instead of
       leaving a stripe of empty grey beside it. They shrink to --cell-min before the board starts
       scrolling: asking for 8 weeks means seeing 8 weeks, not seven and a scrollbar. */
    grid-template-columns: var(--name-width) repeat(var(--weeks), minmax(var(--cell-min), 1fr));
    align-items: stretch;
    width: 100%;
}

/* ---- the week bar, pinned so the axis never scrolls away ---- */

.corner-head {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 6;
}

/*
 * The month band, over the week numbers. It is the top row of the grid, so the week bar sticks
 * under it rather than at the top: two rows of axis, both pinned.
 */
.month-head {
    position: sticky;
    top: 0;
    z-index: 4;
    height: var(--month-bar-height);
    box-sizing: border-box;
    padding: 3px 8px 0;
    background: var(--bg-1);
    border-left: 1px solid var(--border-1);
    border-bottom: 1px solid var(--border-1);
    font-size: var(--tool-fs-11);
    font-weight: 600;
    letter-spacing: var(--tr-wide);
    text-transform: uppercase;
    color: var(--fg-2);
    white-space: nowrap;
    overflow: hidden;
}

/* The corner over the name column: no month, no line into the names. */
.month-head--corner { left: 0; z-index: 6; border-left: 0; }

.week-head,
.corner-head {
    position: sticky;
    top: var(--month-bar-height);
    z-index: 4;
    background: var(--bg-3);
    border-right: 1px solid var(--border-1);
    border-bottom: 1px solid var(--border-1);
}

.week-head {
    height: var(--week-bar-height);
    box-sizing: border-box;
    padding: 4px 2px;
    text-align: center;
    font-size: var(--tool-fs-13);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/*
 * A tight axis: half a year of weeks leaves a column of about thirty-five pixels, where the Monday
 * wrapped onto a third line and the two figures in the strip ran into each other. Both are dropped
 * rather than shrunk — the date lives in the week head's title and what is booked in the cell's, so
 * the board still says everything it said. What is left of the week stays, because that is the
 * figure being read. See assets/planning/bar_fit.js `axisFor`.
 */
.board-page[data-axis="tight"] .week-head__date { display: none; }
.board-page[data-axis="tight"] .week-head { font-size: var(--tool-fs-12); }
.board-page[data-axis="tight"] .strip-cell { gap: 0; font-size: var(--tool-fs-11); }
.board-page[data-axis="tight"] .strip-cell__booked { display: none; }

.week-head--current { background: var(--bg-2); }
.week-head--past { color: var(--fg-2); }
.week-head__date { display: block; color: var(--fg-2); font-size: var(--tool-fs-11); font-weight: 300; }
.week-head--past .week-head__date { opacity: 0.7; }

/* The line between the last week that happened and the one being planned. */
/* Both of these sit in a grid area rather than on a calc of the cell width, because a cell that
   grows has no width to calculate with. */
.today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: var(--nb-ink);
    pointer-events: none;
    z-index: 7;
}

/*
 * The line's own name, in the band over the week numbers: everything to its left already happened.
 * It rides along at the top of the line, so it is there at every horizon and stays put while the
 * grid scrolls under it.
 */
.today-line__label {
    position: absolute;
    top: 2px;
    left: 1px;
    padding: 0 5px;
    border-radius: var(--r-pill);
    background: var(--nb-ink);
    color: var(--fg-on-dark);
    font-size: var(--tool-fs-11);
    font-weight: 500;
    line-height: 16px;
    white-space: nowrap;
}

/*
 * The weeks that already happened stay readable, but step back.
 *
 * It sits *under* the work, not over it: a task that started three weeks ago carries its name at
 * its own left edge, which is in the past, and the wash was painting over exactly the line a
 * planner needs to read. What steps back is the empty room behind the work, and work that is
 * entirely behind us says so for itself (see .bar--past).
 */
.board-failed {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    max-width: 30rem;
    margin: var(--sp-24);
    padding: var(--sp-20);
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    background: var(--bg-1);
}

.board-failed__what { margin: 0; }

.past-wash {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
    z-index: 2;
}

/*
 * Which is why every layer that has to stay legible over the wash is above it. The order, low to
 * high: the wash (2), a bar (3), the sticky axis and name column (4 and 5), the corner over both
 * (6), today's line (7), and the drop band a drag aims at (8).
 */
.bar { z-index: 3; }

/* Work that is entirely behind us: nothing to plan there, so it is the one thing that recedes. */
.bar--past { opacity: 0.55; }
.bar--past:hover { opacity: 1; }

/* ---- the break between two teams: a blank row, its name in the margin ---- */

/*
 * The break between two teams: a band the width of the board with the team's name in the margin.
 *
 * It used to be pinned under the axis, and that read as a fault rather than as a heading: it stuck
 * at one offset for every team at once, and it sat *below* the bars in the stacking order, so work
 * slid over the top of a beige band that would not move. A break is a break — it marks where one
 * group ends, which is a thing you scroll past, not a thing that follows you down the board.
 *
 * Only the name is still pinned, and only sideways: the same as a person's name, so scrolling into
 * November does not take the team you are reading off the left edge.
 */
.team-head,
.team-break {
    height: var(--team-break-height);
    box-sizing: border-box;
    background: var(--bg-3);
    /* Bounded on both sides, because this is what makes a team read as one block. */
    border-top: 1px solid var(--border-1);
    border-bottom: 1px solid var(--border-1);
}

/*
 * The people of a team with nothing in these weeks, folded behind one quiet line at the bottom of
 * the team; unfolded, they are drawn right under it. The toggle is sticky like the name column, so
 * it stays at the left edge while a buffered board keeps weeks off-screen.
 */
.idle-line {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-1);
}
.idle-line__toggle {
    position: sticky;
    left: 0;
    min-height: 28px;
    padding: 0 10px;
    border: 0;
    background: none;
    font: inherit;
    font-size: var(--tool-fs-12);
    color: var(--fg-2);
    cursor: pointer;
}
.idle-line__toggle:hover { color: var(--fg-1); }
.idle-line__toggle:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: -2px; }
.board-page[data-idle="folded"] .is-idle { display: none; }

.team-head {
    position: sticky;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-right: 1px solid var(--border-1);
}

.team-head__name {
    font-weight: 600;
    font-size: var(--tool-fs-12);
    letter-spacing: var(--tr-wide);
    text-transform: uppercase;
    color: var(--fg-2);
}

/* ---- a person ---- */

/*
 * A person is one block: their name, the capacity strip, and their lanes. What separates them from
 * the next person is one line that runs the whole width of the board — drawn on the top edge of
 * every block, so the name column and the weeks beside it make one uninterrupted line and a team
 * reads as a group of blocks instead of a field of cells.
 *
 * Which is why the lines *inside* a block are the quiet ones: a person with four lanes was four
 * lines at the same weight as the line between people, and none of it grouped.
 */
.row-name {
    position: sticky;
    left: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 9px 10px;
    background: var(--bg-1);
    border-right: 1px solid var(--border-1);
    border-top: 1px solid var(--border-1);
}

.row-name__text { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Everybody's working week, under their name. */
.row-name__capacity { font-size: var(--tool-fs-11); color: var(--fg-2); font-variant-numeric: tabular-nums; }

/*
 * De korte stand: initialen in een schijf, met het urengetal eronder. Elke rij draagt beide
 * standen — zie assets/planning/names.js — dus dit is één attribuut op het bord en geen hertekening.
 *
 * Standaard is dit de korte, want een naam lees je één keer om je rij te vinden en daarna niet
 * meer; de weken ernaast lees je de hele dag. Wie hem toch voluit wil, kiest dat in Weergave.
 */
.row-name__disc {
    display: none;
    width: 26px;
    height: 26px;
    box-sizing: border-box;
    border-radius: 50%;
    background: var(--bg-2);
    align-items: center;
    justify-content: center;
    font-size: var(--tool-fs-11);
    font-weight: 600;
    letter-spacing: var(--tr-wide);
}

.row-name__hours { display: none; font-size: var(--tool-fs-11); color: var(--fg-2); font-variant-numeric: tabular-nums; }

.board-page[data-names="initials"] { --name-width: 3.25rem; }
/*
 * De schijf staat midden in de kolom: even veel lucht aan alle vier de kanten. De randen tellen
 * mee — rechts staat de lijn naar het bord en boven de lijn naar de vorige persoon — dus de padding
 * is aan die twee kanten een pixel korter dan ertegenover.
 */
.board-page[data-names="initials"] .row-name { align-items: center; padding: 8px 8px 9px 9px; }
.board-page[data-names="initials"] .row-name__disc { display: flex; }
.board-page[data-names="initials"] .row-name__hours { display: block; }
.board-page[data-names="initials"] .row-name__capacity { display: none; }

/*
 * De naam blijft staan waar een schermlezer hem vindt: de schijf is twee letters en zegt niets
 * hardop, dus de naam wordt weggenomen zoals een bijschrift dat is, niet met display: none.
 */
.board-page[data-names="initials"] .row-name__text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/*
 * In deze stand is er geen kolom meer om een teamnaam in te zetten. De naam loopt door over de
 * band ernaast: dezelfde hoogte, dezelfde kleur, dus het leest als één band in plaats van als
 * tekst die over het bord heen valt.
 */
.board-page[data-names="initials"] .team-head { border-right: 0; padding: 0 6px; }

/*
 * The week cell says what is left, and only colours when something is off: beige when there is
 * room, salmon when the week does not fit, nothing at all when it is exactly full.
 */
.strip-cell {
    height: var(--strip-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    /* One beige ground for the whole strip, no cells: what a person has left reads as a line of
       figures, and nothing in it can pass for a bar of work. */
    background-color: var(--bg-3);
    /* The line that separates this person from the one above: it runs on into the name column. */
    border-top: 1px solid var(--border-1);
    border-bottom: 1px solid var(--bg-2);
    font-size: var(--tool-fs-12);
    font-variant-numeric: tabular-nums;
    background-repeat: no-repeat;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
}

.strip-cell:hover { outline: 1px solid var(--nb-ink); outline-offset: -1px; }
/* A full week is a faint dash; a week with room speaks in ink; a week over capacity in salmon ink,
   with a salmon rule under it so it still stands out to somebody who does not read the figure. */
.strip-cell[data-state="full"] { color: color-mix(in srgb, var(--fg-2) 35%, var(--bg-3)); }
.strip-cell[data-state="room"] { color: var(--fg-1); font-weight: 500; }
.strip-cell[data-state="over"] { color: var(--tool-alert-fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--nb-salmon); }
.strip-cell__booked { color: var(--fg-2); }
/* In a full week what is booked is the capacity, which the title says: only the dash is left. */
.strip-cell[data-state="full"] .strip-cell__booked { display: none; }

/*
 * What the strip says, per reading. Same order in which the board already gives things up: at
 * thirteen weeks the booked figure goes and the figure being read stays; at twenty-six both go and
 * the colour is left, as a band of five pixels. A column of thirty-five pixels has no room for a
 * figure, and at that horizon the question is not how much still fits but where it pinches.
 *
 * The JavaScript builds both figures at every reading and this hides one — the same arrangement as
 * `data-fit` on a bar, so no cell is ever built twice.
 */
.board-page[data-reading="snug"] .strip-cell__booked { display: none; }

.board-page[data-reading="dense"] .strip-cell {
    height: var(--strip-height);
    margin: 2px 1px 0;
    border-right: 0;
    border-radius: 1px;
    font-size: 0;
    color: transparent;
}

.board-page[data-reading="dense"] .strip-cell[data-state="full"] { background-color: var(--nb-ink); }
.board-page[data-reading="dense"] .strip-cell[data-state="room"] { background-color: color-mix(in srgb, var(--nb-ink) 22%, var(--nb-beige)); }
.board-page[data-reading="dense"] .strip-cell[data-state="over"] { background-color: var(--tool-alert-fg); box-shadow: none; }

.lane {
    min-height: var(--lane-height);
    position: relative;
    border-right: 1px solid var(--bg-3);
    /* Inside a person's block, so quiet: the strong line is the one between people. */
    border-bottom: 1px solid var(--bg-2);
}

/*
 * The free lane every person keeps for work that has to run alongside what is already there.
 *
 * It was a grid row, standing empty at a lane's worth of height per person for the sake of one
 * moment per drag. It could not merely appear when a drag began: a row that opens pushes every row
 * below it down, and the target then slides out from under the pointer at the exact moment the
 * planner is aiming at it.
 *
 * So the container sits in the last lane's row, and the band hangs off the bottom of it. It has a
 * place and a size at all times — drag_controller measures it once, when a drag starts — but it is
 * out of the flow, so having it costs the board no height. See board_controller#renderDropBand.
 */
.drop-band {
    position: relative;
    pointer-events: none;
    z-index: 8;
}

.drop-band__lane {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: var(--empty-lane-height);
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-bottom: 1px solid var(--border-1);
    /* Striped, because that is what the help sheet calls it: "slepen naar de gestreepte lijn". */
    background: repeating-linear-gradient(45deg, var(--bg-3), var(--bg-3) 6px, var(--bg-2) 6px, var(--bg-2) 12px);
    color: var(--fg-2);
    font-size: var(--tool-fs-11);
    /*
     * Painted only while a drag is on, and then only the one being aimed at: a band lies over the
     * capacity figures of the person below it, and those are what a planner reads before letting
     * go. Not display:none — a band with no box is a drop target the drag cannot measure.
     */
    opacity: 0;
    transition: opacity 90ms var(--ease-out);
}

.board-page--dragging .drop-band--on .drop-band__lane { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .drop-band__lane { transition: none; }
}

/* The row a person's leave lives in: always the first one, and never a target for anything. */
.lane--leave {
    min-height: var(--leave-lane-height);
    background: var(--bg-2);
    border-bottom: 1px solid var(--bg-2);
}

/* ---- a bar ---- */

.bar {
    position: relative;
    grid-row: auto;
    /* Dragging a bar must not sweep a text selection along with it. This rather than
       preventDefault() on the pointerdown, which would cost the bar its dblclick. */
    user-select: none;
    margin: 3px 2px;
    padding: 4px 10px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-xs);
    /* A property, so the hours can paint over a sticking label with exactly the bar's own fill. */
    --bar-fill: var(--nb-white);
    background: var(--bar-fill);
    color: var(--fg-1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    /* Clip, not hidden: hidden would make the bar a scroll container of its own, and the label
       below could then only stick inside the bar instead of at the edge of the board. */
    overflow: clip;
    white-space: nowrap;
    cursor: grab;
    touch-action: none;
}

.bar:hover { box-shadow: var(--ring-white), 0 0 0 5px var(--nb-beige); }
.bar__head { display: flex; align-items: center; gap: 7px; }
/*
 * Dot, project and task, as one block that sticks just right of the name column: a bar that began
 * before the window — or out in the weeks a buffered board keeps off-screen — still says what it
 * is where the planner can read it, instead of at a start nobody can see.
 */
.bar__label {
    position: sticky;
    left: calc(var(--name-width) + 6px);
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
}
.bar__dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--tool-project-1); }
.bar__name { font-size: var(--tool-fs-13); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
/* The project's short form, for a bar of a single week. Only shown at that width — see the fit
   rules below — so the two never stand side by side. */
.bar__short { display: none; font-size: var(--tool-fs-11); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
/* What is being done. The project has the front of the bar now, so this is the line that goes
   first when the room runs out. */
.bar__task { font-size: var(--tool-fs-11); color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; }
.bar__hours { margin-left: auto; font-size: var(--tool-fs-11); color: var(--fg-2); font-variant-numeric: tabular-nums; }
/* The label sticks at the board's edge and so can slide up against the far end of a bar that shows
   only a sliver: the hours stay on top, on the bar's own fill, and the name tucks in under them. */
.bar__hours { position: relative; z-index: 1; padding-left: 6px; background: var(--bar-fill); }
/*
 * The second line: the project and the total, for a bar too narrow to say them beside the name.
 * Hidden unless that is the case — see the fit rules below.
 */
.bar__sub {
    display: none;
    font-size: var(--tool-fs-11);
    color: var(--fg-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
 * A bar the window cut off. The cut side loses its rounding and its border and grows a chevron, so
 * work that has been running for three weeks reads as work that came from somewhere — rather than
 * as work that starts exactly where the board happens to start.
 */
.bar[data-cut="start"],
.bar[data-cut="both"] {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
    padding-left: 8px;
    background-image: linear-gradient(to right, var(--bg-2), var(--bg-2) 3px, transparent 3px);
}

.bar[data-cut="end"],
.bar[data-cut="both"] {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

/*
 * Work that fills every week in view: the label twice, centred on a quarter and three quarters of
 * the part that is seen (`--at`, from layout.js `twiceAt`). The head keeps the height of a line so
 * the hours still sit where they always do, at the far end.
 */
.bar[data-twice] .bar__head { position: relative; min-height: 18px; }
.bar[data-twice] .bar__label {
    position: absolute;
    left: var(--at);
    top: 50%;
    transform: translate(-50%, -50%);
}
/* The cut edge is the bar's own, not either name's: no chevron in front of a copy. */
.bar[data-twice][data-cut] .bar__label::before { content: none; }

/* A cut bar's label gets the room of the slice in view (`--seen`, from measureBoard), less what
   the hours take, so it ends in an ellipsis instead of being pushed off the edge. */
/* Only the left edge matters: there the label sticks. Narrow and tiny bars put their hours on a
   second line or leave them out, so they keep only the padding free. */
.bar:is([data-cut="start"], [data-cut="both"]):not([data-twice]) .bar__label { max-width: max(0px, calc(var(--seen, 100%) - 90px)); }
.bar:is([data-cut="start"], [data-cut="both"]):is([data-fit="narrow"], [data-fit="tiny"]):not([data-twice]) .bar__label { max-width: max(0px, calc(var(--seen, 100%) - 24px)); }

/* The chevron rides along with the label, so it stays beside the name it belongs to. */
.bar[data-cut="start"] .bar__label::before,
.bar[data-cut="both"] .bar__label::before {
    content: '‹';
    color: var(--fg-2);
    font-size: var(--fs-15);
    line-height: 1;
}

.bar[data-cut="end"]::after,
.bar[data-cut="both"]::after {
    content: '›';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fg-2);
    font-size: var(--fs-15);
    line-height: 1;
}

/* The hours are what a cut bar keeps saying, so they may not run under the chevron. */
.bar[data-cut="end"] .bar__hours,
.bar[data-cut="both"] .bar__hours { margin-right: 10px; }

/*
 * What a bar says, from how wide it turned out. Every bar is built with every line in it and hides
 * what will not fit, so the measuring pass writes one attribute and never rebuilds anything. The
 * order things are given up in is assets/planning/bar_fit.js; the hours are never given up.
 *
 * `wide` is the bar as built — name, key, hours, and a figure per week when they differ — so it
 * needs no rules of its own.
 */

/* snug: which task it is is the first thing to go — the project it belongs to is what a planner
   reads a narrowing board for, and it stays. */
.bar[data-fit="snug"] .bar__task,
.bar[data-fit="snug"] .bar__weeks { display: none; }

/* narrow: two stacked lines instead of one crowded one — the project on top, its total under it. */
.bar[data-fit="narrow"] .bar__task,
.bar[data-fit="narrow"] .bar__weeks,
.bar[data-fit="narrow"] .bar__hours { display: none; }
.bar[data-fit="narrow"] .bar__sub { display: block; }
.bar[data-fit="narrow"] .bar__head,
.bar[data-fit="narrow"] .bar__label { gap: 4px; }
.bar[data-fit="narrow"] .bar__name { font-size: var(--tool-fs-12); }

/* tiny: one word, and it is where the work belongs. A project whose name does not fit a column of
   one week says its code instead (see assets/planning/bars.js); the hours are in the strip over
   every row, and which task it is stays in the title. */
.bar[data-fit="tiny"] { padding: 2px 4px; }
.bar[data-fit="tiny"] .bar__task,
.bar[data-fit="tiny"] .bar__weeks,
.bar[data-fit="tiny"] .bar__hours,
.bar[data-fit="tiny"] .bar__name { display: none; }
.bar[data-fit="tiny"] .bar__short { display: block; }
.bar[data-fit="tiny"] .bar__head,
.bar[data-fit="tiny"] .bar__label { gap: 4px; }
.bar[data-fit="tiny"] .bar__dot { flex-basis: 6px; width: 6px; height: 6px; }

/*
 * Wat een balk zegt over zijn werk: de naam van het project in tekst, of het project als vlak in
 * zijn eigen kleur. Twee standen van één instelling in de kop — zie assets/planning/bars.js — en
 * allebei staan ze al in elke balk: dit is paint, geen tweede manier om een balk te bouwen.
 *
 * De kleur komt van `--project`, die bar_element.js één keer op de balk zet. Werk zonder project
 * valt terug op de eerste projectkleur, zoals de stip dat altijd al deed.
 */
.bar__dot { background: var(--project, var(--tool-project-1)); }

.board-page[data-bars="block"] .bar:not(.bar--leave),
.board-page[data-bars="block"] .backlog__item {
    --project-tint: color-mix(in srgb, var(--project, var(--tool-project-1)) 20%, var(--nb-white));
    --project-ink: color-mix(in srgb, var(--project, var(--tool-project-1)) 72%, var(--nb-ink));

    --bar-fill: var(--project-tint);
    background: var(--project-tint);
    border-color: color-mix(in srgb, var(--project, var(--tool-project-1)) 40%, var(--nb-white));
    color: var(--project-ink);
}

/* Het vlak zegt zelf al van welk project het is, dus de stip is er dubbelop. */
.board-page[data-bars="block"] .bar:not(.bar--leave) .bar__dot,
.board-page[data-bars="block"] .backlog__item .backlog__dot { display: none; }
.board-page[data-bars="block"] .bar:not(.bar--leave) .bar__name,
.board-page[data-bars="block"] .bar:not(.bar--leave) .bar__short,
.board-page[data-bars="block"] .backlog__item .bar__name { font-weight: 600; }
.board-page[data-bars="block"] .bar:not(.bar--leave) .bar__task,
.board-page[data-bars="block"] .bar:not(.bar--leave) .bar__hours,
.board-page[data-bars="block"] .bar:not(.bar--leave) .bar__sub,
.board-page[data-bars="block"] .bar:not(.bar--leave) .bar__week,
.board-page[data-bars="block"] .backlog__item .backlog__project,
.board-page[data-bars="block"] .backlog__item .bar__hours { color: var(--project-ink); }

/*
 * Wie het werk al toekomt, ook op een vlak. Dit is de enige regel in een item die in de naamstand
 * in vol inkt staat, omdat hij zegt dat het werk niet vrij op te pakken is; op een vlak wordt dat
 * de donkerste tint die de projectkleur heeft, want zwart erop leest als een tweede stem.
 */
.board-page[data-bars="block"] .backlog__item .backlog__owner {
    color: color-mix(in srgb, var(--project, var(--tool-project-1)) 85%, var(--nb-ink));
}

/* Werk dat nog een concept is houdt zijn arcering; die leest op een vlak alleen zwakker. */
.board-page[data-bars="block"] .bar--concept { background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgb(255 255 255 / 55%) 5px 10px); }

.bar__weeks { display: grid; gap: 0; }
.bar__week { text-align: center; font-size: var(--tool-fs-11); color: var(--fg-2); font-variant-numeric: tabular-nums; overflow: hidden; }

.bar--selected { outline: 2px solid var(--nb-ink); outline-offset: -2px; }

/*
 * Work that just changed. A row is drawn again where it stands, so without this a bar that moved
 * under somebody else's hands would simply be somewhere else the next time you looked at it.
 */
.bar--changed { animation: bar-changed 900ms var(--ease-out); }

@keyframes bar-changed {
    from { box-shadow: var(--ring-white), 0 0 0 5px var(--nb-beige); }
    to { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bar--changed { animation: none; }
}
.bar--locked { cursor: not-allowed; }

/* An option: the same room, drawn as a promise not yet made — dashed edge, hatched fill. */
.bar--concept { border-style: dashed; background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(255, 255, 255, 0.45) 5px 10px); }
.bar__tag { flex: 0 0 auto; padding: 0 5px; border: 1px dashed currentColor; border-radius: 999px; font-size: var(--tool-fs-10, 10px); line-height: 14px; text-transform: uppercase; letter-spacing: .04em; opacity: 0.8; }
[data-fit="narrow"] .bar__tag, [data-fit="tiny"] .bar__tag { display: none; }
.panel__check { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: var(--tool-fs-13); }

/*
 * Leave is a strip, not a lane: it says when somebody is away, above the work rather than in it.
 * So the bar is pinned to the strip's own height instead of taking the height a work bar takes.
 *
 * It used to inherit the work bar's box, which is built to hold two lines and shows the second one
 * from how wide it measured (see bar_fit.js). A leave of one week measured `snug` and came out 28px
 * high, a longer one measured `wide` and came out 44px, and the grid row stretched to whichever it
 * was — so the leave row was 25, 34 or 50 pixels depending on who was away and for how long, and
 * every row under it shifted with it. One line, one height, always.
 */
.bar--leave {
    height: calc(var(--leave-lane-height) - 6px);
    box-sizing: border-box;
    padding: 0 8px;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-size: var(--tool-fs-12);
    background-color: var(--bg-3);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.8) 0 5px, transparent 5px 10px);
}

/* Whatever the measurement says a bar may add, leave stays on its one line: the name and how many
   hours are gone, and the dates in the title. */
.bar--leave .bar__weeks,
.bar--leave .bar__sub,
.bar--leave .bar__jira { display: none; }
.bar--leave .bar__name { font-size: var(--tool-fs-12); }

.bar__edge {
    position: absolute;
    top: 6px;
    bottom: 6px;
    width: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    cursor: col-resize;
    color: var(--fg-2);
    transition: opacity 90ms var(--ease-out);
}

.bar:hover .bar__edge { opacity: 0.5; }
.bar__edge::after { content: ''; width: 2px; height: 60%; border-radius: 1px; background: currentColor; }
.bar__edge--start { left: 1px; }
.bar__edge--end { right: 1px; }
.bar--ghost { opacity: 0.4; pointer-events: none; }

/* The bar as it still is, while the outline says what it would become. */
.bar--source { opacity: 0.35; }

/* Where the drop would land, snapped to the grid, with the weeks it would cover written on it. */
.drop-outline {
    position: fixed;
    z-index: 9;
    pointer-events: none;
    border: 2px solid var(--fg-1);
    border-radius: var(--r-xs);
    background: color-mix(in srgb, var(--fg-1) 8%, transparent);
    /* It snaps from week to week; the slide is what makes the snap readable. */
    transition: left 90ms var(--ease-out), top 90ms var(--ease-out), width 90ms var(--ease-out), height 90ms var(--ease-out);
}

.drop-outline__label {
    position: absolute;
    left: 0;
    bottom: 100%;
    margin-bottom: 3px;
    padding: 1px 6px;
    border-radius: var(--r-xs);
    background: var(--fg-1);
    color: var(--bg-1);
    font-size: var(--tool-fs-11);
    white-space: nowrap;
}

/* Where work that gives way would end up. Dashed and dimmer than the drop outline: it is a
   consequence of the drop, not the thing the planner is holding. */
.shove-outline {
    position: fixed;
    z-index: 8;
    pointer-events: none;
    border: 2px dashed color-mix(in srgb, var(--fg-1) 45%, transparent);
    border-radius: var(--r-xs);
    background: color-mix(in srgb, var(--fg-1) 4%, transparent);
    transition: left 90ms var(--ease-out), top 90ms var(--ease-out), width 90ms var(--ease-out), height 90ms var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
    .drop-outline,
    .shove-outline { transition: none; }
}

/* ---- the right mouse button on a bar ---- */

.board-menu {
    position: fixed;
    z-index: 30;
    min-width: 12rem;
    padding: 4px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    background: var(--nb-white);
    box-shadow: 0 4px 16px rgb(0 0 0 / 14%);
    display: flex;
    flex-direction: column;
}

.board-menu__item {
    padding: 7px 10px;
    border: 0;
    border-radius: var(--r-xs);
    background: none;
    color: var(--fg-1);
    font: inherit;
    font-size: var(--tool-fs-13);
    text-align: left;
    cursor: pointer;
}

.board-menu__item:hover,
.board-menu__item:focus-visible { background: var(--bg-2); outline: none; }
.board-menu__item--alarm { color: var(--tool-alert-fg); }

/* ---- what the board never said about itself ---- */

.help {
    max-width: 34rem;
    max-height: 80vh;
    overflow-y: auto;
    padding: 22px 24px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    background: var(--nb-white);
    color: var(--fg-1);
    font-family: var(--font-body);
    font-size: var(--fs-15);
}

.help::backdrop { background: rgb(0 0 0 / 28%); }

.help h2 {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-20);
    line-height: var(--lh-flat);
    letter-spacing: var(--tr-wide);
}

.help h3 {
    margin: 18px 0 6px;
    font-size: var(--tool-fs-12);
    font-weight: 600;
    letter-spacing: var(--tr-wide);
    text-transform: uppercase;
    color: var(--fg-2);
}

/* Two columns: what you do on the left, what happens on the right. */
.help__list {
    display: grid;
    grid-template-columns: minmax(9rem, auto) 1fr;
    gap: 4px 14px;
    margin: 0;
    font-size: var(--tool-fs-13);
}

.help__list dt { font-weight: 500; }
.help__list dd { margin: 0; color: var(--fg-2); }

.help__legend { margin: 0; padding: 0; list-style: none; font-size: var(--tool-fs-13); }
.help__legend li { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; color: var(--fg-2); }

.help__swatch {
    flex: 0 0 auto;
    width: 22px;
    height: 14px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-xs);
    background: var(--nb-white);
}

.help__swatch--over { background: var(--tool-alert-bg); border-color: var(--tool-alert-fg); }
.help__swatch--room { background: var(--nb-beige); }
.help__swatch--full { background: var(--nb-white); }
.help__swatch--leave {
    background-color: var(--bg-3);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.8) 0 5px, transparent 5px 10px);
}
.help__swatch--shove { border: 2px dashed color-mix(in srgb, var(--fg-1) 45%, transparent); }
.help__swatch--changed { box-shadow: var(--ring-white), 0 0 0 4px var(--nb-beige); }

.help__actions { display: flex; justify-content: flex-end; margin-top: 20px; }

.help__actions button {
    height: var(--tool-control-h);
    padding: 0 var(--sp-20);
    border: 1px solid var(--nb-ink);
    border-radius: var(--r-pill);
    background: var(--nb-ink);
    color: var(--fg-on-dark);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-18);
    letter-spacing: var(--tr-wide);
    cursor: pointer;
}

/* ---- the question in front of a delete ---- */

.confirm {
    max-width: 26rem;
    padding: 20px 22px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-lg);
    background: var(--nb-white);
    color: var(--fg-1);
    font-family: var(--font-body);
    font-size: var(--fs-15);
}

.confirm::backdrop { background: rgb(0 0 0 / 28%); }

.confirm h2 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-20);
    line-height: var(--lh-flat);
    letter-spacing: var(--tr-wide);
}

.confirm p { margin: 0 0 18px; color: var(--fg-2); font-size: var(--tool-fs-13); }
.confirm__actions { display: flex; justify-content: flex-end; gap: 8px; }

.confirm__actions button {
    height: var(--tool-control-h);
    padding: 0 var(--sp-20);
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    background: var(--nb-white);
    color: var(--fg-1);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-18);
    line-height: var(--lh-flat);
    letter-spacing: var(--tr-wide);
    cursor: pointer;
}

/* The one that throws work away wears the alarm colour; the way out is the plain one. */
.confirm__confirm {
    border-color: var(--tool-alert-fg);
    background: var(--tool-alert-bg);
    color: var(--tool-alert-fg);
}

.confirm__actions button:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 2px; }

/* ---- the side ---- */

/*
 * Nothing in hand, no inspector. It stood there as a column of three hundred pixels saying
 * "Selecteer een taak" — a caption on empty space, paid for in weeks the board could not show.
 * The element stays in the document, because the controller lives on it and the board fills it the
 * moment something is clicked; it just takes no room until then.
 */
.board-inspector[data-mode="empty"] { display: none; }

/*
 * The backlog and the inspector were cards on a strip beside the board, each with its own ring and
 * twenty pixels of radius. They are columns of the page now — the backlog sits inside the panel,
 * the inspector against the right edge — so what separated them from beige is a hairline.
 */
.backlog { position: relative; min-height: 0; }

/*
 * Over the board, not next to it. Selecting a task used to squeeze the grid by 328 pixels and
 * reflow every bar under the cursor; the inspector lies on top of the right edge instead, so the
 * weeks stay exactly where they were when you clicked. The shadow is what says it is above.
 * (It is still positioned, so the close button keeps its anchor — see .panel__close below.)
 */
/*
 * Which edge it lies against follows the work: a bar in the last weeks of a window that cannot
 * scroll would sit under a panel on the right, so the panel steps over to the left instead. See
 * board_controller.js keepClearOfInspector().
 */
.board-inspector[data-side="left"] { right: auto; left: 0; }

.board-inspector {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    width: 328px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-1);
    border-left: 1px solid var(--border-1);
    box-shadow: -8px 0 24px rgb(0 0 0 / 10%);
}






.backlog h2,
.panel h2 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-20);
    line-height: var(--lh-flat);
    letter-spacing: var(--tr-wide);
}

.panel h3 {
    margin: 14px 0 8px;
    font-size: var(--tool-fs-12);
    font-weight: 600;
    letter-spacing: var(--tr-wide);
    text-transform: uppercase;
    color: var(--fg-2);
}

.panel p { margin: 0 0 8px; font-size: var(--tool-fs-13); }
.panel__link { display: inline-block; margin: 0 0 8px; font-size: var(--tool-fs-13); }

.backlog__item {
    display: flex;
    align-items: center;
    user-select: none; /* a task dragged onto somebody must not drag its own text along */
    gap: 8px;
    margin: 6px 0;
    padding: 7px 10px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-xs);
    background: var(--bg-1);
    font-size: var(--tool-fs-13);
    cursor: grab;
}

.backlog__item:hover { box-shadow: var(--ring-white), 0 0 0 5px var(--nb-beige); }
/* Dezelfde eigenschap als op een balk, door board_controller op het item gezet: de stip schildert
   zichzelf ermee, en in de vlakstand doet het hele item dat. Zie `[data-bars]` hierboven. */
.backlog__dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--project, var(--tool-project-1)); }

/* A task waiting in the backlog: two lines of text and an estimate, never a week bar. */
.backlog__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.backlog__project { font-size: var(--tool-fs-11, 11px); color: var(--fg-2); }

/*
 * Who the work is already meant for. Named in full ink, because it is the one thing here that says
 * this is not free to pick up; "Nog niemand" recedes, since unclaimed is the ordinary case.
 */
.backlog__owner { font-size: var(--tool-fs-11, 11px); color: var(--fg-1); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backlog__owner--nobody { color: var(--fg-2); font-weight: 300; font-style: italic; }
.backlog__text .bar__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backlog__item .bar__hours { flex: 0 0 auto; color: var(--fg-2); }

/* A field is its caption and its control, stacked: nothing shares a line with a long word, and
   every control is as wide as the pane. */
.panel__field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 0 0 10px;
}

.panel__field > span {
    color: var(--fg-2);
    font-size: var(--tool-fs-11, 11px);
    text-transform: uppercase;
    letter-spacing: var(--tr-wide);
}

.panel__field > input,
.panel__field > select { width: 100%; }

/* Two short fields that are one thought — a pace and the window it runs over. */
.panel__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.panel__pair .panel__field { margin: 0; }

.panel__week { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.panel__week label { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; font-size: var(--tool-fs-13); }

.panel input,
.panel select {
    max-width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: var(--tool-fs-13);
    padding: 5px 10px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-xs);
    background: var(--bg-1);
    color: var(--fg-1);
}

.panel > input,
.panel > select,
.panel > label > input[type="search"],
.panel input[type="search"] { width: 100%; }

.panel__week input { width: 4.5rem; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }

/*
 * De knoppen in het paneel dragen dezelfde vorm als de rest van het gereedschap: 36 pixels hoog,
 * pilvormig, Hanken op 13. Ze stonden in Unytour op 18 — knopformaat waar de brand het niet voor
 * bedoeld heeft, en drie van die pillen naast elkaar in een paneel van 328 pixels schreeuwden alle
 * drie even hard. Alleen Opslaan is nog ingekt (zie :first-of-type hieronder).
 */
.panel button {
    height: var(--tool-control-h);
    margin: 8px 6px 0 0;
    padding: 0 16px;
    border: 1px solid var(--border-1);
    border-radius: var(--r-pill);
    background: var(--bg-1);
    color: var(--fg-1);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: var(--tool-fs-13);
    line-height: var(--lh-flat);
    letter-spacing: var(--tr-tight);
    cursor: pointer;
    transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}

.panel button:first-of-type {
    padding: 0 20px;
    background: var(--nb-ink);
    border-color: var(--nb-ink);
    color: var(--fg-on-dark);
}

.panel button:hover { border-color: var(--nb-ink); }
.panel button:first-of-type:hover { box-shadow: var(--ring-white), 0 0 0 5px var(--nb-ink); }
.panel button:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 2px; }

/* Out of the flow entirely, so the pill styling above never reaches it and Opslaan keeps being the
   first button in the form. Anchored to the pane, top right, where a dialog's close button sat. */
.panel button.panel__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--fg-2);
    font-family: inherit;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: normal;
}

.panel button.panel__close:hover { background: var(--bg-2, rgb(0 0 0 / 6%)); color: var(--fg-1); }

/*
 * Het taakpaneel: de taak bovenaan, dan hoe ver het staat, dan de uren, en onderin één rij knoppen
 * die blijft staan als de uren scrollen. Het was een platte stapel alinea's met de projectnaam als
 * kop, de taak eronder als lopende tekst, en vier even grote pillen aan het eind waarvan er één
 * verwijdert.
 */
.board-inspector[data-mode="work"] { padding: 0; overflow: hidden; }

.panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px;
}

.panel__head { display: flex; flex-direction: column; gap: 8px; padding-right: 26px; }
.panel__head h2 { margin: 0; line-height: 1.15; }

.panel__project { margin: 0; display: flex; align-items: center; gap: 6px; font-size: var(--tool-fs-13); }
.panel__project a { text-decoration: none; }
.panel__project a:hover { text-decoration: underline; }
.panel__dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--tool-project-1); }
.panel__jira { color: var(--fg-2); font-size: var(--tool-fs-12); }
.panel__meta { margin: 0; font-size: var(--tool-fs-13); color: var(--fg-2); }

/* Hoe ver de taak staat, als balk: het verschil tussen schatting en gepland was een som die de
   planner zelf moest maken. Eén tint, want het is één grootheid. */
.panel__meter { display: flex; flex-direction: column; gap: 6px; }
.panel__meter-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.panel__meter-figure { font-size: var(--tool-fs-13); font-weight: 500; font-variant-numeric: tabular-nums; }
.panel__meter-rest { font-size: var(--tool-fs-12); color: var(--fg-2); font-variant-numeric: tabular-nums; }

.panel__meter-track {
    height: 6px;
    border-radius: var(--r-pill);
    background: var(--bg-2);
    overflow: hidden;
}

.panel__meter-fill { height: 100%; border-radius: var(--r-pill); background: var(--nb-ink); }
.panel__meter-fill--over { background: var(--tool-alert-fg); }

.panel__hours-list { display: flex; flex-direction: column; }
.panel__hours-list h3 { margin: 0 0 8px; }

.panel__week-name { font-weight: 500; }
.panel__week-date { color: var(--fg-2); font-size: var(--tool-fs-11); }

/* De waarschuwing hoort bij de week waar hij over gaat, niet bij het formulier als geheel. */
.panel__weekalert:empty { display: none; }
.panel__weekalert {
    margin: 0 0 6px;
    padding: 4px 8px;
    border-radius: var(--r-xs);
    background: var(--tool-alert-bg);
    color: var(--tool-alert-fg);
    font-size: var(--tool-fs-11);
}

.panel__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-1);
    font-size: var(--tool-fs-13);
    font-weight: 500;
}

.panel__total-value { font-variant-numeric: tabular-nums; }

/* Het project onder de taak: drie cijfers naast elkaar in plaats van één zin met streepjes. */
.panel__card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: var(--r-xs);
    background: var(--bg-3);
}

.panel__card h3 { margin: 0; }
.panel__card-text { margin: 0; font-size: var(--tool-fs-13); }
.panel__figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.panel__figure { display: flex; flex-direction: column; gap: 2px; }
.panel__figure-caption { font-size: var(--tool-fs-11); color: var(--fg-2); }
.panel__figure-value { font-size: var(--fs-15); font-weight: 500; font-variant-numeric: tabular-nums; }
.panel__card .panel__link { margin: 0; }

/*
 * Drie knoppen op één regel, en maar één ervan is ingekt. Ze staan onder de uren op een balk die
 * blijft staan: Opslaan hoorde niet weg te scrollen bij een taak van twintig weken.
 */
.panel__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-1);
    background: var(--bg-1);
}

.panel__actions button { margin: 0; }

/* Naast Opslaan hoort niets even luid te staan: wit met een haarlijn, niet ingekt. */
.panel .panel__quiet { background: none; }

/* Verwijderen staat er wel, maar zegt met kleur wat het is en trekt geen rand om zich heen. */
.panel .panel__danger { margin-left: auto; border-color: transparent; color: var(--tool-alert-fg); }
.panel .panel__danger:hover { border-color: var(--tool-alert-fg); background: var(--tool-alert-bg); }

.panel__error { color: var(--tool-alert-fg); }
.panel__warning { color: var(--fg-accent); }
input.panel__error { border-color: var(--tool-alert-fg); }
