/*
 * Onedoo design tokens (docs/design/look-and-feel.md). Palette "Delft" (Tim, 29-11-2026):
 * "ink" is cobalt, "paper" a cool white. The names say what a colour does, not what it looks like.
 *
 * Two surfaces, used side by side by purpose, not by the visitor's OS setting:
 *   paper  light: reading, working, forms, tables, product UI, trust and docs
 *   ink    dark:  brand moments, hero, sign-in, closing bands, slides, social
 *
 * Set a surface on any element: <body data-surface="paper"> or <section data-surface="ink">.
 * Components only use the semantic tokens (--surface-*, --text-*, --line-*, --action-*),
 * so the same component works on both surfaces without changes.
 * Tailwind v4 (ADR to come) maps these through @theme; the values stay here.
 */

:root {
  /* Primitive palette. Do not use directly in components. */
  --color-ink-950: #18267f;
  --color-ink-700: #3d4a7a;
  --color-ink-500: #59658f;
  --color-paper-50: #ebf0f6;
  --color-paper-200: #dce3ee;
  --color-paper-300: #bcc7da;
  --color-white: #ffffff;
  --color-ink-glow: #223296; /* soft light behind a focal point on ink */
  --color-ink-sunken: #121c66;
  --color-one: #fa4616; /* the dot only */
  --color-one-text: #c2330b; /* red-orange as text on paper, if ever needed */

  /* Type */
  --font-sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.75rem;
  --text-3xl: 4rem;
  --weight-regular: 400;
  --weight-strong: 700;
  --leading-tight: 1.05;
  --leading-body: 1.55;
  --tracking-tight: -0.02em;

  /* Space: generous by default (look-and-feel: lots of white space) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;

  /* Shape: hairlines, small radius; the dot is the only round signature */
  --radius-sm: 4px;
  --radius-md: 6px;
  --border-hairline: 1px;

  /* Grid texture (echo of fanatics.nl): 40px, 1px lines, faded to the edges */
  --grid-size: 40px 40px;
  --grid-mask: radial-gradient(ellipse at center, #000 10%, transparent 65%);
}

/* ---------------------------------------------------------------- paper (light) */

:root,
[data-surface="paper"] {
  --surface: var(--color-paper-50);
  --surface-raised: var(--color-white);
  --surface-sunken: var(--color-paper-200);
  --text: var(--color-ink-950);
  --text-muted: var(--color-ink-700);
  --line: var(--color-paper-300);
  --line-strong: var(--color-ink-950);
  --action-bg: var(--color-ink-950);
  --action-text: var(--color-paper-50);
  --action-bg-hover: var(--color-ink-700);
  --focus: var(--color-ink-950);
  --dot: var(--color-one);
  --grid-line: rgb(24 38 127 / 0.04);
  /* A connection that was checked and works (Tim, 29-11-2026). */
  --works-bg: #e2f1e6;
  --works-line: #9ccbab;
  --works-text: #1b5a32;
  color-scheme: light;
  background-color: var(--surface);
  color: var(--text);
}

/* ---------------------------------------------------------------- ink (dark) */

[data-surface="ink"] {
  --surface: var(--color-ink-950);
  --surface-raised: #21308f;
  --works-bg: #1d4a3a;
  --works-line: #3f8a64;
  --works-text: #d6f0de;
  --surface-sunken: var(--color-ink-sunken);
  --text: var(--color-paper-50);
  --text-muted: var(--color-paper-300);
  --line: #3a4799;
  --line-strong: var(--color-paper-50);
  --action-bg: var(--color-paper-50);
  --action-text: var(--color-ink-950);
  --action-bg-hover: var(--color-paper-300);
  --focus: var(--color-paper-50);
  --dot: var(--color-one);
  --grid-line: rgb(235 240 246 / 0.04);
  color-scheme: dark;
  background-color: var(--surface);
  color: var(--text);
}

/*
 * Optional texture on either surface: <section data-surface="ink" class="surface-grid">
 * The grid sits on its own layer, so the fade mask only touches the lines,
 * never the surface colour or the content.
 */
.surface-grid {
  position: relative;
  isolation: isolate;
}
.surface-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size);
  mask-image: var(--grid-mask);
}

/* Base and sign-in (prototype/app/sign-in.html); the app itself is in shell.css. Tokens from @onedoo/ui only. */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
p,
ul {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.muted {
  color: var(--text-muted);
}
.small {
  font-size: var(--text-sm);
}

.wm {
  display: block;
  height: 28px;
  width: auto;
  color: var(--text);
}
.wm .d {
  fill: var(--dot);
}
.stop {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background: var(--dot);
  margin-left: 0.06em;
}

/* Controls */
.t1 {
  font-size: var(--text-xl);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-strong);
}
.lead {
  color: var(--text-muted);
  margin-top: var(--space-2);
}
.field {
  margin-top: var(--space-6);
}
.field label,
.step {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  margin-bottom: var(--space-2);
}
fieldset.field {
  border: 0;
  padding: 0;
}
fieldset.field legend {
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  margin-bottom: var(--space-2);
}
.field label.choice {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-weight: normal;
  font-size: inherit;
}
.go .btn + .btn {
  margin-left: var(--space-2);
}
.inp {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  font: inherit;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius-md);
}
.inp[aria-invalid="true"] {
  border: 2px solid var(--line-strong);
}
.inp.code {
  max-width: 11rem;
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  letter-spacing: 0.3em;
}
.help {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}
.err {
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  margin-top: var(--space-2);
}
.alert {
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}
.alert b {
  display: block;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-6);
  font: inherit;
  font-weight: var(--weight-strong);
  color: var(--action-text);
  background: var(--action-bg);
  border: 1px solid var(--action-bg);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.btn:hover {
  background: var(--action-bg-hover);
  border-color: var(--action-bg-hover);
}
.btn.sec {
  min-height: 40px;
  padding: 0 var(--space-4);
  color: var(--text);
  background: transparent;
  border-color: var(--text);
}
.btn.sec:hover {
  background: var(--surface-sunken);
}
.lnk {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.go {
  margin-top: var(--space-8);
}
a.btn {
  text-decoration: none;
}
.out.or {
  margin-top: var(--space-8);
}
.out {
  margin-top: var(--space-12);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.out form {
  display: inline;
}

/* The ink screens before you are in. */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-12) var(--space-6);
}
.gate-in {
  width: 100%;
  max-width: 26rem;
}
.gate .wm {
  margin-bottom: var(--space-12);
}
.key {
  display: block;
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  user-select: all;
}

/* The page without a menu (no access). */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line);
}
.top .wm {
  height: 20px;
}
.top .r {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--text-sm);
}
.main {
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--space-16) var(--space-6) var(--space-24);
}
.t0 {
  font-size: clamp(1.75rem, 5vw, var(--text-2xl));
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-strong);
  margin: var(--space-2) 0 var(--space-3);
}

/*
 * The app shell and its lists (docs/design/app.md, concept 3). Semantic tokens only.
 * No inline styles and no script: the content security policy allows neither.
 */

.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--space-2);
  top: var(--space-2);
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  background: var(--surface-raised);
}

body.app {
  display: grid;
  grid-template-columns: 76px 220px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  font-size: var(--text-sm);
  line-height: 1.45;
}
body.app.folded {
  grid-template-columns: 76px minmax(0, 1fr);
}

/* Top bar: wordmark over the rail, the switcher over the menu. */
.bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding-right: var(--space-6);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: grid;
  place-items: center;
  width: 76px;
  flex: none;
}
.bar .wm {
  height: 13px;
}
.who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
}

/* Organization switcher. */
.org {
  position: relative;
  margin-left: 10px;
  min-width: 0;
}
.org-btn {
  anchor-name: --org;
  font: inherit;
  color: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: max-content;
  min-width: 204px;
  max-width: 300px;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  list-style: none;
  cursor: pointer;
}
.org-btn span {
  flex: 1;
  min-width: 0;
}
.org-btn b,
.org-btn small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.org-btn small {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.org-list {
  /* A popover sits in the top layer: placed under its button, or at the switcher's spot. */
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 0;
  top: 64px;
  left: 106px;
  color: inherit;
  width: 340px;
  max-height: calc(100vh - 90px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: 0 12px 32px rgb(24 38 127 / 0.16);
}
.org-find {
  padding: var(--space-2);
  border-bottom: 1px solid var(--line);
}
.org-find .inp {
  min-height: 40px;
}
.org-head {
  padding: var(--space-3) var(--space-4) var(--space-1);
  font-size: 0.6875rem;
  font-weight: var(--weight-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.org-more {
  padding: var(--space-2) var(--space-4) var(--space-3);
  font-size: var(--text-xs);
}
.org-list li:not(.org-head),
.org-rows li {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.go-org {
  flex: 1;
  min-width: 0;
}
.go-org button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  font: inherit;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.go-org button:hover {
  background: var(--surface);
}
.go-org b,
.go-org small {
  display: block;
}
.go-org small {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.pin {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: var(--space-2);
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.pin:hover {
  background: var(--surface-sunken);
}
.pin[aria-pressed="true"] {
  color: var(--text);
}
.pin[aria-pressed="true"] .ico {
  fill: currentColor;
}

/* App rail: light, a name under every icon. The apps stay at the top and Settings at the bottom of the
   screen while the page scrolls (Tim, 30-11-2026). */
.rail > div {
  position: sticky;
  top: var(--space-2);
}
.rail > div:last-child {
  top: auto;
  bottom: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-2) 5px;
  border-right: 1px solid var(--line);
}
.rail a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 5px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.6875rem;
  line-height: 1.25;
  text-decoration: none;
}
.rail a:hover {
  background: var(--surface-sunken);
}
.rail a[aria-current] {
  background: var(--surface-sunken);
  color: var(--text);
  font-weight: var(--weight-strong);
}
.rail .ico {
  width: 19px;
  height: 19px;
}
.rail em {
  position: absolute;
  top: 3px;
  right: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

/* The menu of one app. */
.side {
  padding: var(--space-3) var(--space-2);
  border-right: 1px solid var(--line);
}
.folded .side {
  display: none;
}
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-1) var(--space-2) var(--space-3);
}
.side h2 {
  font-size: var(--text-base);
}
.side a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
}
.side a:hover {
  background: var(--surface-sunken);
}
.side a[aria-current] {
  background: var(--surface-sunken);
  color: var(--text);
  font-weight: var(--weight-strong);
}
.fold {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.fold:hover {
  background: var(--surface-sunken);
  color: var(--text);
}
.fold .ico {
  width: 16px;
  height: 16px;
}

/* The work itself: left aligned, wide. */
.work {
  position: relative;
  min-width: 0;
  padding: var(--space-6) var(--space-8) var(--space-16);
}
.folded .work {
  padding-left: 48px;
}
.fold-open {
  position: absolute;
  top: var(--space-4);
  left: var(--space-2);
}
.col {
  max-width: 1240px;
}
.rows {
  margin-top: var(--space-6);
  max-width: 920px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  padding: var(--space-3) var(--space-4);
}
.rows li + li {
  border-top: 1px solid var(--line);
}
.org-rows li {
  flex-wrap: nowrap;
  padding: 0;
}
.grow {
  flex: 1;
  min-width: 12rem;
}
.grow b,
.grow small {
  display: block;
}
.grow small {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.mark {
  width: 10px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.works {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--works-line);
  border-radius: var(--radius-md);
  background: var(--works-bg);
  color: var(--works-text);
}
.state.works {
  display: inline-flex;
  margin: 0;
  padding: var(--space-1) var(--space-3);
}
.state.bad .mark {
  border: 0;
  background: var(--dot);
}
.btn.sec {
  text-decoration: none;
}
.empty {
  margin-top: var(--space-6);
  color: var(--text-muted);
}
.todo {
  display: grid;
  gap: var(--space-3);
  max-width: 920px;
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-8);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  list-style: decimal;
}
.todo li b,
.todo li span {
  display: block;
}
.todo li span {
  color: var(--text-muted);
}
.todo code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
}
.todo code.copy {
  user-select: all;
  overflow-wrap: anywhere;
}
.form label small {
  font-weight: var(--weight-regular);
  color: var(--text-muted);
}
.form {
  display: grid;
  gap: var(--space-2);
  max-width: 32rem;
  margin-top: var(--space-6);
}
.form label {
  margin-top: var(--space-3);
  font-weight: var(--weight-strong);
}
.form .inp {
  min-height: 40px;
}
/* A saved secret shows as its masked hint inside the field. */
.form .inp::placeholder {
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.form small,
.stored {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.once {
  max-width: 920px;
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.form code,
.once code {
  font-family: var(--font-mono);
}
.once code {
  display: block;
  margin-top: var(--space-2);
  overflow-wrap: anywhere;
  user-select: all;
}
.off {
  margin-top: var(--space-12);
}
.off summary {
  display: inline;
  list-style: none;
}
.off p {
  max-width: 32rem;
  margin: var(--space-3) 0;
  color: var(--text-muted);
}
.h2 {
  margin-top: var(--space-8);
  font-size: var(--text-base);
}
.sync {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-6);
}
.find {
  display: flex;
  gap: var(--space-2);
  max-width: 32rem;
  margin-top: var(--space-6);
}
.find .inp {
  min-height: 40px;
}
/* Facts: the value is what you read, the label says what it is. */
.facts .grow b {
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--text-muted);
}
.facts .grow small {
  font-size: var(--text-sm);
  color: var(--text);
}
/* These scroll, so an outline outside the element would be cut off. */
.org-list :focus-visible,
.side a:focus-visible,
.rail a:focus-visible {
  outline-offset: -3px;
}

/* Phone: rail at the bottom, the menu as a row above the content. */
@media (max-width: 860px) {
  /* A column, not a grid: the menu row may be absent without moving the rest. */
  body.app,
  body.app.folded {
    display: flex;
    flex-direction: column;
  }
  .work {
    flex: 1;
  }
  .bar {
    padding-right: var(--space-3);
    gap: var(--space-1);
  }
  .brand {
    width: 68px;
  }
  .bar .wm {
    height: 11px;
  }
  .org {
    position: static;
    flex: 1;
    margin-left: 0;
  }
  .org-btn {
    width: 100%;
  }
  .org-list {
    left: var(--space-2);
    right: var(--space-2);
    top: 60px;
    width: auto;
  }
  .who span {
    display: none;
  }
  .who .lnk {
    min-height: 44px;
  }
  /* A menu with one item only repeats the heading. */
  .side:has(li:only-child),
  .folded .side:has(li:only-child) {
    display: none;
  }
  .side,
  .folded .side {
    display: block;
    padding: var(--space-2);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .side-head,
  .fold-open {
    display: none;
  }
  .side ul {
    display: flex;
    gap: var(--space-1);
    overflow-x: auto;
  }
  .side a {
    white-space: nowrap;
    min-height: 44px;
  }
  .work,
  .folded .work {
    padding: var(--space-4) var(--space-4) var(--space-12);
  }
  .rail {
    order: 3;
    position: sticky;
    bottom: 0;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding: var(--space-1);
    border-right: 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .rail div {
    position: static;
    display: flex;
  }
  .rail a {
    width: 76px;
  }
}

/* ---------------------------------------------------------------- capacity (ADR 0013) */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: var(--space-2);
  border-radius: 50%;
  background: var(--dot);
  vertical-align: middle;
}
.tag {
  padding: 0 var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.notice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.notice .dot {
  margin: 0;
}
.legend,
.cap-from {
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.legend {
  margin-top: var(--space-4);
}
.cap-nav {
  display: flex;
  gap: var(--space-4);
  margin: var(--space-3) 0;
  font-size: var(--text-sm);
}
.tbl {
  width: 100%;
  max-width: 920px;
  margin-top: var(--space-4);
  border-collapse: collapse;
  background: var(--surface-raised);
}
.tbl th,
.tbl td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.tbl td {
  text-align: center;
}
.tbl thead th {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.cap-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.cap {
  min-width: calc(26rem + 26 * 2.6rem);
  font-size: var(--text-sm);
}
.cap-row {
  display: grid;
  grid-template-columns: 17rem 4rem 5rem minmax(0, 1fr);
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid var(--line);
}
.cap-row > span {
  padding: 0 var(--space-2);
}
.cap-row .name {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
  white-space: nowrap;
}
.cap-row .name b,
.cap-row .name small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.cap-row .name small {
  color: var(--text-muted);
}
.to-odoo {
  display: inline-flex;
  color: var(--text-muted);
}
.to-odoo .ico {
  width: 14px;
  height: 14px;
}
.to-odoo:hover {
  color: var(--text);
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.num.moved {
  font-weight: var(--weight-strong);
}
.tl {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  align-items: center;
  height: 100%;
  min-height: 32px;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 26) 100%;
}
.tl > * {
  grid-row: 1;
}
.cap-top {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.wk {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}
.wk b {
  color: var(--text);
}
.gbar {
  height: 14px;
  margin: 0 1px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--color-ink-500);
  cursor: pointer;
  touch-action: pan-y;
}
.gbar:hover,
.gbar:focus-visible {
  background: var(--color-ink-950);
}
/* Thin, light stripes: tentative, while the hours stay readable (Tim, 30-11-2026). */
.gbar.tent {
  background: repeating-linear-gradient(135deg, var(--color-paper-200) 0 2px, var(--color-paper-50) 2px 8px);
  border: 1px solid var(--color-paper-300);
}
.gbar.dragging {
  opacity: 0.7;
  cursor: grabbing;
}
.gap {
  height: 0;
  border-top: 1.5px dashed var(--color-ink-500);
}
.cap-sum {
  font-variant-numeric: tabular-nums;
}
.cap-sum > span:first-child {
  font-weight: var(--weight-strong);
}
.cell {
  text-align: center;
  font-size: var(--text-xs);
}
/* Tentative hatched like its bars (Tim, 30-11-2026). */
.cap-sum.tent .tl {
  background: repeating-linear-gradient(135deg, var(--color-paper-200) 0 2px, var(--color-paper-50) 2px 8px);
}
.cell.over {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-sunken);
  font-weight: var(--weight-strong);
}
.cell.hrs {
  width: calc(100% - 4px);
  margin: 0 2px;
  padding: 2px 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--text-xs);
}
.pop {
  width: min(26rem, 92vw);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text);
}
.pop h3 {
  margin: 0 0 var(--space-3);
}
.facts-sm {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
}
.facts-sm dt {
  color: var(--text-muted);
}
.facts-sm dd {
  margin: 0;
}
.pause {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.pause label {
  display: grid;
  gap: var(--space-1);
  font-size: var(--text-sm);
}
.ctx {
  position: fixed;
  inset: auto;
  margin: 0;
  display: none;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text);
}
.ctx:popover-open {
  display: grid;
  gap: var(--space-1);
}
.ctx .lnk {
  padding: var(--space-2);
  text-align: left;
}
.gs-1 {
  grid-column-start: 1;
}
.gs-2 {
  grid-column-start: 2;
}
.gs-3 {
  grid-column-start: 3;
}
.gs-4 {
  grid-column-start: 4;
}
.gs-5 {
  grid-column-start: 5;
}
.gs-6 {
  grid-column-start: 6;
}
.gs-7 {
  grid-column-start: 7;
}
.gs-8 {
  grid-column-start: 8;
}
.gs-9 {
  grid-column-start: 9;
}
.gs-10 {
  grid-column-start: 10;
}
.gs-11 {
  grid-column-start: 11;
}
.gs-12 {
  grid-column-start: 12;
}
.gs-13 {
  grid-column-start: 13;
}
.gs-14 {
  grid-column-start: 14;
}
.gs-15 {
  grid-column-start: 15;
}
.gs-16 {
  grid-column-start: 16;
}
.gs-17 {
  grid-column-start: 17;
}
.gs-18 {
  grid-column-start: 18;
}
.gs-19 {
  grid-column-start: 19;
}
.gs-20 {
  grid-column-start: 20;
}
.gs-21 {
  grid-column-start: 21;
}
.gs-22 {
  grid-column-start: 22;
}
.gs-23 {
  grid-column-start: 23;
}
.gs-24 {
  grid-column-start: 24;
}
.gs-25 {
  grid-column-start: 25;
}
.gs-26 {
  grid-column-start: 26;
}
.gs-27 {
  grid-column-start: 27;
}
.ge-2 {
  grid-column-end: 2;
}
.ge-3 {
  grid-column-end: 3;
}
.ge-4 {
  grid-column-end: 4;
}
.ge-5 {
  grid-column-end: 5;
}
.ge-6 {
  grid-column-end: 6;
}
.ge-7 {
  grid-column-end: 7;
}
.ge-8 {
  grid-column-end: 8;
}
.ge-9 {
  grid-column-end: 9;
}
.ge-10 {
  grid-column-end: 10;
}
.ge-11 {
  grid-column-end: 11;
}
.ge-12 {
  grid-column-end: 12;
}
.ge-13 {
  grid-column-end: 13;
}
.ge-14 {
  grid-column-end: 14;
}
.ge-15 {
  grid-column-end: 15;
}
.ge-16 {
  grid-column-end: 16;
}
.ge-17 {
  grid-column-end: 17;
}
.ge-18 {
  grid-column-end: 18;
}
.ge-19 {
  grid-column-end: 19;
}
.ge-20 {
  grid-column-end: 20;
}
.ge-21 {
  grid-column-end: 21;
}
.ge-22 {
  grid-column-end: 22;
}
.ge-23 {
  grid-column-end: 23;
}
.ge-24 {
  grid-column-end: 24;
}
.ge-25 {
  grid-column-end: 25;
}
.ge-26 {
  grid-column-end: 26;
}
.ge-27 {
  grid-column-end: 27;
}
.ge-28 {
  grid-column-end: 28;
}
.acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.crumb {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.cap-nav .seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.cap-nav .seg a {
  padding: var(--space-1) var(--space-3);
  text-decoration: none;
  color: var(--text-muted);
}
.cap-nav .seg a[aria-current] {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: var(--weight-strong);
}
.tick {
  position: relative;
  z-index: 2;
  justify-self: start;
  align-self: stretch;
  width: 2px;
  margin-left: -1px;
  background: var(--color-ink-950);
  box-shadow: 0 0 0 1px var(--surface-raised);
  cursor: help;
}
.tick::before {
  content: "";
  position: absolute;
  top: 0;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-ink-950);
  box-shadow: 0 0 0 1px var(--surface-raised);
}
.ph.changed {
  font-weight: var(--weight-strong);
  text-decoration: underline;
}
.pop h3 .to-odoo {
  margin-left: var(--space-2);
}
.pop h4 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: var(--text-sm);
}
.people {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.share {
  display: grid;
  grid-template-columns: 1fr 5.5rem auto;
  align-items: center;
  gap: var(--space-2);
}
.share .pc {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.share small,
.rest small {
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.rest {
  display: grid;
  gap: var(--space-1);
  font-size: var(--text-sm);
}
.change {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
}
.plain {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}
.inline {
  display: inline;
}
.pop {
  max-height: 90vh;
  overflow: auto;
}
.cap-sum a {
  white-space: nowrap;
}
.left {
  display: grid;
  grid-template-columns: 1fr 7rem;
  gap: var(--space-2);
}
.left label {
  display: grid;
  gap: var(--space-1);
  font-size: var(--text-sm);
}
@supports (anchor-name: --org) {
  .org-list {
    position-anchor: --org;
    top: calc(anchor(bottom) + 6px);
    left: anchor(left);
  }
}

/* Capacity, 29-11-2026 (Tim): the whole width, a quiet first column, header and first column stay. */
.col:has(.cap-scroll) {
  max-width: none;
}
.cap-scroll {
  overflow: auto;
  max-height: calc(100vh - 250px);
  min-height: 320px;
}
.cap {
  min-width: calc(23rem + 26 * 2.6rem);
}
.cap-row {
  grid-template-columns: 15rem 3rem 5rem minmax(0, 1fr);
  min-height: 26px;
}
.cap-row > span:nth-child(-n + 3) {
  position: sticky;
  z-index: 1;
  align-self: stretch;
  display: flex;
  align-items: center;
  background: var(--surface-raised);
  font-size: var(--text-xs);
}
.cap-row > span:nth-child(1) {
  left: 0;
}
.cap-row > span:nth-child(2) {
  left: 15rem;
  justify-content: flex-end;
}
.cap-row > span:nth-child(3) {
  left: 18rem;
  justify-content: flex-end;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.cap-row .name {
  gap: var(--space-1);
  font-weight: var(--weight-regular);
}
.cap-row .pname {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cap-sum > span:first-child {
  font-weight: var(--weight-strong);
}
.cap-top {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-raised);
}
.cap-top > span:nth-child(-n + 3) {
  z-index: 4;
}
.tl {
  min-height: 26px;
}
.tip {
  position: fixed;
  z-index: 50;
  max-width: 22rem;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text);
  font-size: var(--text-xs);
  line-height: 1.45;
  white-space: pre-line;
  box-shadow: 0 8px 24px rgb(24 38 127 / 0.16);
  pointer-events: none;
}
.tip::first-line {
  font-weight: var(--weight-strong);
}
.cell.hrs.saving {
  opacity: 0.6;
}

/* The project popup, compact (design review 29-11-2026): one popup, two columns, next to the cell. */
.pop.pp {
  width: min(46rem, 96vw);
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-color: var(--line-strong);
}
.pop.pp.one {
  width: min(24rem, 96vw);
}
.pop.pp.placed {
  position: fixed;
  inset: auto;
  margin: 0;
}
.pp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.pp-head h3 {
  margin: 0;
  font-size: var(--text-base);
}
.pp .x {
  padding: 0 var(--space-1);
  font: inherit;
  font-size: var(--text-lg);
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.pp-facts {
  margin: var(--space-1) 0 var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.pp-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: start;
}
.pp.one .pp-cols {
  grid-template-columns: 1fr;
}
.pp-right {
  display: grid;
  gap: var(--space-3);
}
.blk h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
}
.blk form {
  display: grid;
  gap: var(--space-2);
}
/* "Remove" stays on the line of what it removes. */
.blk form.inline {
  display: inline;
}
.pp .line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  font-size: var(--text-sm);
}
.pp .line label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.pp .wk,
.pp .total,
.pp .hw {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.pp .only {
  font-size: var(--text-xs);
}
.inp.sm {
  width: auto;
  min-height: 32px;
  padding: 0 var(--space-2);
  font-size: var(--text-sm);
}
.inp.sm.num-in {
  width: 5rem;
}
.pp .shares {
  display: grid;
  gap: var(--space-1);
}
.pp .share {
  grid-template-columns: minmax(0, 1fr) 5rem 5.5rem;
}
.pp .share select {
  width: 100%;
}
.pp .share .pc input {
  width: 3.5rem;
}
.btn.sm {
  min-height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pp .acts {
  align-items: center;
  margin: 0;
}
.pp .hist {
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.pp .hist li + li {
  margin-top: var(--space-1);
}
.pp .hist .lnk {
  font-size: inherit;
}
.pp [hidden] {
  display: none !important;
}
/* Fixed column widths (Tim, 29-11-2026): a wider screen shows more weeks, not wider ones. */
.cap {
  min-width: 0;
  width: max-content;
}
.cap-row {
  grid-template-columns: 15rem 3rem 5rem max-content;
}
.cap.z-weeks .tl {
  grid-template-columns: repeat(156, 2.4rem);
  background-size: 2.4rem 100%;
}
.cap.z-months .tl {
  grid-template-columns: repeat(36, 4.5rem);
  background-size: 4.5rem 100%;
}
.cap.z-years .tl {
  grid-template-columns: repeat(16, 6rem);
  background-size: 6rem 100%;
}
.cap-nav .seg + .seg {
  margin-left: var(--space-2);
}
.cap-row .name a.pname {
  color: inherit;
  text-decoration: none;
}
.cap-row .name a.pname:hover {
  text-decoration: underline;
}
.cap-row .name .dot {
  flex: none;
  margin: 0 0 0 var(--space-1);
}
.pp-head h3 a.pname {
  color: inherit;
}
.gs-28 {
  grid-column-start: 28;
}
.gs-29 {
  grid-column-start: 29;
}
.gs-30 {
  grid-column-start: 30;
}
.gs-31 {
  grid-column-start: 31;
}
.gs-32 {
  grid-column-start: 32;
}
.gs-33 {
  grid-column-start: 33;
}
.gs-34 {
  grid-column-start: 34;
}
.gs-35 {
  grid-column-start: 35;
}
.gs-36 {
  grid-column-start: 36;
}
.gs-37 {
  grid-column-start: 37;
}
.gs-38 {
  grid-column-start: 38;
}
.gs-39 {
  grid-column-start: 39;
}
.gs-40 {
  grid-column-start: 40;
}
.gs-41 {
  grid-column-start: 41;
}
.gs-42 {
  grid-column-start: 42;
}
.gs-43 {
  grid-column-start: 43;
}
.gs-44 {
  grid-column-start: 44;
}
.gs-45 {
  grid-column-start: 45;
}
.gs-46 {
  grid-column-start: 46;
}
.gs-47 {
  grid-column-start: 47;
}
.gs-48 {
  grid-column-start: 48;
}
.gs-49 {
  grid-column-start: 49;
}
.gs-50 {
  grid-column-start: 50;
}
.gs-51 {
  grid-column-start: 51;
}
.gs-52 {
  grid-column-start: 52;
}
.gs-53 {
  grid-column-start: 53;
}
.ge-29 {
  grid-column-end: 29;
}
.ge-30 {
  grid-column-end: 30;
}
.ge-31 {
  grid-column-end: 31;
}
.ge-32 {
  grid-column-end: 32;
}
.ge-33 {
  grid-column-end: 33;
}
.ge-34 {
  grid-column-end: 34;
}
.ge-35 {
  grid-column-end: 35;
}
.ge-36 {
  grid-column-end: 36;
}
.ge-37 {
  grid-column-end: 37;
}
.ge-38 {
  grid-column-end: 38;
}
.ge-39 {
  grid-column-end: 39;
}
.ge-40 {
  grid-column-end: 40;
}
.ge-41 {
  grid-column-end: 41;
}
.ge-42 {
  grid-column-end: 42;
}
.ge-43 {
  grid-column-end: 43;
}
.ge-44 {
  grid-column-end: 44;
}
.ge-45 {
  grid-column-end: 45;
}
.ge-46 {
  grid-column-end: 46;
}
.ge-47 {
  grid-column-end: 47;
}
.ge-48 {
  grid-column-end: 48;
}
.ge-49 {
  grid-column-end: 49;
}
.ge-50 {
  grid-column-end: 50;
}
.ge-51 {
  grid-column-end: 51;
}
.ge-52 {
  grid-column-end: 52;
}
.ge-53 {
  grid-column-end: 53;
}
.ge-54 {
  grid-column-end: 54;
}
.cap-group {
  min-height: 24px;
  background: var(--surface-sunken);
}
.cap-row.cap-group > span:nth-child(-n + 3) {
  background: var(--surface-sunken);
}
.cap-group > span:first-child {
  font-weight: var(--weight-strong);
}
.cap-nav {
  align-items: center;
  flex-wrap: wrap;
}
.cap-nav .filter select {
  max-width: 14rem;
}
.cap-nav .filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.cap-nav .active-after {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
}
.cap-note {
  margin: var(--space-1) 0 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
/* A year back and ahead, scrolled sideways without bars (Tim, 29-11-2026). */
.cap-scroll {
  scrollbar-width: none;
  cursor: grab;
}
.cap-scroll::-webkit-scrollbar {
  display: none;
}
.cap-scroll.panning {
  cursor: grabbing;
  user-select: none;
}
.cap-scroll .gbar,
.cap-scroll a,
.cap-scroll input,
.cap-scroll button {
  cursor: pointer;
}
.cap-scroll input.hrs {
  cursor: text;
}
.gs-54 {
  grid-column-start: 54;
}
.gs-55 {
  grid-column-start: 55;
}
.gs-56 {
  grid-column-start: 56;
}
.gs-57 {
  grid-column-start: 57;
}
.gs-58 {
  grid-column-start: 58;
}
.gs-59 {
  grid-column-start: 59;
}
.gs-60 {
  grid-column-start: 60;
}
.gs-61 {
  grid-column-start: 61;
}
.gs-62 {
  grid-column-start: 62;
}
.gs-63 {
  grid-column-start: 63;
}
.gs-64 {
  grid-column-start: 64;
}
.gs-65 {
  grid-column-start: 65;
}
.gs-66 {
  grid-column-start: 66;
}
.gs-67 {
  grid-column-start: 67;
}
.gs-68 {
  grid-column-start: 68;
}
.gs-69 {
  grid-column-start: 69;
}
.gs-70 {
  grid-column-start: 70;
}
.gs-71 {
  grid-column-start: 71;
}
.gs-72 {
  grid-column-start: 72;
}
.gs-73 {
  grid-column-start: 73;
}
.gs-74 {
  grid-column-start: 74;
}
.gs-75 {
  grid-column-start: 75;
}
.gs-76 {
  grid-column-start: 76;
}
.gs-77 {
  grid-column-start: 77;
}
.gs-78 {
  grid-column-start: 78;
}
.gs-79 {
  grid-column-start: 79;
}
.gs-80 {
  grid-column-start: 80;
}
.gs-81 {
  grid-column-start: 81;
}
.gs-82 {
  grid-column-start: 82;
}
.gs-83 {
  grid-column-start: 83;
}
.gs-84 {
  grid-column-start: 84;
}
.gs-85 {
  grid-column-start: 85;
}
.gs-86 {
  grid-column-start: 86;
}
.gs-87 {
  grid-column-start: 87;
}
.gs-88 {
  grid-column-start: 88;
}
.gs-89 {
  grid-column-start: 89;
}
.gs-90 {
  grid-column-start: 90;
}
.gs-91 {
  grid-column-start: 91;
}
.gs-92 {
  grid-column-start: 92;
}
.gs-93 {
  grid-column-start: 93;
}
.gs-94 {
  grid-column-start: 94;
}
.gs-95 {
  grid-column-start: 95;
}
.gs-96 {
  grid-column-start: 96;
}
.gs-97 {
  grid-column-start: 97;
}
.gs-98 {
  grid-column-start: 98;
}
.gs-99 {
  grid-column-start: 99;
}
.gs-100 {
  grid-column-start: 100;
}
.gs-101 {
  grid-column-start: 101;
}
.gs-102 {
  grid-column-start: 102;
}
.gs-103 {
  grid-column-start: 103;
}
.gs-104 {
  grid-column-start: 104;
}
.gs-105 {
  grid-column-start: 105;
}
.ge-55 {
  grid-column-end: 55;
}
.ge-56 {
  grid-column-end: 56;
}
.ge-57 {
  grid-column-end: 57;
}
.ge-58 {
  grid-column-end: 58;
}
.ge-59 {
  grid-column-end: 59;
}
.ge-60 {
  grid-column-end: 60;
}
.ge-61 {
  grid-column-end: 61;
}
.ge-62 {
  grid-column-end: 62;
}
.ge-63 {
  grid-column-end: 63;
}
.ge-64 {
  grid-column-end: 64;
}
.ge-65 {
  grid-column-end: 65;
}
.ge-66 {
  grid-column-end: 66;
}
.ge-67 {
  grid-column-end: 67;
}
.ge-68 {
  grid-column-end: 68;
}
.ge-69 {
  grid-column-end: 69;
}
.ge-70 {
  grid-column-end: 70;
}
.ge-71 {
  grid-column-end: 71;
}
.ge-72 {
  grid-column-end: 72;
}
.ge-73 {
  grid-column-end: 73;
}
.ge-74 {
  grid-column-end: 74;
}
.ge-75 {
  grid-column-end: 75;
}
.ge-76 {
  grid-column-end: 76;
}
.ge-77 {
  grid-column-end: 77;
}
.ge-78 {
  grid-column-end: 78;
}
.ge-79 {
  grid-column-end: 79;
}
.ge-80 {
  grid-column-end: 80;
}
.ge-81 {
  grid-column-end: 81;
}
.ge-82 {
  grid-column-end: 82;
}
.ge-83 {
  grid-column-end: 83;
}
.ge-84 {
  grid-column-end: 84;
}
.ge-85 {
  grid-column-end: 85;
}
.ge-86 {
  grid-column-end: 86;
}
.ge-87 {
  grid-column-end: 87;
}
.ge-88 {
  grid-column-end: 88;
}
.ge-89 {
  grid-column-end: 89;
}
.ge-90 {
  grid-column-end: 90;
}
.ge-91 {
  grid-column-end: 91;
}
.ge-92 {
  grid-column-end: 92;
}
.ge-93 {
  grid-column-end: 93;
}
.ge-94 {
  grid-column-end: 94;
}
.ge-95 {
  grid-column-end: 95;
}
.ge-96 {
  grid-column-end: 96;
}
.ge-97 {
  grid-column-end: 97;
}
.ge-98 {
  grid-column-end: 98;
}
.ge-99 {
  grid-column-end: 99;
}
.ge-100 {
  grid-column-end: 100;
}
.ge-101 {
  grid-column-end: 101;
}
.ge-102 {
  grid-column-end: 102;
}
.ge-103 {
  grid-column-end: 103;
}
.ge-104 {
  grid-column-end: 104;
}
.ge-105 {
  grid-column-end: 105;
}
.ge-106 {
  grid-column-end: 106;
}
/* One header line (Tim, 29-11-2026). */
.cap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-6);
}
.cap-head .t1 {
  margin: 0;
}
.cap-answer {
  margin: 0;
  font-size: var(--text-sm);
}
.cap-head .cap-from {
  margin: 0 0 0 auto;
}
.cap-scroll + .legend {
  margin-top: var(--space-2);
}
.gbar.saving {
  opacity: 0.5;
}
/* Hours in each cell of a bar (Tim, 29-11-2026). */
.cap.show-hours .gbar {
  height: 16px;
}
.ph {
  z-index: 1;
  align-self: center;
  justify-self: center;
  font-size: 10px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--color-paper-50);
  pointer-events: none;
}
.ph.tent {
  color: var(--color-ink-950);
}
/* The fixed left column lies above everything that scrolls under it. */
.cap-row > span:nth-child(-n + 3) {
  z-index: 3;
}
.cap-top {
  z-index: 5;
}
.cap-top > span:nth-child(-n + 3) {
  z-index: 6;
}
/* Today: a soft line behind the bars and numbers (Tim, 30-11-2026). The one place besides the dot
   where red-orange is used, faint, so it marks "now" without asking for attention. */
.cap {
  position: relative;
  z-index: 0;
}
.now {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: -1;
  width: 0;
  border-left: 3px solid rgb(250 70 22 / 0.5);
  pointer-events: none;
}
/* Over the grey group rows the line shows: the nearest place without content (Tim, 30-11-2026). */
/* Only the timeline part sits under the line; the name, hours and end cells stay on top, like every row. */
.cap-group {
  background: none;
}
.cap-group > .tl {
  position: relative;
  z-index: -2;
  background: var(--surface-sunken);
}
/* "Today" at the top of the line, in the column heading. */
.cap-top .wk {
  position: relative;
}
.now-mark {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  margin-left: -5px;
  border-top: 7px solid rgb(250 70 22 / 0.8);
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}

/* More hours set by hand than the project has left: said in words, no colour bar. */
.pp .note {
  margin: var(--space-1) 0;
  font-size: var(--text-xs);
}

/* Connect: one flow (what goes where, and a try). */
.meta {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.draft {
  padding: 0 var(--space-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--text);
}
.try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-6);
}
.try small {
  color: var(--text-muted);
}
.result {
  max-width: 920px;
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.result .h2 {
  margin-top: 0;
}
.result p + p,
.result details {
  margin-top: var(--space-2);
}
.h3 {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}
.causes {
  margin-top: var(--space-1);
  padding-left: var(--space-6);
  list-style: disc;
}
.scroll {
  max-width: 920px;
  margin-top: var(--space-4);
  overflow-x: auto;
}
.result .scroll {
  margin-top: var(--space-4);
}
.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.grid caption {
  padding-bottom: var(--space-2);
  color: var(--text-muted);
  text-align: left;
}
.grid th,
.grid td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.grid th {
  font-weight: var(--weight-strong);
}
.lead code,
.grid code,
.result pre {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.result pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- available hours (Tim, 30-11-2026) */
/* The sums read top to bottom: available, confirmed, free, tentative. */
.cap-sum.lead {
  border-top: 2px solid var(--line);
}
.cap-sum.soft > span:first-child {
  font-weight: var(--weight-regular);
  color: var(--text-muted);
}
.cell.fixable {
  font: inherit;
  font-size: var(--text-xs);
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  align-self: stretch;
}
.cell.fixable:hover,
.cell.fixable:focus-visible {
  background: var(--surface-sunken);
}
/* Corrected by hand: a small corner, the reason is in the popup. */
.cell.corrected {
  position: relative;
}
.cell.corrected::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  /* Small and soft: a hint, not a signal (Tim, 30-11-2026). */
  border-top: 5px solid var(--color-paper-300);
  border-left: 5px solid transparent;
}
.pop.correct {
  width: min(26rem, 92vw);
}
.pop.correct .stack {
  display: grid;
  gap: var(--space-2);
}
.pop.correct .line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.pop.correct .line > span:first-child {
  min-width: 8.5rem;
}
.pop.correct .note {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.corrections {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
}
.corrections li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}
.corrections small {
  display: block;
  color: var(--text-muted);
}
fieldset.checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-3);
}
fieldset.checks legend {
  font-weight: var(--weight-strong);
  margin-bottom: var(--space-2);
}

/* View choices under the table (Tim, 30-11-2026): the toolbar keeps what changes the selection. */
.cap-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
}

/* A stage heading folds its projects in and out (Tim, 30-11-2026). */
.cap-group .stage-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.cap-group .stage-toggle:hover {
  text-decoration: underline;
}
.cap-group.folded .cell {
  font-weight: var(--weight-strong);
}

/* Week columns 106 to 157 (two years ahead, 30-11-2026). */
.gs-106 {
  grid-column-start: 106;
}
.gs-107 {
  grid-column-start: 107;
}
.gs-108 {
  grid-column-start: 108;
}
.gs-109 {
  grid-column-start: 109;
}
.gs-110 {
  grid-column-start: 110;
}
.gs-111 {
  grid-column-start: 111;
}
.gs-112 {
  grid-column-start: 112;
}
.gs-113 {
  grid-column-start: 113;
}
.gs-114 {
  grid-column-start: 114;
}
.gs-115 {
  grid-column-start: 115;
}
.gs-116 {
  grid-column-start: 116;
}
.gs-117 {
  grid-column-start: 117;
}
.gs-118 {
  grid-column-start: 118;
}
.gs-119 {
  grid-column-start: 119;
}
.gs-120 {
  grid-column-start: 120;
}
.gs-121 {
  grid-column-start: 121;
}
.gs-122 {
  grid-column-start: 122;
}
.gs-123 {
  grid-column-start: 123;
}
.gs-124 {
  grid-column-start: 124;
}
.gs-125 {
  grid-column-start: 125;
}
.gs-126 {
  grid-column-start: 126;
}
.gs-127 {
  grid-column-start: 127;
}
.gs-128 {
  grid-column-start: 128;
}
.gs-129 {
  grid-column-start: 129;
}
.gs-130 {
  grid-column-start: 130;
}
.gs-131 {
  grid-column-start: 131;
}
.gs-132 {
  grid-column-start: 132;
}
.gs-133 {
  grid-column-start: 133;
}
.gs-134 {
  grid-column-start: 134;
}
.gs-135 {
  grid-column-start: 135;
}
.gs-136 {
  grid-column-start: 136;
}
.gs-137 {
  grid-column-start: 137;
}
.gs-138 {
  grid-column-start: 138;
}
.gs-139 {
  grid-column-start: 139;
}
.gs-140 {
  grid-column-start: 140;
}
.gs-141 {
  grid-column-start: 141;
}
.gs-142 {
  grid-column-start: 142;
}
.gs-143 {
  grid-column-start: 143;
}
.gs-144 {
  grid-column-start: 144;
}
.gs-145 {
  grid-column-start: 145;
}
.gs-146 {
  grid-column-start: 146;
}
.gs-147 {
  grid-column-start: 147;
}
.gs-148 {
  grid-column-start: 148;
}
.gs-149 {
  grid-column-start: 149;
}
.gs-150 {
  grid-column-start: 150;
}
.gs-151 {
  grid-column-start: 151;
}
.gs-152 {
  grid-column-start: 152;
}
.gs-153 {
  grid-column-start: 153;
}
.gs-154 {
  grid-column-start: 154;
}
.gs-155 {
  grid-column-start: 155;
}
.gs-156 {
  grid-column-start: 156;
}
.gs-157 {
  grid-column-start: 157;
}
.ge-107 {
  grid-column-end: 107;
}
.ge-108 {
  grid-column-end: 108;
}
.ge-109 {
  grid-column-end: 109;
}
.ge-110 {
  grid-column-end: 110;
}
.ge-111 {
  grid-column-end: 111;
}
.ge-112 {
  grid-column-end: 112;
}
.ge-113 {
  grid-column-end: 113;
}
.ge-114 {
  grid-column-end: 114;
}
.ge-115 {
  grid-column-end: 115;
}
.ge-116 {
  grid-column-end: 116;
}
.ge-117 {
  grid-column-end: 117;
}
.ge-118 {
  grid-column-end: 118;
}
.ge-119 {
  grid-column-end: 119;
}
.ge-120 {
  grid-column-end: 120;
}
.ge-121 {
  grid-column-end: 121;
}
.ge-122 {
  grid-column-end: 122;
}
.ge-123 {
  grid-column-end: 123;
}
.ge-124 {
  grid-column-end: 124;
}
.ge-125 {
  grid-column-end: 125;
}
.ge-126 {
  grid-column-end: 126;
}
.ge-127 {
  grid-column-end: 127;
}
.ge-128 {
  grid-column-end: 128;
}
.ge-129 {
  grid-column-end: 129;
}
.ge-130 {
  grid-column-end: 130;
}
.ge-131 {
  grid-column-end: 131;
}
.ge-132 {
  grid-column-end: 132;
}
.ge-133 {
  grid-column-end: 133;
}
.ge-134 {
  grid-column-end: 134;
}
.ge-135 {
  grid-column-end: 135;
}
.ge-136 {
  grid-column-end: 136;
}
.ge-137 {
  grid-column-end: 137;
}
.ge-138 {
  grid-column-end: 138;
}
.ge-139 {
  grid-column-end: 139;
}
.ge-140 {
  grid-column-end: 140;
}
.ge-141 {
  grid-column-end: 141;
}
.ge-142 {
  grid-column-end: 142;
}
.ge-143 {
  grid-column-end: 143;
}
.ge-144 {
  grid-column-end: 144;
}
.ge-145 {
  grid-column-end: 145;
}
.ge-146 {
  grid-column-end: 146;
}
.ge-147 {
  grid-column-end: 147;
}
.ge-148 {
  grid-column-end: 148;
}
.ge-149 {
  grid-column-end: 149;
}
.ge-150 {
  grid-column-end: 150;
}
.ge-151 {
  grid-column-end: 151;
}
.ge-152 {
  grid-column-end: 152;
}
.ge-153 {
  grid-column-end: 153;
}
.ge-154 {
  grid-column-end: 154;
}
.ge-155 {
  grid-column-end: 155;
}
.ge-156 {
  grid-column-end: 156;
}
.ge-157 {
  grid-column-end: 157;
}
.ge-158 {
  grid-column-end: 158;
}

/* Planned hires (Tim, 30-11-2026): their own row; muted while not counted. */
.cap-sum.hires-off .tl {
  color: var(--text-muted);
}
.cap-sum.hires .count {
  font-size: var(--text-xs);
  white-space: nowrap;
}
.corrections .acts {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-top: 0;
}

/* Ramp-up plans (Tim, 30-11-2026): a month per column, narrow. */
/* Compact: twelve months fit next to the name without scrolling (Tim, 30-11-2026). */
.tbl.ramp {
  width: auto;
}
.tbl.ramp th,
.tbl.ramp td {
  padding: 3px 2px;
}
.tbl.ramp thead th {
  padding-left: 6px;
}
.tbl.ramp .inp.sm {
  min-height: 28px;
  padding: 0 6px;
}
.tbl.ramp .inp.sm.num-in {
  width: 3rem;
}
.tbl.ramp th .inp.sm {
  width: 9rem;
}

/* Settings › Capacity: a label, its field and its unit on one line (Tim, 30-11-2026). */
.setting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.setting label {
  min-width: 15rem;
}
.setting .note {
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.tbl.billable {
  width: auto;
}
.tbl.billable td {
  white-space: nowrap;
  text-align: left;
}

/* A tentative stage's heading: hatched like its bars and the Tentative projects row (Tim, 30-11-2026). */
.cap-group.tent-stage > .tl {
  background: repeating-linear-gradient(135deg, var(--color-paper-200) 0 2px, var(--color-paper-50) 2px 8px);
}
