/* © 2026 TerraNovita BV. All rights reserved. See /LICENSE.txt. */
/* The guide: Agentic Trunk-Based Development, inside the track, and its office. Its panels follow the
   Guides panel and show only while ?guide=atbd opens it; its own menu runs along the top, and the line
   runs through its office. The home page loads this file after site.css, so its rules take precedence
   over the site's where they meet, as they did at that file's end. Like site.css it reads only
   the design system's tokens; the office's state marks are its state tokens. */

/* The properties the office's script sets, at their value until it does, so nothing here reads a
   property no file declares: the same values as the fallbacks beside each use. --x and --y are
   the career graph's too, so site.css declares them as well; --spot is the colour site.css gives each
   card in a row of spot cards. */
:root {
  --history: 0px; --progress: 0%; --left: 100%; --row: 0;
  --plan-w: auto; --plan-h: auto; --w: auto; --h: auto; --x: 0; --y: 0; --spot: currentColor;
}

/* The automatic mode's toggle: filled while the office runs on its own. */
.office-auto[aria-pressed="true"] { background: var(--color-action); border-color: var(--color-action); color: var(--color-on-action); }

/* The guide's simulation, its third panel: a heading, then the office. The office never draws narrower
   than the career graph's floor, so the panel grows to hold it, as the career panel does. */

#simulation { flex: 0 0 auto; min-width: 100%; }
#simulation .panel-inner { padding-top: var(--space-40); padding-bottom: var(--space-24); }
#simulation h2 { margin-bottom: var(--space-16); }
.guide-title { font: var(--type-h2); color: var(--color-ink-strong); margin-bottom: 0; }
/* Inside the home page, the office's panel leaves room at its top for the guide's menu, and at its
   foot for the band where main runs on to the next panel, so the office sits a little tighter. */
#simulation[data-guide] .panel-inner { padding-top: calc(var(--space-60) + var(--space-16)); padding-bottom: 0; }
#simulation[data-guide] .room { min-height: calc(var(--space-120) * 1.5); }
#simulation[data-guide] .office-top { min-height: var(--size-target); margin-bottom: var(--space-16); }
/* trunk grows to the left as commits land: the panel lays out --history of room before the office's
   own column, which keeps the title, the hint, the controls and the rooms beside trunk's end. The
   panel grows to hold it, as the career panel grows to hold its graph. */
#simulation[data-guide] { min-width: calc(100% + var(--history, 0px)); }
#simulation[data-guide] .panel-inner {
  max-width: none; width: calc(var(--layout-max-width) + var(--history, 0px));
  display: grid; grid-template-columns: var(--history, 0px) minmax(0, 1fr);
}
#simulation[data-guide] .panel-inner > * { grid-column: 2; }
#simulation[data-guide] .office-lines { overflow: visible; }
/* trunk runs low in its band, leaving three lanes above it for the agents' branches and, above those,
   room for the run modes' names, so no branch runs under a room or through a name. Under trunk, the
   run-mode switch and the tally share one row, clear of trunk's name under its end. */
#simulation[data-guide] .office-main { height: calc(var(--space-120) + var(--space-8)); margin-top: var(--space-24); }
#simulation[data-guide] .office-tally { justify-content: flex-start; }
.office-run {
  display: flex; align-items: center; gap: var(--space-24); margin-top: var(--space-24);
  padding-right: calc(var(--space-80) + var(--space-16));
}
/* The tally stands in two columns, two rows, so the row stays one control high. */
.office-run .office-tally {
  display: grid; grid-template-columns: repeat(2, max-content); grid-auto-rows: var(--space-20); align-items: center;
  gap: var(--space-4) var(--space-24); margin-top: 0;
}
.office-run .office-tally span { white-space: nowrap; }
/* trunk holds its place above main: the rooms keep one height whatever they hold, and a story keeps
   to one line, its name shortened if it must, so trunk never moves as work opens and closes. */
#simulation[data-guide] .office-floor { grid-auto-rows: calc(var(--space-120) * 1.75); }
#simulation[data-guide] .room { min-height: 0; overflow: hidden; }
#simulation[data-guide] .task { flex-wrap: nowrap; }
#simulation[data-guide] .task-name { min-width: 0; }
#simulation[data-guide] .task-name code { overflow: hidden; text-overflow: ellipsis; }
#simulation[data-guide] .task-meta { flex: none; }
/* The desks room stacks three lanes, each a row: who works and whose keys the work runs on at the
   left, the story in hand at the right. The room is wider for it. */
#simulation[data-guide] .office-floor {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.5fr) minmax(0, 1.4fr) minmax(0, 1.45fr) minmax(0, 1fr);
}
#simulation[data-guide] .room { padding: var(--space-8); }
#simulation[data-guide] .task { padding: var(--space-4) var(--space-8); }
#simulation[data-guide] .desks { grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); gap: var(--space-4); }
#simulation[data-guide] .desk { flex-direction: row; align-items: center; gap: var(--space-8); padding: var(--space-4) var(--space-8); min-height: 0; }
#simulation[data-guide] .desk-who { flex: none; width: calc(var(--space-120) + var(--space-60) + var(--space-4)); }
#simulation[data-guide] .desk-icons .icon-lg { width: var(--size-icon-sm); height: var(--size-icon-sm); }
#simulation[data-guide] .desk-icons .icon-lg + .icon-lg { margin-left: calc(var(--space-4) * -1); }
#simulation[data-guide] .desk .room-slots { flex: 1; min-width: 0; }
#simulation[data-guide] .desk .task { min-height: var(--slot-height); }
/* The run modes: a switch laid out as the site's branch switch, its look the shared library's, the aim
   marked, and the risk this guide leaves aside one press away beside it. A lane or room the mode does
   not use greys out and takes no story. */
.office-modes { flex: none; display: flex; align-items: center; gap: var(--space-12); }
.office-modes-label {
  display: inline-flex; align-items: center; gap: var(--space-4); min-height: var(--size-target); padding: 0;
  border: 0; background: none; cursor: pointer; font: var(--type-caption); font-family: var(--font-mono); color: var(--color-ink-muted);
}
.office-modes-label:hover, .office-modes-label[aria-expanded="true"] { color: var(--color-ink-strong); }
.office-modes-label .icon { width: var(--size-icon-sm); height: var(--size-icon-sm); }
.aim-tag { padding: 0 var(--space-8); border-radius: var(--radius-pill); border: var(--border-width) dashed currentColor; font: var(--type-caption); }
.office-modes-more { position: relative; flex: none; }
.office-modes-note {
  position: absolute; left: 0; bottom: calc(100% + var(--space-8)); z-index: 3; width: calc(var(--layout-measure) * 0.6);
  padding: var(--space-8) var(--space-12); border-radius: var(--radius); border: var(--border-width) solid var(--color-border-strong);
  background: var(--color-surface-raised); font: var(--type-caption); color: var(--color-ink-strong);
}
.is-off { opacity: 0.4; }
.desk-icons { position: relative; display: inline-flex; flex: none; }
.desk-text { display: grid; min-width: 0; line-height: 1.3; }
.desk-name { white-space: nowrap; }
/* Under sponsored, the developer with AI is struck through: AI works only as sponsored agents. */
.desk.is-struck .desk-name { text-decoration: line-through; }
.desk-note { font-weight: 400; color: var(--color-ink-muted); white-space: nowrap; }
/* Its story in the set-aside room: struck through, then fading off the shelf. */
.task.is-dropped code { text-decoration: line-through; text-decoration-thickness: var(--border-width-strong); color: var(--color-ink-muted); }
.task.is-dropped { cursor: default; transition: opacity var(--leave-time) var(--easing-standard); }
.task.is-leaving { opacity: 0; }

/* trunk's name, laid out as the career graph's branch names: a pill in code type under the line's
   end, hung from it by a dotted stem, filled as the active line's name is. */
.trunk-name {
  position: absolute; z-index: 1; transform: translate(-100%, 55%); pointer-events: none;
  display: inline-flex; align-items: center; min-height: var(--size-target); padding: 0 var(--space-16);
  border-radius: var(--radius-pill); font: var(--type-code);
  color: var(--color-on-action); background: var(--color-action); border: var(--border-width-strong) solid var(--color-action);
}
.trunk-name::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + var(--border-width-strong));
  width: var(--border-width-strong); height: calc(var(--size-target) * 0.55); margin-left: calc(var(--border-width-strong) / -2);
  background: repeating-linear-gradient(to bottom, var(--color-line-quiet) 0 var(--border-width-strong), transparent var(--border-width-strong) var(--space-8));
}

/* A commit's name, shown above it while the pointer rests on it or it has focus: a ref-like label.
   trunk's own band lets the pointer through to the commits, except while it takes a dropped story. The
   commits themselves are drawn as the shared library's. */
.office-main { pointer-events: none; }
.office-main.is-target { pointer-events: auto; }
.commit-tip {
  position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - var(--space-16))); pointer-events: none;
  white-space: nowrap; padding: var(--space-4) var(--space-12); border-radius: var(--radius-pill);
  background: var(--color-surface-raised); border: var(--border-width) solid var(--color-border-strong); box-shadow: var(--shadow-subtle);
  font: var(--type-caption); color: var(--color-ink-strong);
}
.commit-tip code { font-family: var(--font-mono); }

/* The guide's own menu: a row along the top of the track, over the panels' top padding, while one of
   the guide's panels is current. Items in the menu's own type, joined by a thin line; the joins up to
   the current item take the line's colour, so the row shows where the visitor is, and the current item
   is underlined as in the main menu. */
.guide-nav {
  position: absolute; top: var(--space-12); left: 50%; z-index: var(--z-header); transform: translateX(-50%);
  width: calc(min(var(--layout-max-width), 100%) - (var(--layout-gutter) + var(--size-target)) * 2);
  display: flex; align-items: center; gap: var(--space-12);
  padding: 0 var(--space-24); border-radius: var(--radius-pill);
  background: var(--color-surface-header); backdrop-filter: blur(var(--blur-header));
  border: var(--border-width) solid var(--color-border-subtle); box-shadow: var(--shadow-subtle);
}
.guide-nav a {
  position: relative; flex: none; display: inline-flex; align-items: center; min-height: var(--size-target);
  white-space: nowrap; font: var(--type-ui); color: var(--color-ink); text-decoration: none;
}
.guide-nav a::after { bottom: var(--space-8); }
.guide-nav a:hover::after, .guide-nav a[aria-current="true"]::after { width: 100%; }
.guide-nav a[aria-current="true"] { color: var(--color-link); }
.guide-nav-join {
  flex: 1 1 var(--space-24); min-width: var(--space-12); height: var(--border-width-strong);
  border-radius: var(--radius-pill); background: var(--color-border-strong);
  transition: background-color var(--duration-base) var(--easing-standard);
}
.guide-nav-join.is-passed { background: var(--color-line-active); }
/* The row's two ends: home first, close last, each a full tap target, standing apart from the joined
   sections so the joins keep meaning "the next section". */
.guide-nav-icon {
  position: relative; flex: none; display: inline-grid; place-items: center; width: var(--size-target); height: var(--size-target);
  padding: 0; border: 0; border-radius: var(--radius-pill); background: none; color: var(--color-ink); cursor: pointer;
}
.guide-nav-icon:hover { color: var(--color-link); }
/* On hover the circle and the underline keep close to the icon, inside the full tap target. */
.guide-nav-icon::before {
  content: ""; position: absolute; inset: var(--space-4); z-index: -1; border-radius: var(--radius-pill);
  transition: background-color var(--duration-base) var(--easing-standard);
}
.guide-nav-icon:hover::before { background: var(--color-surface-subtle); }
.guide-nav a.guide-nav-icon { justify-content: center; }
.guide-nav a.guide-nav-icon::after { left: 50%; translate: -50% 0; }
.guide-nav a.guide-nav-icon:hover::after { width: var(--size-icon); }
.guide-nav-icon:first-child { margin: 0 var(--space-8) 0 calc(var(--space-12) * -1); }
.guide-nav-icon:last-child { margin: 0 calc(var(--space-12) * -1) 0 var(--space-8); }
/* The sections between the two ends: the row itself, as wide as the menu leaves it. */
.guide-nav-list { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-12); }
/* Folded, where the row does not fit: the menu holds the home icon, the button naming the current section
   and the close icon, and the sections drop below it as the header's submenus do, each as wide as its name
   so the underline stays under it. */
.guide-nav-toggle { display: none; }
.guide-nav.is-compact { width: max-content; }
.guide-nav.is-compact .guide-nav-toggle {
  display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--size-target);
  padding: 0; border: 0; border-radius: var(--radius-field); background: none;
  font: var(--type-ui); color: var(--color-link); white-space: nowrap; cursor: pointer;
}
.guide-nav-toggle:hover { color: var(--color-link-hover); }
.guide-nav-count { font: var(--type-caption); color: var(--color-ink); }
.guide-nav-toggle[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }
.guide-nav.is-compact .guide-nav-list {
  position: absolute; top: calc(100% + var(--space-8)); left: 0; min-width: 100%;
  flex-direction: column; align-items: flex-start; gap: 0; padding: var(--space-8) var(--space-16);
  background: var(--color-surface-raised); border: var(--border-width) solid var(--color-border-subtle);
  border-radius: var(--radius); box-shadow: var(--shadow-hover);
}
.guide-nav.is-compact .guide-nav-toggle[aria-expanded="false"] + .guide-nav-list,
.guide-nav.is-compact .guide-nav-join { display: none; }
/* The site's mark, its name and a chevron, at the screen's top left on a guide's panel, where the
   header's logo stands: the header back, or away again. The name shows while the header is away, set as
   the header's wordmark; the guide's menu lies over it where the two meet. */
.guide-site-menu {
  position: absolute; top: var(--space-12); left: var(--layout-gutter); z-index: calc(var(--z-header) - 1);
  display: inline-flex; align-items: center; gap: var(--space-8);
  min-width: var(--size-target); min-height: var(--size-target); padding: 0;
  border: 0; border-radius: var(--radius-pill); background: none; color: var(--color-ink); cursor: pointer;
}
.guide-site-menu:hover { color: var(--color-link); }
.guide-site-name { font: var(--type-logo); letter-spacing: var(--tracking-logo); color: var(--color-ink-strong); }
.guide-site-menu.is-narrow .guide-site-name { display: none; }
/* With the header brought back on a guide's panel, its chevron stands beside the wordmark, pointing up,
   and tucks the header away again: the header's gap closes to the space between a name and its icon. */
.header-collapse {
  display: inline-grid; place-items: center; width: var(--size-target); height: var(--size-target);
  margin-left: calc(var(--space-24) * -1); margin-right: auto; padding: 0;
  border: 0; border-radius: var(--radius-pill); background: none; color: var(--color-ink); cursor: pointer;
}
.header-collapse:hover { color: var(--color-link); }
.header-collapse .chevron-icon { transform: rotate(180deg); }
.wordmark:has(+ .header-collapse:not([hidden])) { margin-right: 0; }
.guide-tagline { font: var(--type-h4); color: var(--color-ink); margin-top: var(--space-4); }
.guide-first { font: var(--type-body); max-width: var(--layout-measure); margin-top: clamp(var(--space-24), 3.5vh, var(--space-48)); }
/* The office: five rooms along main, on a floor plan from the breakpoint up (the plan's own rules
   follow below). Stories move from room to room by drag and drop, or by a click
   on the story and then on the room. Only what the method turns on is drawn: who builds the work,
   whether a person read it before it landed, and what happens to work that waits. */

.office { position: relative; min-width: calc(var(--layout-max-width) * 0.8); user-select: none; -webkit-user-select: none; }
/* A story's card height, the gaps between the agents' rows and between the shelves, and how long a shake
   and a leave take. The script draws the plan's fields and shelves, and times its own steps, from these
   same values. Registered with a type, each reads back computed, calc() worked out. */
@property --slot-height { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --shake-time { syntax: '<time>'; inherits: true; initial-value: 0s; }
@property --leave-time { syntax: '<time>'; inherits: true; initial-value: 0s; }
.office {
  --slot-height: calc(var(--size-target) - var(--space-8)); --agents-gap: var(--space-12); --shelf-gap: var(--space-24);
  --shake-time: calc(var(--duration-base) * 1.4); --leave-time: calc(var(--duration-base) * 1.3);
}
/* The hint keeps the room of its longest tip, which the script measures at the office's width, so a
   change of tip never shifts the rooms under a held story, or trunk; this is its floor. */
.office-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-24); min-height: var(--space-60); margin-bottom: var(--space-16); }
.office-hint { font: var(--type-body); color: var(--color-ink-strong); max-width: calc(var(--layout-measure) * 1.15); }
.office-hint > * + * { margin-left: var(--space-8); }
.office-hint code { font-family: var(--font-mono); }
.office-step { flex: none; padding: 0 var(--space-8); border-radius: var(--radius-pill); background: var(--color-action); color: var(--color-on-action); font: var(--type-caption); font-family: var(--font-mono); }
.office-read { font: var(--type-small); }
.office-controls { display: flex; gap: var(--space-8); flex: none; }

.office-floor {
  position: relative; z-index: 1; display: grid; gap: var(--space-16);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1.5fr) minmax(0, 1.4fr) minmax(0, 1.2fr);
}
.room {
  display: flex; flex-direction: column; gap: var(--space-8); min-height: calc(var(--space-120) * 1.9);
  padding: var(--space-12); border-radius: var(--radius);
  background: var(--color-surface-subtle); border: var(--border-width-strong) solid transparent;
  transition: border-color var(--duration-base) var(--easing-standard), background-color var(--duration-base) var(--easing-standard);
}
.room-name { margin: 0 0 var(--space-4); display: flex; align-items: center; gap: var(--space-8); white-space: nowrap; font: var(--type-caption); font-family: var(--font-mono); color: var(--color-ink-muted); }
.room-slots { display: flex; flex-direction: column; gap: var(--space-8); }
.room-aside { background: none; border-style: dashed; border-color: var(--color-border-subtle); }
.desks { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
.desk {
  display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-12); border-radius: var(--radius-field);
  background: var(--color-surface-raised); border: var(--border-width-strong) solid var(--color-border-subtle);
  transition: border-color var(--duration-base) var(--easing-standard), background-color var(--duration-base) var(--easing-standard);
}
.desk-who { display: flex; align-items: center; gap: var(--space-8); font: var(--type-caption); font-weight: 600; color: var(--color-ink-strong); }
.desk-ai { position: relative; display: inline-flex; }
.desk-ai-badge { position: absolute; top: calc(var(--space-8) * -1); right: calc(var(--space-8) * -1); width: var(--space-12); height: var(--space-12); }

/* Where a story may go lights up while it is held; the room under it lights up more. */
.room.is-target, .desk.is-target { border: var(--border-width-strong) dashed var(--color-line-active); }
.room.is-over, .desk.is-over { background: color-mix(in srgb, var(--color-line-active) 12%, var(--color-surface-subtle)); }
.is-target[tabindex] { cursor: pointer; }
/* The next step's room, gently, while a guided step waits for it. */
.is-hinted { animation: hint calc(var(--duration-enter) * 5) var(--easing-standard) infinite; }
@keyframes hint { 50% { box-shadow: 0 0 0 var(--space-4) color-mix(in srgb, var(--color-line-active) 35%, transparent); } }

.task {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-8);
  min-height: var(--size-target); padding: var(--space-4) var(--space-12); overflow: hidden;
  border-radius: var(--radius-field); background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong); box-shadow: var(--shadow-subtle);
  cursor: grab; touch-action: none; user-select: none;
}
.task-name { display: inline-flex; align-items: center; gap: var(--space-8); white-space: nowrap; }
.task-mark:empty { display: none; }
.task code { font: var(--type-caption); font-family: var(--font-mono); color: var(--color-ink-strong); }
.task-meta { display: inline-flex; align-items: center; gap: var(--space-4); margin-left: auto; font: var(--type-caption); color: var(--color-ink-muted); }
.task-progress { position: absolute; left: 0; bottom: 0; height: var(--space-4); width: var(--progress, 0%); background: var(--color-line-active); transition: width 100ms linear; }
.task.is-busy { cursor: default; }
.task.is-selected { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
.task.is-dragging { position: fixed; z-index: var(--z-dialog); margin: 0; box-shadow: var(--shadow-hover); cursor: grabbing; }
/* The flight is moved frame by frame by the script; only the landing at trunk's head eases. */
.task.is-flying { position: absolute; z-index: var(--z-dialog); margin: 0; pointer-events: none; }
.task.is-flying.is-landing { transition: transform var(--duration-base) var(--easing-standard), opacity var(--duration-base) var(--easing-standard); }
.task.is-stale { border-style: dashed; background: var(--color-surface); box-shadow: none; }
.task.is-stale code { color: var(--color-ink-muted); }
/* The shake moves the card by its transform, so the offset its place gives it by translate, as peer
   review's pile does, stays while it shakes. */
.task.is-shaking { animation: shake var(--shake-time) var(--easing-standard); }
@keyframes shake { 20%, 60% { transform: translateX(calc(var(--space-4) * -1)); } 40%, 80% { transform: translateX(var(--space-4)); } }
/* The time left in review, as a ring that empties: 24 hours from the cut. */
.task-clock {
  width: var(--size-icon-sm); height: var(--size-icon-sm); border-radius: var(--radius-pill);
  background: conic-gradient(var(--color-ink-muted) var(--left, 100%), var(--color-border-subtle) 0);
}
.task-tag { padding: 0 var(--space-8); border-radius: var(--radius-pill); border: var(--border-width) solid var(--color-border-strong); font: var(--type-caption); color: var(--color-ink-strong); }
.mark-svg { flex: none; width: var(--size-icon-sm); height: var(--size-icon-sm); overflow: visible; }

/* main: the site's own line runs through the office here, and work lands at its right end. */
.office-main {
  position: relative; z-index: 1; height: calc(var(--space-80) + var(--space-16)); margin-top: var(--space-8);
  border-radius: var(--radius); border: var(--border-width-strong) solid transparent;
  transition: border-color var(--duration-base) var(--easing-standard), background-color var(--duration-base) var(--easing-standard);
}
/* trunk's drop area reaches a space past its band on every side, so its dashed edge stands clear of
   trunk's line and a drop near the line still lands; its tint lets trunk show through. */
.office-main::before {
  content: ''; position: absolute; inset: calc(var(--space-16) * -1); z-index: -1;
  border-radius: var(--radius); border: var(--border-width-strong) dashed transparent;
  transition: border-color var(--duration-base) var(--easing-standard), background-color var(--duration-base) var(--easing-standard);
}
.office-main.is-target::before { border-color: var(--color-line-active); }
.office-main.is-over::before { background: color-mix(in srgb, var(--color-line-active) 12%, transparent); }
.office-main-hint {
  position: absolute; z-index: 1; left: 50%; top: var(--space-8); transform: translateX(-50%); opacity: 0;
  padding: 0 var(--space-12); border-radius: var(--radius-pill); background: var(--color-surface-raised);
  font: var(--type-caption); color: var(--color-ink-strong); transition: opacity var(--duration-base) var(--easing-standard);
}
.office-main-hint code { font-family: var(--font-mono); }
.office-main.is-target .office-main-hint { opacity: 1; }
/* A warning box in the lanes above today's stretch of trunk, on its own ground, clear of trunk's line
   and its commits: three lines at most, so wide. Its edge and icon are the unverified mark's colour;
   the script places it, and it slides with trunk's history. It lies under everything else in the
   office and takes no pointer, as trunk's band takes none, so a drop on it lands on trunk. */
.office-today {
  position: absolute; top: 0; display: flex; align-items: flex-start; gap: var(--space-8); pointer-events: none;
  width: calc(var(--space-120) * 4.4); margin: 0; padding: var(--space-8) var(--space-12); border-radius: var(--radius);
  background: var(--color-surface-raised); border: var(--border-width-strong) solid var(--color-state-unverified);
  font: var(--type-small); color: var(--color-ink);
  transition: transform calc(var(--duration-enter) * 1.2) var(--easing-standard);
}
.office-today .icon { color: var(--color-state-unverified); }
.office-today code { font-family: var(--font-mono); }
.office-lines { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
/* A flight's dotted trail onto trunk, over trunk's line and under the rooms, fading once it lands; the
   trail itself is drawn as the shared library's. */
.office-trails { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.office-history { transition: transform calc(var(--duration-enter) * 1.2) var(--easing-standard); }
.office-tally { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-8) var(--space-24); margin-top: var(--space-4); font: var(--type-caption); color: var(--color-ink-muted); }
.office-tally span { display: inline-flex; align-items: center; gap: var(--space-8); }
.office-tally strong { color: var(--color-ink-strong); }
.office-tally code { font-family: var(--font-mono); }

/* The guide's sections: one panel each, along the bottom band. */

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-24); }
.rules li { display: grid; grid-template-columns: calc(var(--space-80) + var(--space-16)) minmax(0, 1fr); gap: var(--space-20); align-items: start; }
.rules h3 { font: var(--type-h4); margin-bottom: var(--space-4); }
.rules p { font: var(--type-small); }
.rule-mark { display: block; width: 100%; height: auto; overflow: visible; }
.rule-mark .sim-branch.is-stale { stroke: var(--color-state-stale); stroke-dasharray: 2 10; }
/* A guide's panels, the simulation apart, stand centred when they fit the window, so a taller window
   gives them room above and below rather than leaving it all at the foot; one longer than the window
   starts at its top, as a page does. The panel is a column, and its content block keeps its width and
   takes the spare height on both sides. A hidden panel stays hidden: the rule outranks the one for
   hidden panels, so it leaves them out. */
.panel[data-guide]:not(#simulation, [hidden]) { display: flex; flex-direction: column; }
.panel[data-guide]:not(#simulation) > .panel-inner { flex: none; width: 100%; margin-block: auto; }
/* The introduction and the core idea read whole above the fold: under the guide's menu at the top,
   and with only a little room at the foot, since the band below already holds the line apart. Their
   gaps grow with the window's height, from what a short one leaves. */
#introduction .panel-inner, #core-idea .panel-inner { padding-top: calc(var(--space-60) + var(--space-12)); padding-bottom: var(--space-24); }
#core-idea h2 { margin-bottom: clamp(var(--space-24), 4vh, var(--space-48)); }
/* The core idea's four rules stand two by two, so the panel reads whole above the fold. */
#core-idea .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(var(--space-40), 6vh, var(--space-60)) var(--space-48); }
/* Down to a laptop's 620-pixel window: a short window tightens the heading's gap and the gap between
   the two rows of rules, and every taller one keeps them as they are. */
@media (max-height: 700px) {
  #core-idea h2 { margin-bottom: var(--space-12); }
  #core-idea .rules { row-gap: var(--space-20); }
}
/* The guide's introduction: what the guide is and a button into the simulation, beside what changes
   for agent work. */
.intro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-60); align-items: center; }
/* What the method is and is not for, beside the introduction: secondary, so the introduction still
   reads whole on a laptop's short window. */
.guide-offer { font: var(--type-caption); color: var(--color-ink-muted); max-width: var(--layout-measure); margin-top: var(--space-12); }

.see-it { display: inline-flex; align-items: center; gap: var(--space-8); margin-top: var(--space-32); font: var(--type-ui); }

/* A task, step by step: a flow in three lanes, who acts at each step, read left to right, landing on
   trunk at the end. The steps are the list; the lanes are its layout, named like the office's rooms,
   and flow.js draws the arrows. Set aside runs under the steps it can stop, dashed as stale work is. */
.flow {
  position: relative; display: grid; gap: var(--space-12) var(--space-16); margin-top: var(--space-24);
  grid-template-columns: var(--space-24) repeat(6, minmax(0, 1fr)) calc(var(--space-60) + var(--space-12));
}
/* A lane's name runs up the left edge of its band, so the steps keep the width; the steps alone set
   the lane's height. */
.flow-lane {
  position: relative; grid-column: 1 / -1; margin: 0; border-radius: var(--radius); background: var(--color-surface-subtle);
  font: var(--type-caption); font-family: var(--font-mono); color: var(--color-ink-muted);
}
.flow-lane-name {
  position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl; white-space: nowrap;
}
.flow-lane-sponsor { grid-row: 1; }
.flow-lane-agents { grid-row: 2; }
.flow-lane-host { grid-row: 3; }
.flow-steps {
  position: relative; z-index: 2; grid-column: 2 / 8; grid-row: 1 / 4;
  display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; margin: 0; padding: 0; list-style: none;
}
.flow-step {
  position: relative; display: grid; align-content: center; margin: var(--space-8) 0; padding: var(--space-8) var(--space-12);
  border: var(--border-width) solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface);
  font: var(--type-caption); color: var(--color-ink-muted); cursor: help;
}
.flow-step strong { font: var(--type-caption); font-weight: 600; color: var(--color-ink-strong); text-decoration: underline dotted var(--color-line-quiet); text-underline-offset: var(--space-4); }
.flow-step:hover, .flow-step:focus-visible { border-color: var(--color-line-active); }
/* A step's number, small and grey in its box's bottom right corner, for the text that names a step.
   Drawing alone: the list numbers the steps for a screen reader. */
.flow-num { position: absolute; right: var(--space-8); bottom: var(--space-4); font: var(--type-caption); color: var(--color-ink-muted); }
/* A step's full text appears beside it on hover or focus, stays while pointed at, and Escape puts it
   away; it is always in the page for a screen reader. The outer steps open inwards. It is raised like
   a dialog, above the lanes and set aside, which the steps' layer sits over. */
.flow-detail {
  position: absolute; z-index: 4; top: calc(100% + var(--space-8)); left: 50%; transform: translateX(-50%);
  width: calc(var(--layout-measure) * 0.5); padding: var(--space-8) var(--space-12); border-radius: var(--radius);
  border: var(--border-width) solid var(--color-border-strong); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog);
  font: var(--type-caption); color: var(--color-ink-strong); opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base) var(--easing-standard);
}
.flow-step:nth-child(-n+2) .flow-detail { left: 0; transform: none; }
.flow-step:nth-child(n+5) .flow-detail { left: auto; right: 0; transform: none; }
.flow-step:hover .flow-detail, .flow-step:focus-visible .flow-detail { opacity: 1; pointer-events: auto; }
.flow-step.is-quiet .flow-detail { opacity: 0; pointer-events: none; }
.flow-step code { font-family: var(--font-mono); }
.flow-step[data-lane="sponsor"] { grid-row: 1; }
.flow-step[data-lane="agents"] { grid-row: 2; }
.flow-step[data-lane="host"] { grid-row: 3; }
.flow-step:nth-child(1) { grid-column: 1; }
.flow-step:nth-child(2) { grid-column: 2; }
.flow-step:nth-child(3) { grid-column: 3; }
.flow-step:nth-child(4) { grid-column: 4; }
.flow-step:nth-child(5) { grid-column: 5; }
.flow-step:nth-child(6) { grid-column: 6; }
/* Who acts is the lane on a wide screen, and a word in the step for a screen reader and a phone. */
.flow-who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flow-trunk { position: relative; z-index: 1; grid-column: 8; grid-row: 3; align-self: center; justify-self: start; margin: 0; }
.flow-trunk code {
  display: inline-flex; align-items: center; min-height: var(--size-target); padding: 0 var(--space-16);
  border-radius: var(--radius-pill); font: var(--type-code); color: var(--color-on-action); background: var(--color-action);
}
.flow-exit {
  position: relative; z-index: 1; grid-column: 4 / 8; grid-row: 4; display: flex; align-items: flex-start; gap: var(--space-8);
  margin: 0; padding: var(--space-8) var(--space-12); border-radius: var(--radius);
  border: var(--border-width-strong) dashed var(--color-state-stale); font: var(--type-caption); color: var(--color-ink-muted);
}
.flow-exit .icon { flex: none; width: var(--size-icon-sm); height: var(--size-icon-sm); margin-top: var(--space-4); }
.flow-exit strong { color: var(--color-ink-strong); }
.flow-exit code { font-family: var(--font-mono); }
.flow-lines { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flow-line { fill: none; stroke: var(--color-line-active); stroke-width: var(--border-width-strong); }
.flow-head { fill: var(--color-line-active); }
/* The ways to set aside and back, the port, dotted in the stale colour, as stale work is drawn. */
.flow-port, .flow-aside { stroke: var(--color-state-stale); stroke-dasharray: 2 6; stroke-linecap: round; }
.flow-port-head, .flow-aside-head { fill: var(--color-state-stale); }
.flow-port-name { font: var(--type-caption); font-family: var(--font-mono); fill: var(--color-ink-muted); }
/* A swim lane per coordination layer: the step flow's shape, five steps across a lane per actor, a
   shared piece from its own branch to the task that takes it, and a trunk end that carries the
   landing's own text, shown as a step's is. Nothing is set aside, so no port. The flow being read
   rises above the next, so its open text is never under that flow's steps. */
#coordination h3 { font: var(--type-h4); margin: var(--space-32) 0 0; }
.flow-layer { margin: var(--space-12) 0 var(--space-32); grid-template-columns: calc(var(--space-120) + var(--space-24)) repeat(5, minmax(0, 1fr)) calc(var(--space-60) + var(--space-12)); }
/* Its lanes are named by who acts, too long to run up a band, so each name stands level in the first
   column, wrapping within it onto two lines at most. */
.flow-layer .flow-lane-name {
  left: var(--space-12); width: var(--space-120);
  transform: translateY(-50%); writing-mode: horizontal-tb; white-space: normal;
}
.flow-layer:hover, .flow-layer:focus-within { z-index: 3; }
.flow-layer { grid-template-rows: repeat(3, auto); }
.flow-layer .flow-lane:nth-child(1) { grid-row: 1; }
.flow-layer .flow-lane:nth-child(2) { grid-row: 2; }
.flow-layer .flow-lane:nth-child(3) { grid-row: 3; }
.flow-layer .flow-steps { grid-column: 2 / 7; grid-row: 1 / -1; }
.flow-layer-1 .flow-step[data-lane="a"] { grid-row: 1; }
.flow-layer-1 .flow-step[data-lane="b"] { grid-row: 2; }
.flow-layer-2 .flow-step[data-lane="yours"] { grid-row: 1; }
.flow-layer-2 .flow-step[data-lane="colleague"] { grid-row: 2; }
.flow-layer .flow-step[data-lane="host"] { grid-row: 3; }
.flow-layer .flow-step:nth-child(n+4) .flow-detail { left: auto; right: 0; transform: none; }
.flow-layer .flow-trunk { grid-column: 7; grid-row: -2; cursor: help; }
.flow-layer .flow-trunk .flow-detail { left: auto; right: 0; transform: none; }
.flow-layer .flow-trunk:hover .flow-detail, .flow-layer .flow-trunk:focus-visible .flow-detail { opacity: 1; pointer-events: auto; }
.flow-layer .flow-trunk.is-quiet .flow-detail { opacity: 0; pointer-events: none; }

/* The coordination simulation, between the layers' table and the swim lanes: its switch and controls
   above the scene, the scene at the size it is drawn, a caption under it and, at the end, the message's
   half. Its trunk is a branch of the site's line, which rises into the scene at its left edge; trunk,
   branches, marks, people and robots are the shared library's. */
.coord { position: relative; display: grid; gap: var(--space-12); margin: var(--space-32) 0; }
.coord-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); }
.coord-controls { display: flex; align-items: center; gap: var(--space-8); }
.coord-stage { position: relative; justify-self: start; max-width: 100%; }
.coord-scene { display: block; overflow: visible; }
.coord-scene .plan-balloon { transition: none; }
.co-label { font: var(--type-caption); fill: var(--color-ink-strong); }
.co-commit { fill: var(--color-line-quiet); }
/* The open intents, on the stand-up's board; a note lights once another task has read it. */
.co-board { fill: var(--color-surface-raised); stroke: var(--color-border-strong); stroke-width: var(--border-width); }
.co-board-title { font: var(--type-caption); font-family: var(--font-mono); fill: var(--color-ink-muted); }
.co-note { fill: var(--color-surface-subtle); stroke: var(--color-border-strong); stroke-width: var(--border-width); }
.co-note.is-lit { stroke: var(--color-line-active); stroke-width: var(--border-width-strong); }
.co-note-text { font: var(--type-caption); fill: var(--color-ink); }
/* Across the team, the code host's flag on a request it flagged: a shape in ink, never a colour alone. */
.co-flag { fill: none; stroke: var(--color-ink-strong); stroke-width: var(--border-width-strong); stroke-linecap: round; stroke-linejoin: round; }
/* The shared piece: the scan's shield on its commit, outlined in ink so it never reads as the filled
   shield of an approved review, and the same shield on every copy of it, on a branch or on trunk. */
.co-scan-shield { fill: var(--color-surface); stroke: var(--color-ink-strong); stroke-width: 1.5; }
.co-scan-tick { fill: none; stroke: var(--color-ink-strong); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
/* The bow from the piece's commit to each copy taken from it, and on to trunk: dotted, in the line's
   colour. */
.co-pick { fill: none; stroke: var(--color-line-active); stroke-width: var(--border-width-strong); stroke-dasharray: 0 7; stroke-linecap: round; }
/* Task B's note after its rebase, quiet beside the drawing's names. */
.co-rebased { font: var(--type-caption); fill: var(--color-ink-muted); }
/* "off" is the shortest setting's name: every setting is a full touch target wide as well as tall. */
.coord-switch button { min-width: var(--size-target); justify-content: center; }
.coord-switch button.is-lit { box-shadow: inset 0 0 0 var(--border-width-strong) var(--color-action); }
.coord-trunk-name { left: var(--x); top: var(--y); }
.coord-caption { margin: 0; font: var(--type-caption); color: var(--color-ink-strong); }
.coord-outcome { margin: 0; font: var(--type-small); font-weight: 600; color: var(--color-ink-strong); }

/* A panel's closing line and its link to the simulation share one row. */
.guide-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8) var(--space-24); margin-top: var(--space-16); }
.guide-foot > p { flex: 1 1 calc(var(--layout-measure) * 0.8); max-width: var(--layout-measure); }
.guide-foot .see-it { margin-top: 0; }
.flow-note { font: var(--type-caption); color: var(--color-ink-muted); }
@media (max-width: 767.98px) {
  .flow { display: block; }
  .flow-lane, .flow-lines, .flow-trunk { display: none; }
  .flow-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  /* As specific as the desktop's placement by lane and by place, so the list stands in one column. */
  .flow-steps .flow-step { grid-row: auto; grid-column: auto; margin: 0; cursor: auto; }
  .flow-step strong { text-decoration: none; }
  .flow-detail { position: static; width: auto; transform: none; padding: 0; border: 0; background: none; color: var(--color-ink-muted); opacity: 1; }
  .flow-who { position: static; width: auto; height: auto; overflow: visible; clip: auto; font: var(--type-caption); font-family: var(--font-mono); }
  .flow-exit { margin-top: var(--space-12); }
  /* A coordination flow's list ends in its trunk end, a last row with the landing's text. */
  .flow-layer .flow-steps .flow-step { grid-row: auto; }
  .flow-layer .flow-trunk { display: grid; justify-items: start; gap: var(--space-8); margin-top: var(--space-8); cursor: auto; }
}

/* The benefits, beside the introduction's words: four compact cards stacked, each its spot colour
   down the left edge rather than across the top, its title above two lines of text, so the
   introduction still reads whole on a laptop's short window. */
#introduction .spot-cards { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
#introduction .spot-cards .card {
  gap: var(--space-4); padding: var(--space-8) var(--space-16);
  border-top: var(--border-width) solid var(--color-border-subtle); border-left: var(--size-line) solid var(--spot);
}
#introduction .spot-cards .card h3, #introduction .spot-cards .card p { margin: 0; }
#introduction .spot-cards .card h3 { font: var(--type-button); }
#introduction .spot-cards .card p { font: var(--type-caption); }
#introduction .spot-cards .card code { font-size: inherit; line-height: inherit; }

/* Where AI work runs: the three run modes as three cards, each marked as its work lands on trunk. */
.mode-cards { margin-top: var(--space-24); }
.mode-cards .card { display: grid; align-content: start; gap: var(--space-8); padding: var(--space-20) var(--space-24); }
.mode-cards h3 { display: flex; align-items: center; gap: var(--space-8); margin: 0; font: var(--type-h4); }
.mode-cards p { margin: 0; font: var(--type-caption); }
.mode-mark { width: var(--space-32); height: var(--space-32); }
.mode-mark-pair { display: inline-flex; align-items: center; width: auto; color: var(--color-ink-strong); }
.mode-mark-pair .icon + .icon { margin-left: calc(var(--space-4) * -1); }
.mode-scope { font: var(--type-caption); color: var(--color-ink-muted); }

.trigger h3 { display: flex; align-items: center; gap: var(--space-12); font: var(--type-h4); }
.trigger h3 .icon { width: var(--size-icon); height: var(--size-icon); color: var(--color-state-stale); }
.trigger p { font: var(--type-small); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-40); margin-top: var(--space-40); }
.two-col h3 { font: var(--type-h4); }
.two-col ul { margin: 0; padding-left: var(--space-20); display: grid; gap: var(--space-8); font: var(--type-small); }
.signal { margin-top: var(--space-40); max-width: var(--layout-measure); }

.layers-table { width: 100%; border-collapse: collapse; font: var(--type-small); margin-bottom: var(--space-24); }
.layers-table th, .layers-table td { text-align: left; vertical-align: top; padding: var(--space-12) var(--space-16); border-bottom: var(--border-width) solid var(--color-border-subtle); }
.layers-table thead th { font: var(--type-ui); color: var(--color-ink-strong); border-bottom: var(--border-width-strong) solid var(--color-border-strong); }
.layers-table tbody th { font-weight: 600; color: var(--color-ink-strong); width: 22%; }

.offer p { font: var(--type-small); }
.invite { display: flex; align-items: center; justify-content: space-between; gap: var(--space-32); margin-top: var(--space-48); padding: var(--space-32); border-radius: var(--radius); background: var(--color-surface-raised); border: var(--border-width) solid var(--color-border-subtle); }
.invite p { font: var(--type-body); color: var(--color-ink-strong); max-width: var(--layout-measure); }
.licence { font: var(--type-caption); color: var(--color-ink-muted); margin-top: var(--space-32); max-width: var(--layout-measure); }

/* The office as a floor plan, from the breakpoint up: the script draws the plan in the office's
   own pixels and sets each room's, desk's, name's and slot's box on it, as --x, --y, --w and --h. The
   rooms stand over their part of the plan with no ground of their own, so the plan shows through, and
   a room that takes a story still marks it with its dashed edge. On a phone the plan hides and the
   rooms stack in a column. */
.office-plan, .walk-trails { display: none; }
@media (min-width: 768px) {
  #simulation[data-guide] .office-floor.has-plan { display: block; height: var(--plan-h); }
  #simulation[data-guide] .has-plan :is(.office-plan, .walk-trails) {
    display: block; position: absolute; left: 0; top: 0; width: var(--plan-w); height: var(--plan-h);
    overflow: visible; pointer-events: none;
  }
  #simulation[data-guide] .office-floor.has-plan .room,
  #simulation[data-guide] .office-floor.has-plan .desk {
    position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); min-height: 0;
    padding: 0; overflow: visible; background: none; border-color: transparent; border-style: solid;
  }
  /* A desk stands inside the desks room's edge, and a name, a slot or who sits at a desk inside its
     room's or desk's, so each steps back over that edge to stand where the plan puts it. */
  #simulation[data-guide] .office-floor.has-plan .desk { left: calc(var(--x) - var(--border-width-strong)); top: calc(var(--y) - var(--border-width-strong)); }
  #simulation[data-guide] .office-floor.has-plan .room.is-target { border-color: var(--color-line-active); border-style: dashed; }
  #simulation[data-guide] .office-floor.has-plan .room.is-over { background: color-mix(in srgb, var(--color-line-active) 12%, transparent); }
  /* A desk marks the field where the story will stand rather than its whole row, which still takes the
     drop; the guided step's pulse lights the field too. */
  #simulation[data-guide] .has-plan .desk .room-slots { height: var(--slot-height); border-radius: var(--radius-field); }
  /* A desk holds one story, and for a moment two: the next walking in while the last walks out to
     trunk. Each stands on the field rather than in a column one card high, so neither is squeezed. */
  #simulation[data-guide] .has-plan .desk .room-slots > .task:not(.is-dragging) { position: absolute; inset: 0; }
  #simulation[data-guide] .has-plan .desk.is-target .room-slots { outline: var(--border-width-strong) dashed var(--color-line-active); }
  #simulation[data-guide] .has-plan .desk.is-over .room-slots { background: color-mix(in srgb, var(--color-line-active) 12%, transparent); }
  #simulation[data-guide] .has-plan .desk.is-hinted { animation: none; }
  #simulation[data-guide] .has-plan .desk.is-hinted .room-slots { animation: hint calc(var(--duration-enter) * 5) var(--easing-standard) infinite; }
  #simulation[data-guide] .has-plan .desks { display: block; }
  #simulation[data-guide] .has-plan .room-name,
  #simulation[data-guide] .has-plan .desk-who,
  #simulation[data-guide] .has-plan .room-slots {
    position: absolute; left: calc(var(--x) - var(--border-width-strong)); top: calc(var(--y) - var(--border-width-strong));
    width: var(--w); margin: 0;
  }
  #simulation[data-guide] .has-plan .room-name .icon,
  #simulation[data-guide] .has-plan .desk-icons { display: none; }
  /* On the plan the desk only greys, its name unstruck. */
  #simulation[data-guide] .has-plan .desk.is-struck .desk-name { text-decoration: none; }
  /* Who sits at a desk stands above the field for their story, level with them. */
  #simulation[data-guide] .has-plan .desk-text { line-height: 1.15; }
  /* A story is a card of one size wherever it stands: a column in the backlog, a row per agent, a shelf
     each set aside. */
  #simulation[data-guide] .has-plan .room-slots { display: flex; flex-direction: column; gap: var(--space-8); }
  /* With the agents and on the shelf each story keeps its row while it stays, a free row above
     notwithstanding. */
  #simulation[data-guide] .has-plan :is([data-zone="agents"], [data-zone="aside"]) .room-slots { display: block; }
  #simulation[data-guide] .has-plan :is([data-zone="agents"], [data-zone="aside"]) .room-slots > .task:not(.is-dragging) {
    position: absolute; left: 0; right: 0; top: calc(var(--row, 0) * (var(--slot-height) + var(--row-gap)));
  }
  #simulation[data-guide] .has-plan [data-zone="agents"] .room-slots { --row-gap: var(--agents-gap); }
  #simulation[data-guide] .has-plan [data-zone="aside"] .room-slots { --row-gap: var(--shelf-gap); }
  /* A story stands at its place's full width, and shrinks to a chip as it sets off and grows back as it
     arrives. */
  #simulation[data-guide] .has-plan .room-slots .task {
    width: 100%; height: var(--slot-height); min-height: 0; margin-inline: auto;
    padding: 0 var(--space-8); transition: width var(--duration-base) var(--easing-standard);
  }
  #simulation[data-guide] .has-plan .task code { font-weight: 600; }
  /* Peer review's stories lie on one pile in the middle of the table, the newest on top and each a
     little further along, so the pile's edges show how many; the one in hand or in focus comes up. */
  #simulation[data-guide] .has-plan [data-zone="review"] .room-slots { display: grid; }
  #simulation[data-guide] .has-plan [data-zone="review"] .room-slots > .task { grid-area: 1 / 1; justify-self: center; }
  #simulation[data-guide] .has-plan [data-zone="review"] .room-slots > .task:nth-child(2) { translate: var(--space-4) var(--space-4); }
  #simulation[data-guide] .has-plan [data-zone="review"] .room-slots > .task:nth-child(3) { translate: var(--space-8) var(--space-8); }
  #simulation[data-guide] .has-plan [data-zone="review"] .room-slots > .task:nth-child(4) { translate: var(--space-12) var(--space-12); }
  #simulation[data-guide] .has-plan [data-zone="review"] .room-slots > .task:is(:focus, .is-selected) { z-index: 1; }
  /* A story on its way walks over the rooms it passes, as a chip around its place's middle. */
  #simulation[data-guide] .has-plan .task.is-walking { z-index: 2; }
  #simulation[data-guide] .has-plan .room-slots .task.is-walking { width: var(--slot-height); }
}
/* On its way, and on its flight to trunk after a walk, a story is a chip showing only its mark. */
/* Square wherever it goes: out of its room and in flight, a story keeps a card's height, not a touch
   target's. */
.task.is-walking { width: var(--slot-height); height: var(--slot-height); min-height: 0; justify-content: center; padding: 0; }
.task.is-walking :is(.task-name code, .task-meta, .task-progress) { display: none; }
/* With no mark yet, the chip shows a grey hollow circle, like an earlier commit on trunk. */
.task.is-walking:not(.is-marked)::before {
  content: ''; flex: none; box-sizing: border-box; width: var(--space-12); height: var(--space-12);
  border-radius: var(--radius-pill); border: var(--border-width-strong) solid var(--color-ink-muted);
  background: var(--color-surface);
}
/* The plan's drawing: the floor, the walls in the strongest ink, each door's leaf and swing, and the
   furniture seen from the front and above, a light top over a front a shade darker. */
.plan-floor { fill: var(--color-surface-subtle); }
.plan-wall { fill: none; stroke: var(--color-ink-strong); stroke-width: var(--size-line-quiet); stroke-linecap: square; }
.plan-door { fill: none; stroke: var(--color-ink-muted); stroke-width: var(--border-width); }
.plan-door-leaf { fill: none; stroke: var(--color-ink-muted); stroke-width: var(--border-width-strong); }
.plan-top { fill: var(--color-surface-raised); stroke: var(--color-border-strong); stroke-width: var(--border-width); }
.plan-front, .plan-pot {
  fill: color-mix(in srgb, var(--color-border-subtle) 55%, var(--color-surface-raised));
  stroke: var(--color-border-strong); stroke-width: var(--border-width); stroke-linejoin: round;
}
.plan-side { fill: var(--color-border-subtle); stroke: var(--color-border-strong); stroke-width: var(--border-width); stroke-linejoin: round; }
.plan-lid-back { fill: color-mix(in srgb, var(--color-border-subtle) 55%, var(--color-surface-raised)); stroke: var(--color-border-strong); stroke-width: var(--border-width); stroke-linejoin: round; }
.plan-mug { fill: var(--color-surface-raised); stroke: var(--color-ink-strong); stroke-width: 1.2; stroke-linejoin: round; }
.plan-leg { fill: none; stroke: var(--color-border-strong); stroke-width: var(--border-width-strong); stroke-linecap: round; }
/* The developer with AI's door out to trunk: open in today, shut under a lock in the other modes. */
.plan-ai-door .is-closed, .office-plan.is-ai-locked .plan-ai-door .is-open { display: none; }
.office-plan.is-ai-locked .plan-ai-door .is-closed { display: inline; }
.plan-lock-body { fill: var(--color-surface-raised); stroke: var(--color-ink-strong); stroke-width: 2; }
.plan-lock-line { fill: none; stroke: var(--color-ink-strong); stroke-width: 2; stroke-linecap: round; }
.plan-field { fill: none; stroke: var(--color-border-strong); stroke-width: var(--border-width); stroke-dasharray: 4 4; }
.plan-yard { fill: none; stroke: var(--color-border-strong); stroke-width: var(--border-width-strong); stroke-dasharray: 6 5; }
.plan-yard.is-solid { stroke-dasharray: none; }
/* The people, the agents and the reviewers' balloons are drawn as the shared library's; the plants in
   the success colour. */
.plan-leaf { fill: var(--color-success); opacity: 0.6; }
.plan-leaf-dark { fill: var(--color-success); opacity: 0.85; }
/* The company's sign above the desks room, in the display face. */
.plan-company { font: var(--type-caption); font-family: var(--font-display); font-weight: 700; fill: var(--color-ink-strong); }
/* The people idle: now and then one waves the arm its data-wave names, turning it at the
   shoulder, or a reviewer takes a small step back and forward; a figure on its way steps. They stand
   still when the office stops, and never move under reduced motion. A figure away from its place hides,
   the two walkers show only on their way, and the reviewer on the left takes a pointer, since a click
   sends them off. */
.plan-walker { display: none; }
.plan-walker.is-on { display: inline; }
.office-plan .is-away { visibility: hidden; }
#simulation .room.is-poking { cursor: pointer; }
.plan-arm-right, .plan-leg-right { transform-box: fill-box; transform-origin: 0 0; }
.plan-arm-left, .plan-leg-left { transform-box: fill-box; transform-origin: 100% 0; }
@media (prefers-reduced-motion: no-preference) {
  /* A walker walks only while it moves; standing still, waiting or paused, it stands idle. */
  /* Facing us, it walks: the legs lift at the knee in turn, half a stride apart, and the hands
     rise and fall, each against the leg on its own side, while the body bobs once a step. */
  .plan-walker.is-moving :is(.plan-leg-left, .plan-leg-right) { vector-effect: non-scaling-stroke; animation: plan-lift calc(var(--duration-base) * 3) var(--easing-standard) infinite; }
  .plan-walker.is-moving .plan-leg-right { animation-delay: calc(var(--duration-base) * -1.5); }
  /* Facing us, a walker's feet stand closer together than at rest. */
  .plan-walker.is-moving .plan-leg-left { rotate: -10deg; }
  .plan-walker.is-moving .plan-leg-right { rotate: 10deg; }
  .plan-walker.is-moving :is(.plan-arm-left, .plan-arm-right) { animation: plan-arm-swing calc(var(--duration-base) * 3) var(--easing-standard) infinite; }
  /* Walking across the screen, side-on: the legs scissor past each other through the upright,
     and the arms hang and swing, each against the leg on its own side. */
  .plan-walker.is-moving.is-sideways .plan-leg-left { animation: plan-stride-left calc(var(--duration-base) * 3) var(--easing-standard) infinite; }
  .plan-walker.is-moving.is-sideways .plan-leg-right { animation: plan-stride-right calc(var(--duration-base) * 3) var(--easing-standard) infinite; }
  .plan-walker.is-moving.is-sideways .plan-arm-left { animation: plan-arm-stride-left calc(var(--duration-base) * 3) var(--easing-standard) infinite; }
  .plan-walker.is-moving.is-sideways .plan-arm-right { animation: plan-arm-stride-right calc(var(--duration-base) * 3) var(--easing-standard) infinite; }
  [data-wave="right"].is-waving .plan-arm-right { animation: plan-wave-right calc(var(--duration-base) * 6) var(--easing-standard); }
  [data-wave="left"].is-waving .plan-arm-left { animation: plan-wave-left calc(var(--duration-base) * 6) var(--easing-standard); }
  .plan-reviewer.is-stepping { animation: plan-shuffle calc(var(--duration-base) * 6) var(--easing-standard); }
  .plan-walker.is-moving { animation: plan-step calc(var(--duration-base) * 1.5) linear infinite; }
  .office-plan.is-still :is(.plan-reviewer, .plan-arm-left, .plan-arm-right, .plan-leg-left, .plan-leg-right, .plan-walker) { animation-play-state: paused; }
}
/* One turn of the arms raises one hand and lowers the other, so both arms share it. */
@keyframes plan-lift { 0%, 50%, 100% { scale: 1; } 25% { scale: 1 0.7; } }
@keyframes plan-arm-swing { 0%, 50%, 100% { rotate: 0deg; } 25% { rotate: -10deg; } 75% { rotate: 10deg; } }
/* Side-on, each leg swings from its own side of the upright to the other's, and each arm, turned down
   from its resting angle, swings the other way. */
@keyframes plan-stride-left { 0%, 100% { rotate: 0deg; } 50% { rotate: -46deg; } }
@keyframes plan-stride-right { 0%, 100% { rotate: 0deg; } 50% { rotate: 46deg; } }
@keyframes plan-arm-stride-left { 0%, 100% { rotate: -93deg; } 50% { rotate: -23deg; } }
@keyframes plan-arm-stride-right { 0%, 100% { rotate: 93deg; } 50% { rotate: 23deg; } }
@keyframes plan-wave-right { 0%, 85%, 100% { rotate: 0deg; } 15%, 35%, 55% { rotate: -125deg; } 25%, 45%, 65% { rotate: -95deg; } }
@keyframes plan-wave-left { 0%, 85%, 100% { rotate: 0deg; } 15%, 35%, 55% { rotate: 125deg; } 25%, 45%, 65% { rotate: 95deg; } }
@keyframes plan-shuffle { 0%, 100% { translate: 0 0; } 30%, 55% { translate: 0 calc(var(--space-4) * -1); } }
@keyframes plan-step { 50% { translate: 0 calc(var(--border-width-strong) * -1); } }

/* On a phone the guide's own menu is hidden, so its first panel carries the way out, "Close the guide",
   and a "Sections" list of its panels, each a full tap target. Not above the breakpoint. */
.guide-phone-nav { display: none; }

/* Below the breakpoint the page stacks and the strip hides. The office fits the screen: the panel
   never widens for trunk's history, which is clipped at the office's edge; the backlog, the desks and
   the shelf take a row each, with the agents and peer review two by two between them, and trunk runs
   under them inside the office. The run modes and the tally stack under trunk, clear of its name. */
@media (max-width: 767.98px) {
  #simulation .panel-inner { padding: var(--layout-mobile-padding) var(--layout-gutter); }
  #simulation[data-guide] { min-width: 100%; }
  #simulation[data-guide] .panel-inner { display: block; width: auto; padding: var(--layout-mobile-padding) var(--layout-gutter); }
  .office { min-width: 0; }
  #simulation[data-guide] .office { overflow-x: clip; }
  #simulation[data-guide] .office-lines { overflow: hidden; }
  .office-top { flex-direction: column; align-items: flex-start; }
  .office-floor, #simulation[data-guide] .office-floor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-desks, .room[data-zone="backlog"], .room-aside { grid-column: 1 / -1; }
  .office-run { flex-direction: column; align-items: flex-start; gap: var(--space-8); margin-top: calc(var(--size-target) + var(--space-32)); padding-right: 0; }
  .office-modes { flex-wrap: wrap; gap: 0 var(--space-12); }
  .office-modes-more { flex: 1 1 100%; }
  .office-modes-note { position: static; width: auto; margin-bottom: var(--space-8); }
  .mode-switch { flex: 0 1 auto; flex-wrap: wrap; border-radius: var(--radius); }
  .mode-switch button { min-height: var(--size-target); }
  /* Nothing is cut short: a room's name wraps in a half-width room, and each desk stands who works above
     the story in hand, which takes the desk's width, so the longest story name shows whole. The desks'
     row is taller for it. The agents' and peer review's row and the shelf's fit what their rooms hold,
     a story's height when empty, so they stand low until work arrives and grow to show every story
     whole; trunk and the run row under them move down as they grow. */
  .room-name { white-space: normal; }
  #simulation[data-guide] .office-floor {
    grid-template-rows: calc(var(--space-120) * 1.75) calc(var(--space-120) * 3) auto;
    grid-auto-rows: auto;
  }
  #simulation[data-guide] :is([data-zone="agents"], [data-zone="review"], [data-zone="aside"]) .room-slots { min-height: var(--size-target); }
  #simulation[data-guide] .desk {
    flex-direction: column; align-items: stretch; justify-content: center; gap: var(--space-4); padding-block: var(--space-4);
  }
  #simulation[data-guide] .desk-who { width: auto; }
  #simulation[data-guide] .desk .room-slots { flex: none; }
  #simulation[data-guide] .desk .task { min-height: var(--size-target); }
  /* trunk's band holds only the lanes and the run modes' names, so trunk stands close under the rooms.
     today's warning stands under trunk instead, the office's full width, clear of trunk's name, and the
     run row follows it; trunk never moves when the warning comes and goes. */
  #simulation[data-guide] .office-main { height: calc(var(--space-120) * 1.2); }
  .office-today { position: static; width: auto; margin-top: calc(var(--size-target) + var(--space-32)); }
  .office-today:not([hidden]) + .office-run { margin-top: var(--space-24); }
  .office-run .office-tally { grid-template-columns: max-content; grid-auto-rows: auto; }
  /* Shown in whichever guide panel holds it, the first. */
  .panel[data-guide] .guide-phone-nav { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-8) var(--space-16); margin-bottom: var(--space-24); }
  .guide-sections summary { min-height: var(--size-target); padding: 0 var(--space-8); font: var(--type-ui); line-height: var(--size-target); color: var(--color-link); cursor: pointer; }
  .guide-sections ul { margin: 0; padding: 0 0 0 var(--space-16); list-style: none; }
  .guide-sections a { display: flex; align-items: center; min-height: var(--size-target); font: var(--type-ui); white-space: nowrap; }
  .grid-3, .two-col, .intro, #core-idea .rules { grid-template-columns: minmax(0, 1fr); }
  .invite { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .is-hinted { animation: none; outline: var(--border-width-strong) dashed var(--color-line-active); }
  #simulation[data-guide] .has-plan .desk.is-hinted { outline: none; }
  #simulation[data-guide] .has-plan .desk.is-hinted .room-slots { animation: none; outline: var(--border-width-strong) dashed var(--color-line-active); }
}
