@font-face{font-family:"Schibsted Grotesk";font-style:normal;font-weight:400;font-display:swap;src:url("/central/fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Schibsted Grotesk";font-style:normal;font-weight:500;font-display:swap;src:url("/central/fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2")}
@font-face{font-family:"Schibsted Grotesk";font-style:normal;font-weight:600;font-display:swap;src:url("/central/fonts/schibsted-grotesk-latin-600-normal.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:400;font-display:swap;src:url("/central/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:500;font-display:swap;src:url("/central/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2")}
/* Workforce Portal tokens as CSS variables, from the design system's tokens.json. Any element with data-theme switches theme for its subtree. */
:root,
[data-theme="light"] {
  --bg: #f3f4f7;
  --panel: #ffffff;
  --raised: #e9ebf1;
  --line: #d9dce4;
  --line-strong: #7e8597;
  --text: #141824;
  --text-2: #444b5c;
  --text-3: #5f677a;
  --ink: #141824;
  --on-ink: #ffffff;
  --agent: #2343c4;
  --agent-soft: #e4e9fb;
  --human: #9a4d00;
  --human-fill: #f4a81d;
  --on-human: #241500;
  --human-soft: #fdf0d6;
  --ok: #16704c;
  --ok-soft: #dff1e8;
  --danger: #b42b18;
  --danger-soft: #fbe4e0;
  --focus: #2343c4;
  --shadow-pop: 0 8px 24px rgba(20, 24, 36, 0.14);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0e1117;
  --panel: #151922;
  --raised: #1d2230;
  --line: #272d3b;
  --line-strong: #646c80;
  --text: #e7e9ef;
  --text-2: #aeb4c2;
  --text-3: #8d94a6;
  --ink: #e7e9ef;
  --on-ink: #0e1117;
  --agent: #8ea2ff;
  --agent-soft: #1d2647;
  --human: #f6b444;
  --human-fill: #f6b444;
  --on-human: #241500;
  --human-soft: #33250c;
  --ok: #55c99b;
  --ok-soft: #11291f;
  --danger: #ff8270;
  --danger-soft: #3a1712;
  --focus: #8ea2ff;
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;
  --font-sans: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
/* Portal shell, shared by every screen (not part of the design system yet). */
.shell-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  min-height: 56px;
  padding: 0 clamp(16px, 2.5%, 32px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.shell-bar .brand {
  font: 600 16px/1 var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.shell-bar nav {
  display: flex;
  flex-wrap: wrap;
}
.shell-bar nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  padding: 0 12px;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
  font: 500 14px/1 var(--font-sans);
  text-decoration: none;
}
.shell-bar nav a:hover {
  color: var(--text);
}
.shell-bar nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}
.shell-bar .badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--human-soft);
  color: var(--human);
  font: 500 11px/1 var(--font-mono);
}
.shell-bar .end {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px clamp(16px, 2.5%, 32px) 64px;
  display: grid;
  gap: 24px;
}
.cols {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
}
.cols > .main {
  flex: 999 1 560px;
  min-width: 0;
  display: grid;
  gap: 28px;
}
.cols > .side {
  flex: 1 1 280px;
  min-width: 0;
  display: grid;
  gap: 16px;
}
.sec {
  display: grid;
  gap: 12px;
}
.sec-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.sec-h h2 {
  margin: 0;
  font: 600 15px/22px var(--font-sans);
  color: var(--text);
}
.box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.box p {
  margin: 0;
}
.kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
  line-height: 19px;
}
.kv dt {
  color: var(--text-3);
}
.kv dd {
  margin: 0;
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}
.quote {
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--raised);
  color: var(--text);
}
.empty {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 28px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text-3);
  text-align: center;
  font-size: 13px;
}
.note-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 12px 156px;
  border-top: 1px solid var(--line);
  color: var(--ok);
  font-size: 13px;
}
.note-off {
  color: var(--text-2);
}
@media (max-width: 720px) {
  .note-ok {
    padding-left: 16px;
  }
}
/* Portal shell additions for the running console (ADR-005): the page ground, the phone bar and its menu. */
html,
body {
  margin: 0;
  background: var(--bg);
}
#root.wf {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* The skip link is `.skip-link`, not `.skip`: the approved step track's skipped segment is
   `.wf-track > i.skip`, and a global `.skip` drew that segment off its track (F-26). */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
}
.skip-link:focus {
  top: 8px;
}
.shell-bar {
  position: relative;
}
.shell-bar .menu,
.shell-bar .back {
  display: none;
}
.shell-bar .wf-select select {
  appearance: none;
  border: 0;
  padding: 0 2px;
  background: transparent;
  color: var(--text);
  font: 500 13px/1 var(--font-sans);
  cursor: pointer;
}
.shell-bar .end .wf-select {
  padding-right: 6px;
}
.page-title {
  margin: 0;
  font: 600 20px/26px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--text);
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.page-head p {
  margin: 4px 0 0;
  color: var(--text-2);
}
.page-head .end {
  display: flex;
  align-items: center;
  gap: 16px;
}
.notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--raised);
  color: var(--text-2);
}
.notice.error {
  background: var(--danger-soft);
  color: var(--danger);
}
.notice.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
@media (max-width: 640px) {
  .shell-bar {
    flex-wrap: nowrap;
    gap: 0 8px;
    padding: 0 16px;
  }
  .shell-bar .menu,
  .shell-bar .back {
    display: inline-flex;
    position: relative;
    min-width: 44px;
    height: 44px;
    margin-left: -10px;
    padding: 0 6px;
  }
  .shell-bar .menu .badge {
    position: absolute;
    top: 4px;
    right: 0;
  }
  .shell-bar.on-task .brand {
    display: none;
  }
  .shell-bar nav {
    display: none;
  }
  .shell-bar nav.open {
    display: grid;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 4px 16px 8px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
  }
  .shell-bar nav.open a {
    height: 44px;
    border-bottom: 0;
  }
  .shell-bar nav.open a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .shell-bar .end {
    gap: 8px;
  }
  .shell-bar .end .wf-select,
  .shell-bar .viewer .name {
    display: none;
  }
}
.wf-raw summary {
  width: max-content;
  font-size: 12.5px;
  color: var(--text-3);
  cursor: pointer;
  list-style: none;
}
.wf-raw summary::-webkit-details-marker {
  display: none;
}
.wf-raw summary::before {
  content: "▸ ";
}
.wf-raw[open] summary::before {
  content: "▾ ";
}
.wf-raw pre {
  margin: 6px 0 0;
  padding: 10px 12px;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text-2);
  font: 400 12px/17px var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wf-summary .needs .wf-label {
  color: var(--human);
}
.wf-select select {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: 500 13px/1 var(--font-sans);
  cursor: pointer;
}
.wf-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: 400 13px/1 var(--font-sans);
  outline: none;
}
.wf-search:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.wf-spend .fig .of.mono {
  font-family: var(--font-mono);
}
@media (max-width: 640px) {
  .wf-filters .wf-seg {
    max-width: 100%;
    overflow-x: auto;
  }
  .wf-filters .wf-seg > button {
    flex: none;
  }
  .wf-search {
    max-width: none;
  }
}
.wf-gate .note {
  display: grid;
  gap: 4px;
}
.wf-gate .need {
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 500;
}
.wf-gate .confirm {
  font-weight: 600;
  color: var(--text);
}
.wf-gate.decided {
  display: block;
  margin: 0;
  padding: 10px 16px;
  background: var(--raised);
  color: var(--text-2);
}
@media (max-width: 640px) {
  .wf-gate .acts {
    display: grid;
  }
  .wf-gate .acts .wf-btn {
    height: 44px;
  }
  .wf-gate .acts .spacer {
    display: none;
  }
}
/* The workforce controls on Policies, in the design system's styling. */
.controls {
  display: grid;
  gap: 16px;
}
.controls-nav {
  flex-wrap: wrap;
  max-width: 100%;
}
.controls .box ul {
  margin: 0;
  padding-left: 20px;
}
.controls .heading {
  margin: 0;
  font: 600 15px/22px var(--font-sans);
  color: var(--text);
}
.controls .form {
  display: grid;
  gap: 12px;
}
.controls .field {
  display: grid;
  gap: 4px;
  font-weight: 500;
  color: var(--text);
}
.controls .check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}
.controls :is(input:not([type="checkbox"]), select, textarea) {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font: 400 14px/21px var(--font-sans);
}
.controls .code {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text-2);
  font: 400 12px/17px var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.controls .acts-row,
.controls .queue-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.controls .queue-row {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* Workforce Portal components. Plain CSS, prefix wf-. Every colour, space and radius comes from tokens.css. */

.wf {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 21px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.wf *,
.wf *::before,
.wf *::after {
  box-sizing: border-box;
}
.wf .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.wf .t2 {
  color: var(--text-2);
}
.wf .t3 {
  color: var(--text-3);
}
.wf .i {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:where(.wf) a:not([class]) {
  color: var(--agent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.wf :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.wf-label {
  font: 600 11px/14px var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Button ------------------------------------------------------------- */
.wf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font: 500 13.5px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
}
.wf-btn:hover {
  background: var(--raised);
}
.wf-btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.wf-btn.decide {
  background: var(--human-fill);
  border-color: var(--human-fill);
  color: var(--on-human);
}
.wf-btn.primary:hover,
.wf-btn.decide:hover {
  opacity: 0.88;
}
.wf-btn.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.wf-btn.quiet:hover {
  background: var(--raised);
  color: var(--text);
}
.wf-btn.danger {
  color: var(--danger);
}
.wf-btn.sm {
  height: 26px;
  padding: 0 8px;
  font-size: 12.5px;
  gap: 4px;
}
.wf-btn.sm .i {
  width: 14px;
  height: 14px;
}
.wf-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* StatusBadge -------------------------------------------------------- */
.wf-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 13px/18px var(--font-sans);
  color: var(--text-3);
  white-space: nowrap;
}
.wf-status .i {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}
.wf-status.running {
  color: var(--agent);
}
.wf-status.running .i {
  animation: wf-spin 1.4s linear infinite;
}
.wf-status.needs {
  color: var(--human);
}
.wf-status.needs .i {
  fill: var(--human-fill);
  stroke: var(--human);
}
.wf-status.done {
  color: var(--ok);
}
.wf-status.failed {
  color: var(--danger);
}
.wf-status.pill {
  height: 24px;
  padding: 0 10px 0 7px;
  border-radius: var(--radius-pill);
  background: var(--raised);
}
.wf-status.pill.running {
  background: var(--agent-soft);
}
.wf-status.pill.needs {
  background: var(--human-soft);
}
.wf-status.pill.done {
  background: var(--ok-soft);
}
.wf-status.pill.failed {
  background: var(--danger-soft);
}
.wf-status .why {
  font-weight: 400;
  color: inherit;
  opacity: 0.9;
}
@keyframes wf-spin {
  to {
    transform: rotate(360deg);
  }
}

/* StepTrack ---------------------------------------------------------- */
.wf-track {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.wf-track > i {
  display: block;
  flex: 1 1 0;
  min-width: 8px;
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--line);
}
/* The portal's addition to the approved rule above: every segment carries a 1px border inside its
   height, so the skipped step's dashed one is as wide and as tall as the rest; a flex item's base
   size leaves its border out (F-26). */
.wf-track > i {
  box-sizing: border-box;
  border: 1px solid transparent;
}
.wf-track > i.done {
  background: var(--text-2);
}
.wf-track > i.run {
  background-color: var(--agent);
  background-image: repeating-linear-gradient(-45deg, transparent 0 4px, var(--agent-soft) 4px 6px);
  background-size: 17px 100%;
  animation: wf-crawl 0.9s linear infinite;
}
.wf-track > i.needs {
  background: var(--human-fill);
}
.wf-track > i.failed {
  background: var(--danger);
}
.wf-track > i.skip {
  background: transparent;
  border: 1px dashed var(--line-strong);
}
.wf-track.lg > i {
  height: 8px;
}
.wf-trackline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wf-trackline .wf-track {
  flex: 1;
}
.wf-trackline .mono {
  color: var(--text-3);
  white-space: nowrap;
}
@keyframes wf-crawl {
  to {
    background-position: 17px 0;
  }
}

/* AgentChip ---------------------------------------------------------- */
.wf-agent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 13px/18px var(--font-sans);
  color: var(--text);
  white-space: nowrap;
}
.wf-agent .av {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: var(--agent-soft);
  color: var(--agent);
  font: 600 10.5px/1 var(--font-sans);
}
.wf-agent .role {
  font-weight: 400;
  color: var(--text-3);
}
.wf-agent.lg .av {
  width: 32px;
  height: 32px;
  font-size: 13px;
}
.wf-agent.person .av {
  background: var(--human-soft);
  color: var(--human);
}

/* OriginTag ---------------------------------------------------------- */
.wf-origin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font: 500 12px/1 var(--font-sans);
  white-space: nowrap;
}
.wf-origin .i {
  width: 13px;
  height: 13px;
}

/* TaskSummary -------------------------------------------------------- */
.wf-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
}
.wf-summary > button {
  all: unset;
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-left: 1px solid var(--line);
  cursor: pointer;
}
.wf-summary > button:first-child {
  border-left: 0;
}
.wf-summary > button:hover {
  background: var(--raised);
}
.wf-summary > button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.wf-summary .n {
  font: 500 22px/28px var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.wf-summary .needs .n {
  color: var(--human);
}
.wf-summary .basis {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
}
@media (max-width: 640px) {
  .wf-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wf-summary > button:nth-child(3) {
    border-left: 0;
  }
  .wf-summary > button:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* FilterBar ---------------------------------------------------------- */
.wf-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wf-seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}
.wf-seg > button {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  font: 500 13px/1 var(--font-sans);
  color: var(--text-2);
  cursor: pointer;
}
.wf-seg > button:hover {
  color: var(--text);
}
.wf-seg > button[aria-pressed="true"] {
  background: var(--raised);
  color: var(--text);
}
.wf-seg > button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.wf-seg .c {
  font: 500 11.5px/1 var(--font-mono);
  color: var(--text-3);
}
.wf-seg .needs .c {
  color: var(--human);
}
.wf-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text-2);
  font: 400 13px/1 var(--font-sans);
  cursor: pointer;
}
.wf-select b {
  font-weight: 500;
  color: var(--text);
}
.wf-select select {
  min-width: 0;
  text-overflow: ellipsis;
}
.wf-select .i {
  margin-left: -2px;
  color: var(--text-3);
  pointer-events: none;
}
.wf-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  min-width: 0;
  flex: 1 1 200px;
  max-width: 320px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text-3);
  font: 400 13px/1 var(--font-sans);
}

/* TaskRow ------------------------------------------------------------ */
.wf-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
}
.wf-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 8px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.wf-list > .wf-group:first-child {
  border-top: 0;
}
.wf-group.needs .wf-label {
  color: var(--human);
}
.wf-task {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) 150px 64px 76px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.wf-group + .wf-task {
  border-top: 0;
}
.wf-task:hover {
  background: var(--raised);
}
.wf-task .what {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.wf-task .title {
  overflow: hidden;
  font-weight: 500;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-task .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
}
.wf-task .cost,
.wf-task .when {
  font: 400 12.5px/18px var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  text-align: right;
  white-space: nowrap;
}
.wf-task .when {
  color: var(--text-3);
}
.wf-task .ask {
  color: var(--human);
  font-weight: 500;
}
@media (max-width: 720px) {
  .wf-task {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "what when" "status cost" "track track";
    gap: 6px 12px;
  }
  .wf-task .what {
    grid-area: what;
  }
  .wf-task .wf-status {
    grid-area: status;
  }
  .wf-task .wf-trackline {
    grid-area: track;
  }
  .wf-task .cost {
    grid-area: cost;
  }
  .wf-task .when {
    grid-area: when;
  }
}

/* TaskHeader --------------------------------------------------------- */
.wf-head {
  display: grid;
  gap: 12px;
}
.wf-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-3);
}
.wf-crumbs a {
  color: var(--text-2);
  text-decoration: none;
}
.wf-crumbs a:hover {
  text-decoration: underline;
}
.wf-head .row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
}
.wf-head h1 {
  margin: 0;
  font: 600 28px/34px var(--font-sans);
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--text);
}
.wf-head .actions {
  display: flex;
  gap: 8px;
}
.wf-head .facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 12.5px;
  color: var(--text-3);
}
.wf-head .facts .mono {
  color: var(--text-2);
}
.wf-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 12.5px/18px var(--font-sans);
  color: var(--agent);
}
.wf-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--agent);
  animation: wf-pulse 1.6s ease-in-out infinite;
}
.wf-live.idle {
  color: var(--text-3);
}
.wf-live.idle::before {
  background: var(--text-3);
  animation: none;
}
@keyframes wf-pulse {
  50% {
    opacity: 0.3;
  }
}

/* StepItem ----------------------------------------------------------- */
.wf-plan {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wf-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0 12px;
  position: relative;
  padding-bottom: 20px;
}
.wf-step::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 26px;
  bottom: 2px;
  width: 2px;
  border-radius: 1px;
  background: var(--line);
}
.wf-step:last-child {
  padding-bottom: 0;
}
.wf-step:last-child::before {
  display: none;
}
.wf-step .n {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--panel);
  font: 500 12px/1 var(--font-mono);
  color: var(--text-2);
}
.wf-step.done .n {
  border-color: var(--text-2);
  background: var(--text-2);
  color: var(--panel);
}
.wf-step.run .n {
  border-color: var(--agent);
  color: var(--agent);
  box-shadow: 0 0 0 3px var(--agent-soft);
}
.wf-step.needs .n {
  border-color: var(--human-fill);
  background: var(--human-fill);
  color: var(--on-human);
}
.wf-step.failed .n {
  border-color: var(--danger);
  color: var(--danger);
}
.wf-step.done::before {
  background: var(--text-2);
}
.wf-step .body {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-top: 3px;
}
.wf-step .goal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  font-weight: 500;
}
.wf-step .result {
  margin: 0;
  color: var(--text-2);
}
.wf-step.pending .result,
.wf-step.pending .goal {
  color: var(--text-3);
}
.wf-step .evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wf-step .foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font: 400 12px/16px var(--font-mono);
  color: var(--text-3);
}
.wf-step .foot button {
  all: unset;
  color: var(--agent);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
}
.wf-step .foot button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Citation ----------------------------------------------------------- */
.wf-cite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 26px;
  padding: 0 8px 0 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font: 400 12.5px/1 var(--font-sans);
  text-decoration: none;
}
.wf-cite:hover {
  border-color: var(--line-strong);
  background: var(--raised);
}
.wf-cite .k {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text-2);
  font: 500 11px/1 var(--font-mono);
}
.wf-cite .src {
  font: 400 12px/1 var(--font-mono);
  color: var(--text-3);
}
.wf-cite .ttl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-cite.query .ttl {
  font-style: italic;
  color: var(--text-2);
}
.wf-cite .i {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}
.wf-ref {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin: 0 1px;
  padding: 0 3px;
  border-radius: var(--radius-sm);
  background: var(--agent-soft);
  color: var(--agent);
  font: 500 10.5px/1 var(--font-mono);
  vertical-align: 2px;
  text-decoration: none;
}

/* GateCard ----------------------------------------------------------- */
.wf-gate {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--human-soft);
  color: var(--text);
}
.wf-gate .top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.wf-gate .top .i {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  fill: var(--human-fill);
  stroke: var(--human);
  stroke-width: 2;
}
.wf-gate h3 {
  margin: 0;
  font: 600 15px/22px var(--font-sans);
  color: var(--text);
}
.wf-gate .who {
  margin: 0;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--human);
  font-weight: 500;
}
.wf-gate p {
  margin: 0;
  color: var(--text-2);
}
.wf-gate dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 16px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--panel);
  font: 400 12.5px/18px var(--font-mono);
}
.wf-gate dt {
  color: var(--text-3);
}
.wf-gate dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}
.wf-gate textarea {
  width: 100%;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font: 400 14px/21px var(--font-sans);
  resize: vertical;
}
.wf-gate .acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wf-gate .acts .spacer {
  flex: 1;
}
.wf-gate .acts .exp {
  font: 400 12px/16px var(--font-mono);
  color: var(--human);
}

/* ToolCall ----------------------------------------------------------- */
.wf-timeline {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
}
.wf-call {
  display: grid;
  grid-template-columns: 64px 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}
.wf-call:first-child {
  border-top: 0;
}
.wf-call .at {
  font: 400 12px/20px var(--font-mono);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.wf-call > .i {
  margin-top: 2px;
  color: var(--text-3);
}
.wf-call.tool > .i {
  color: var(--agent);
}
.wf-call.person > .i {
  color: var(--human);
}
.wf-call .what {
  min-width: 0;
}
.wf-call .tool-name {
  font: 500 12.5px/20px var(--font-mono);
  color: var(--agent);
}
.wf-call .sum {
  color: var(--text);
  overflow-wrap: anywhere;
}
.wf-call .out {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 500 12px/20px var(--font-sans);
  white-space: nowrap;
  color: var(--text-3);
}
.wf-call .out.ok {
  color: var(--ok);
}
.wf-call .out.failed {
  color: var(--danger);
}
.wf-call .out.refused {
  color: var(--text-2);
}
.wf-call .out .mono {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
}
.wf-call details {
  grid-column: 3 / -1;
}
.wf-call summary {
  width: max-content;
  font-size: 12.5px;
  color: var(--text-3);
  cursor: pointer;
  list-style: none;
}
.wf-call summary::-webkit-details-marker {
  display: none;
}
.wf-call summary::before {
  content: "▸ ";
}
.wf-call details[open] summary::before {
  content: "▾ ";
}
.wf-call pre {
  margin: 6px 0 0;
  padding: 10px 12px;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text-2);
  font: 400 12px/17px var(--font-mono);
}

/* SpendMeter --------------------------------------------------------- */
.wf-spend {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.wf-spend .fig {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.wf-spend .fig .n {
  font: 500 22px/28px var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.wf-spend .fig .of {
  font-size: 12.5px;
  color: var(--text-3);
}
.wf-spend .bar {
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--line);
  overflow: hidden;
}
.wf-spend .bar > i {
  display: block;
  height: 100%;
  border-radius: var(--radius-sm);
  background: var(--text-2);
}
.wf-spend .bar.near > i {
  background: var(--human-fill);
}
.wf-spend .bar.over > i {
  background: var(--danger);
}
.wf-spend dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  margin: 0;
  font-size: 12.5px;
  line-height: 18px;
}
.wf-spend dt {
  color: var(--text-3);
}
.wf-spend dd {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  text-align: right;
}

/* Deliverable -------------------------------------------------------- */
.wf-doc {
  display: grid;
  gap: 12px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.wf-doc .hd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wf-prose {
  max-width: 68ch;
  color: var(--text);
}
.wf-prose > * {
  margin: 0 0 10px;
}
.wf-prose > *:last-child {
  margin-bottom: 0;
}
.wf-prose h2 {
  font: 600 15px/22px var(--font-sans);
  margin-top: 16px;
}
.wf-prose h3 {
  font: 600 14px/21px var(--font-sans);
}
.wf-prose ul,
.wf-prose ol {
  padding-left: 20px;
}
.wf-prose li + li {
  margin-top: 4px;
}
.wf-prose code {
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  background: var(--raised);
  font: 400 12.5px/1 var(--font-mono);
}
.wf-prose blockquote {
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
  color: var(--text-2);
}
.wf-doc .sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .wf-status.running .i,
  .wf-track > i.run,
  .wf-live::before {
    animation: none;
  }
}

/* The tasks view (03/05): its own layout around the components, in token values only. ------------ */
/* A row sits in an item with its Decide control and card, so the item carries the row's hairline. */
.tasks-item {
  border-top: 1px solid var(--line);
}
.wf-group + .tasks-item {
  border-top: 0;
}
.tasks-item > .wf-task {
  border-top: 0;
}
/* The approved TaskRow cuts a long title with an ellipsis; the tasks view's mocks wrap it instead. */
.tasks-item .wf-task .title,
.agent-tasks > .wf-task .title {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tasks-decide {
  padding: 0 var(--space-4) var(--space-2) 156px;
  margin-top: calc(-1 * var(--space-2));
}
.tasks-open {
  display: grid;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-4) 156px;
}
.tasks-open .wf-gate.decided {
  border-radius: var(--radius-md);
}
.tasks-showing {
  margin: 0;
  color: var(--text-3);
  font-size: 12.5px;
}
.tasks-more {
  all: unset;
  color: var(--agent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.tasks-more:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.tasks-more:disabled {
  color: var(--text-3);
  cursor: default;
}
.tasks-placeholder {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
}
.tasks-placeholder:first-child {
  border-top: 0;
}
.tasks-placeholder > span {
  display: block;
  height: 37px;
  border-radius: var(--radius-sm);
  background: var(--raised);
}
.tasks-placeholder.figure {
  padding: 0;
  border: 0;
}
.tasks-placeholder.figure > span {
  width: 40px;
  height: 28px;
}
.tasks-placeholder.card {
  padding: 0;
  border: 0;
}
.tasks-placeholder.card > span {
  height: 120px;
  border-radius: var(--radius-lg);
}
.wf-summary > .tasks-cell {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-left: 1px solid var(--line);
}
.wf-summary > .tasks-cell:first-child {
  border-left: 0;
}
.tasks-filters.tasks-pending .wf-seg .c {
  visibility: hidden;
}
.empty .wf-btn {
  margin-top: var(--space-2);
}
.tasks-new {
  display: grid;
  gap: var(--space-3);
  max-width: 640px;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.tasks-new h2 {
  margin: 0;
  font: 600 15px/22px var(--font-sans);
  color: var(--text);
}
.tasks-new .field {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}
.tasks-new :is(select, textarea, input) {
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font: 400 14px/21px var(--font-sans);
}
.tasks-new textarea.mono {
  font: 400 12.5px/18px var(--font-mono);
}
.tasks-new :is(select, textarea, input):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.tasks-new .need {
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 500;
}
.tasks-new .acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
@media (max-width: 720px) {
  .tasks-decide,
  .tasks-open {
    padding-left: var(--space-4);
  }
  .tasks-decide {
    margin-top: 0;
  }
  .tasks-item .wf-task,
  .agent-tasks > .wf-task {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "title title title when"
      "status agent origin ."
      "ask ask ask ask"
      "track track track cost";
    gap: 6px 10px;
  }
  .tasks-item .wf-task :is(.what, .meta),
  .agent-tasks > .wf-task :is(.what, .meta) {
    display: contents;
  }
  .tasks-item .wf-task .title,
  .agent-tasks > .wf-task .title {
    grid-area: title;
    min-width: 0;
  }
  .tasks-item .wf-task .wf-status,
  .agent-tasks > .wf-task .wf-status {
    grid-area: status;
  }
  .tasks-item .wf-task .wf-agent,
  .agent-tasks > .wf-task .wf-agent {
    grid-area: agent;
  }
  .tasks-item .wf-task .wf-origin,
  .agent-tasks > .wf-task .wf-origin {
    grid-area: origin;
    justify-self: start;
  }
  .tasks-item .wf-task .source,
  .agent-tasks > .wf-task .source {
    display: none;
  }
  .tasks-item .wf-task :is(.ask, .reason),
  .agent-tasks > .wf-task :is(.ask, .reason) {
    grid-area: ask;
    font-size: 12.5px;
    line-height: 18px;
  }
  .tasks-item .wf-task .wf-trackline,
  .agent-tasks > .wf-task .wf-trackline {
    grid-area: track;
  }
  .tasks-item .wf-task .cost,
  .agent-tasks > .wf-task .cost {
    grid-area: cost;
  }
  .tasks-item .wf-task .when,
  .agent-tasks > .wf-task .when {
    grid-area: when;
    align-self: start;
    margin-top: 1px;
  }
  .tasks-item .wf-task .title,
  .agent-tasks > .wf-task .title {
    align-self: start;
  }
  /* An agent's page lists its rows without the agent chip (03/07 F-36), so the row's second line
     carries the source where the tasks view has the agent. */
  .agent-tasks > .wf-task {
    grid-template-areas:
      "title title title when"
      "status origin source source"
      "ask ask ask ask"
      "track track track cost";
  }
  .agent-tasks > .wf-task .source {
    display: block;
    grid-area: source;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 640px) {
  .tasks-new {
    padding: var(--space-4);
  }
  .tasks-new .acts .wf-btn {
    height: 44px;
  }
  .wf-summary > .tasks-cell:nth-child(3) {
    border-left: 0;
  }
  .wf-summary > .tasks-cell:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
/* On a phone the header is the title with Live under it and New task beside them; the sentence is
   left out (phone-tasks-390.png). The filter selects are an even pair at touch height, with the search
   on its own line. */
@media (max-width: 640px) {
  .tasks-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title new" "live new";
    align-items: center;
    gap: 2px 12px;
  }
  .tasks-head > div,
  .tasks-head > .end {
    display: contents;
  }
  .tasks-head .page-title {
    grid-area: title;
  }
  .tasks-head p {
    display: none;
  }
  .tasks-head .wf-live {
    grid-area: live;
    justify-self: start;
  }
  .tasks-head .wf-btn.primary {
    grid-area: new;
    height: 44px;
  }
  .tasks-filters .wf-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tasks-filters .wf-seg {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .tasks-filters .wf-select {
    height: 40px;
    min-width: 0;
  }
  .tasks-filters .wf-select select {
    flex: 1;
  }
  .tasks-filters .wf-search {
    grid-column: 1 / -1;
    height: 40px;
    max-width: none;
  }
}
/* At tablet widths the row gives the title the room the fixed columns took, so a title wraps to two
   lines rather than four, and the Decide control and card keep to the title column. */
@media (min-width: 721px) and (max-width: 1024px) {
  .tasks-item .wf-task,
  .agent-tasks > .wf-task {
    grid-template-columns: 96px minmax(0, 1fr) 112px 60px 52px;
    gap: 12px;
  }
  .tasks-decide,
  .tasks-open {
    padding-left: 124px;
  }
}

/* The task page (03/06): its own layout around the components, in token values only. ------------- */
.task-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  min-width: 0;
}
.task-page .wf-head {
  grid-template-columns: minmax(0, 1fr);
}
.task-page .wf-head h1 {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* A long reason wraps inside the pill rather than widening the header. */
.task-page .wf-head .wf-status.pill {
  height: auto;
  min-height: 24px;
  max-width: 100%;
  white-space: normal;
}
.task-page .wf-head .actions {
  flex-wrap: wrap;
  align-items: center;
}
.task-page .wf-head .actions .confirm {
  font-weight: 500;
  color: var(--text);
}
.task-page .wf-head .actions .notice {
  margin: 0;
}
.task-page .wf-head .actions a.wf-btn {
  text-decoration: none;
}
.task-agent {
  color: inherit;
  text-decoration: none;
}
.task-meta {
  color: var(--text-3);
  font-size: 12.5px;
}
.task-link {
  all: unset;
  justify-self: start;
  color: var(--agent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.task-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.task-link:disabled {
  color: var(--text-3);
  cursor: default;
}
.task-cols,
.agent-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  min-width: 0;
}
.task-cols > .main,
.task-cols > .side,
.agent-cols > .main,
.agent-cols > .side {
  display: grid;
  align-content: start;
  gap: var(--space-5);
  min-width: 0;
}
.task-cols > .side,
.agent-cols > .side {
  gap: var(--space-4);
}
/* The side column sits beside the main column from 960px, and under it below. */
@media (min-width: 960px) {
  .task-cols,
  .agent-cols {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
}
.task-cols h2:focus {
  outline: none;
}
.task-cols h2:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.task-decisions,
.task-decision,
.task-result {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}
.task-decisions .notice {
  margin: 0;
}
.task-wait,
.task-none {
  margin: 0;
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--raised);
  color: var(--text-2);
}
.task-none {
  background: var(--panel);
  border: 1px solid var(--line);
}
.task-unknowns ul {
  margin: var(--space-2) 0 0;
  padding-left: 20px;
  color: var(--text-2);
}
.task-private {
  margin: 0;
  color: var(--text-2);
}
.task-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.task-why,
.task-evidence {
  color: var(--text-2);
}
.task-attempt {
  display: block;
  color: var(--text-2);
}
.task-brief {
  max-width: none;
}
.wf-call .by {
  font-size: 12.5px;
  color: var(--text-3);
}
/* Long sources wrap inside their step instead of widening the page. */
.task-page .wf-cite {
  height: auto;
  min-height: 26px;
  padding-top: 3px;
  padding-bottom: 3px;
}
.task-page .wf-cite .ttl,
.task-page .wf-cite .src {
  white-space: normal;
  overflow-wrap: anywhere;
}
.task-page .wf-step .result,
.task-page .wf-step .goal span {
  overflow-wrap: anywhere;
}
/* Loading: the frames show at once, with placeholder bars on the raised ground. */
.task-ph {
  display: grid;
  gap: var(--space-3);
}
.task-ph > span {
  display: block;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--raised);
}
.task-ph.title > span {
  width: min(480px, 80%);
  height: 34px;
}
.task-ph.box > span {
  height: 160px;
  border-radius: var(--radius-lg);
}
.task-error-acts {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
}
/* The phone's actions follow everything else; on wider screens they are in the header. */
.task-foot-actions {
  display: none;
}
@media (max-width: 640px) {
  .task-page .wf-head .task-head-actions {
    display: none;
  }
  .task-cols {
    display: flex;
    flex-direction: column;
  }
  .task-cols > .main,
  .task-cols > .side {
    display: contents;
  }
  .task-cols [data-region="decisions"] {
    order: 2;
  }
  .task-cols [data-region="plan"] {
    order: 3;
  }
  .task-cols [data-region="result"] {
    order: 4;
  }
  .task-page.is-done .task-cols [data-region="result"] {
    order: 1;
  }
  .task-page.is-open .task-cols [data-region="result"] {
    display: none;
  }
  .task-cols [data-region="cost"] {
    order: 5;
  }
  .task-cols [data-region="activity"] {
    order: 6;
  }
  .task-cols [data-region="why"],
  .task-cols [data-region="sources"],
  .task-cols [data-region="evidence"] {
    order: 7;
  }
  .task-cols [data-region="details"] {
    order: 8;
  }
  .task-foot-actions {
    order: 9;
    display: grid;
    gap: var(--space-2);
  }
  .task-foot-actions .wf-btn,
  .task-cols .wf-gate .acts .wf-btn {
    flex: 1 1 100%;
    justify-content: center;
    min-height: 44px;
    text-decoration: none;
  }
  .task-cols .wf-gate .acts .confirm {
    flex: 1 1 100%;
  }
}

/* Agent page (03/07) ---------------------------------------------------- */
.agent-page {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}
.agent-page .wf-head .row > * {
  min-width: 0;
}
.agent-id {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.agent-disc {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--agent-soft);
  color: var(--agent);
  font: 600 17px/1 var(--font-sans);
}
.agent-page .wf-head h1 {
  overflow-wrap: anywhere;
}
.agent-line {
  margin: 2px 0 0;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.agent-page .wf-head .actions a.wf-btn {
  text-decoration: none;
}
/* The head's first row (08 DESIGN surface 4): the quiet "‹ Agents" back link, then the breadcrumb,
   on one line in every state. The row never wraps: the last crumb, the agent's name, ends in an
   ellipsis when it runs out of room. The back link's −8px margin lines its glyph up with the page's
   left edge, as the top bar's back does. The head is one column no wider than the page, so the row
   clips its last crumb rather than widening the head. */
.agent-page .wf-head {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.agent-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.agent-trail .back {
  flex: none;
  margin-left: -8px;
  text-decoration: none;
}
/* The breadcrumb takes the row's height and centres its crumbs in it, so its top is the link's. */
.agent-trail .wf-crumbs {
  align-self: stretch;
  min-width: 0;
}
.agent-trail .wf-crumbs > * {
  flex: none;
}
.agent-trail .wf-crumbs > :last-child {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-see-all {
  font-size: 13px;
}
.wf-status.queued .i {
  stroke: var(--text-3);
}
.agent-convs ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.agent-conv {
  display: grid;
  gap: var(--space-1);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.agent-conv.last {
  padding-bottom: 0;
  border-bottom: 0;
}
.agent-conv .main {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}
a.main:hover .name {
  text-decoration: underline;
}
.agent-conv .top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
}
.agent-conv .name {
  min-width: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.agent-conv .top .mono {
  flex: none;
}
.agent-conv .line,
.agent-answered {
  font-size: 12.5px;
  line-height: 18px;
}
.agent-answered {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-2);
  color: var(--text-3);
}
.agent-answered [role="alert"] {
  color: var(--danger);
}
/* The side boxes' labels are headings and the tools a list: neither keeps the browser's margins, so
   each box's label sits where Spend's does (03/07 F-38). */
.agent-page .side .box > h2 {
  margin: 0;
}
.agent-tools .kv {
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  margin: 0;
}
.agent-tools .tool {
  color: var(--agent);
  overflow-wrap: anywhere;
}
.agent-tools dd.needs {
  color: var(--human);
}
/* The Directory account box (06 DESIGN surface 3): the facts are the side column's kv list; the notice
   and its Retry sit under them, and the actions of No account in a row. */
.agent-directory {
  min-width: 0;
}
/* The side column is 280px wide, so a long address would wrap mid-word beside its term: each term
   sits over its value instead. */
.agent-directory .kv {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.agent-directory .kv dd {
  margin-bottom: 8px;
}
.agent-directory .kv .wf-status {
  font: inherit;
  color: inherit;
}
.agent-directory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.agent-directory-error {
  margin: 0;
  color: var(--danger);
}
.agent-directory-notice {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
}
.agent-directory-link {
  display: grid;
  gap: var(--space-2);
}
.agent-directory select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
}
/* The agents index: the tasks view's row grammar, on panel at radius-lg. */
.agent-index {
  margin: 0;
  padding: 0;
  list-style: none;
}
.agent-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 124px minmax(0, 3fr);
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
  min-width: 0;
}
.agent-row:first-child {
  border-top: 0;
}
.agent-row:hover {
  background: var(--raised);
}
.agent-row a {
  color: var(--text);
  text-decoration: none;
}
.agent-row a:hover {
  text-decoration: underline;
}
.agent-row .who .wf-agent {
  flex-wrap: wrap;
  white-space: normal;
}
.agent-row .now {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.agent-row .now .title {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.agent-row .now .activity {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  .agent-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "who state"
      "now now";
    gap: var(--space-2) var(--space-3);
  }
  .agent-row .who {
    grid-area: who;
  }
  .agent-row .state {
    grid-area: state;
  }
  .agent-row .now {
    grid-area: now;
  }
  .agent-row .now:empty {
    display: none;
  }
}
@media (max-width: 640px) {
  .agent-trail .back {
    min-width: 44px;
    height: 44px;
  }
  .agent-page .wf-head .actions {
    flex-direction: column;
    width: 100%;
  }
  .agent-page .wf-head .actions .wf-btn {
    width: 100%;
    height: auto;
    min-height: 44px;
  }
  /* The chat link stays one line: a long name ends in an ellipsis, as the back-link row's last crumb
     does (08 F-16). Its words stay whole for a screen reader. */
  .agent-page .wf-head .actions {
    min-width: 0;
  }
  .agent-page .wf-head .actions .wf-btn {
    min-width: 0;
    max-width: 100%;
  }
  .agent-page .wf-head .chat-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .agent-answered .task-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Sign-in page and sign out (ADR-006; DESIGN.md "Sign-in page") ------- */
.sign-in {
  min-height: 100vh;
  padding: 30vh 16px 32px;
  background: var(--bg);
}
.sign-in-panel {
  display: grid;
  gap: var(--space-4);
  max-width: 400px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.sign-in-panel .brand {
  margin: 0;
  font: 600 16px/1 var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--text);
}
.sign-in-panel h1 {
  margin: 0;
  font: 600 20px/26px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--text);
}
.sign-in-panel .field {
  display: grid;
  gap: var(--space-1);
}
.sign-in-panel .field .wf-label {
  color: var(--text-2);
}
.sign-in-panel input {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font: 400 14px/21px var(--font-sans);
}
.sign-in-panel input:focus-visible {
  outline: 2px solid var(--agent);
  outline-offset: 1px;
}
.sign-in-panel .wf-btn {
  width: 100%;
  height: 36px;
}
.sign-in-panel .message {
  min-height: 21px;
  margin: 0;
  color: var(--text-2);
  font: 400 14px/21px var(--font-sans);
}
.sign-in-panel .message.error {
  color: var(--danger);
}
.shell-bar .viewer {
  position: relative;
}
.shell-bar .viewer .person {
  height: auto;
  padding: 4px;
}
.shell-bar .person-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--raised);
  box-shadow: var(--shadow-pop);
}
.shell-bar nav .sign-out {
  display: none;
}
@media (max-width: 640px) {
  .sign-in {
    padding-top: 15vh;
  }
  .sign-in-panel {
    padding: 24px;
  }
  .shell-bar nav.open .sign-out {
    display: inline-flex;
    justify-content: flex-start;
    height: 44px;
    padding: 0 12px;
  }
}

/* Directory section (05/03; DESIGN.md "Directory section"): the tenant admin page's region, laid out
   around the components above in token values only. Administration's stylesheet carries the
   components and this block, and nothing between them (build.mjs). -------------------------------- */
.wf-directory {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.wf-directory h2 {
  margin: 0;
  font: 600 17px/24px var(--font-sans);
  letter-spacing: normal;
  color: var(--text);
}
.wf-directory h3 {
  margin: 0;
  font: 600 13.5px/20px var(--font-sans);
  color: var(--text);
}
.wf-directory p {
  margin: 0;
}
.wf-directory .hd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
}
.wf-directory .lede {
  color: var(--text-2);
}
.wf-directory .mono {
  overflow-wrap: anywhere;
}
.wf-directory .provider,
.wf-directory .asked {
  display: grid;
  gap: var(--space-2);
}
.wf-directory .prov {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
}
.wf-directory .prov b {
  font-weight: 600;
}
.wf-directory .acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.wf-directory .rows,
.wf-directory .checks {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.wf-directory .rows > li {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.wf-directory .why {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-2);
}
.wf-directory .checks > li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.wf-directory .what {
  min-width: 0;
  overflow-wrap: anywhere;
}
.wf-directory .what small {
  display: block;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
}
.wf-directory .dir-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  font-size: 13.5px;
  line-height: 20px;
}
.wf-directory .dir-facts dt {
  color: var(--text-3);
}
.wf-directory .dir-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
/* A warning uses the danger and neutral notice styles, never saffron (DESIGN rule 1). */
.wf-directory .dir-notice {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--text);
}
.wf-directory .dir-notice .top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--danger);
}
.wf-directory .dir-notice .top .i {
  margin-top: 2px;
}
.wf-directory .dir-notice.plain {
  background: var(--raised);
}
.wf-directory .dir-notice.plain .top {
  color: var(--text);
}
.wf-directory .dir-notice.ok {
  background: var(--ok-soft);
}
.wf-directory .dir-notice.ok .top {
  color: var(--ok);
}
.wf-directory .dir-notice.dismissible {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.wf-directory .dir-error {
  font-size: 13px;
  line-height: 19px;
  color: var(--danger);
}
.wf-directory .hint,
.wf-directory .ts {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
}
.wf-directory .sep {
  height: 1px;
  background: var(--line);
}
.wf-directory form,
.wf-directory fieldset {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
.wf-directory fieldset {
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}
.wf-directory legend {
  margin-bottom: 6px;
  padding: 0;
  font: 600 13.5px/20px var(--font-sans);
  color: var(--text);
}
.wf-directory .opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
}
.wf-directory .domain {
  display: grid;
  gap: 6px;
}
.wf-directory .domain label {
  font-size: 13.5px;
  font-weight: 600;
}
.wf-directory .domain input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font: 400 13.5px/1 var(--font-mono);
}
.wf-directory .confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.wf-directory .confirm a {
  font-size: 12.5px;
}
.wf-directory input[type="radio"],
.wf-directory input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  accent-color: var(--ink);
}
.wf-directory .confirm input {
  margin-top: 3px;
}
.wf-directory details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.wf-directory summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 14px;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  cursor: pointer;
}
.wf-directory summary::-webkit-details-marker {
  display: none;
}
.wf-directory summary .i {
  transform: rotate(-90deg);
}
.wf-directory details[open] > summary {
  border-bottom: 1px solid var(--line);
}
.wf-directory details[open] > summary .i {
  transform: none;
}
/* The body's gutter is 14px all round. The numerals are drawn at that gutter (not by the browser's
   outside marker, whose width follows the font), so the closing lines can sit on the same edge. */
.wf-directory .guide {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 14px 14px 0;
  list-style: decimal;
}
.wf-directory .guide > li {
  position: relative;
  padding-left: 22px;
  list-style: none;
  scroll-margin: var(--space-4);
}
.wf-directory .guide > li::before {
  content: counter(list-item) ".";
  position: absolute;
  left: 0;
  top: 0;
  font: inherit;
  color: var(--text-2);
}
.wf-directory .guide b {
  font-weight: 600;
}
.wf-directory .guide p,
.wf-directory .guide ul {
  margin-top: 2px;
  font-size: 13px;
  line-height: 19px;
  color: var(--text-2);
}
.wf-directory .guide ul {
  margin: 6px 0;
  padding-left: 18px;
  list-style: circle;
}
/* On a phone the actions stack full width, each easy to press. */
@media (max-width: 640px) {
  .wf-directory {
    padding: var(--space-4);
  }
  .wf-directory .acts {
    display: grid;
  }
  .wf-directory :is(.acts, .prov) .wf-btn {
    width: 100%;
    height: 44px;
  }
  /* An open Team groups row keeps its buttons at their own width, side by side (08/05 F-07). */
  .wf-directory .tg-form .acts .wf-btn {
    width: auto;
    padding: 0 16px;
  }
  .wf-directory .checks > li {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The account surfaces on the tenant page (06 DESIGN surfaces 1, 2 and 4): the agent rows' directory
   line and in-place Retire question, the editor's Directory account group, and the guide's closing lines. */
.acct-line {
  overflow-wrap: anywhere;
}
.acct-line .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.acct-error {
  margin: 0;
  font-size: 13px;
  line-height: 19px;
  color: var(--danger);
}
.acct-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}
/* The Retire question has the row's width to itself, with its two buttons under it. */
.acct-acts.asking {
  justify-content: flex-start;
}
.acct-ask {
  flex: 1 1 100%;
  min-width: 0;
  font-size: 13.5px;
  line-height: 20px;
  color: var(--text);
}
.acct-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.acct-group legend {
  padding: 0;
  margin-bottom: 6px;
}
.acct-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.acct-group input[type="radio"] {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--ink);
}
.acct-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.acct-group .mono,
.acct-group select {
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.wf-directory .guide-notes {
  display: grid;
  gap: 6px;
  padding: 14px;
}
.wf-directory .guide-notes p {
  font-size: 13px;
  line-height: 19px;
  color: var(--text-2);
}
.team-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.team-group legend {
  padding: 0;
  margin-bottom: 4px;
}
.team-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-weight: 400;
}
.team-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--ink);
}
/* The dialog sits outside .wf, so the .wf .mono and .wf .t3 rules don't reach the slug (m08 F-02). */
.team-row .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  overflow-wrap: anywhere;
}

/* The tenant admin page in sections (08 DESIGN surface 0, ADR-007): the head, the tab row, the
   sections' own layouts. Tokens only. ------------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-3);
}
.crumbs a {
  color: var(--text-2);
}
.tenant-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 20px;
  color: var(--text-2);
}
.tenant-facts .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  border-bottom: 1px solid var(--line);
}
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: -1px;
  padding: 0 4px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
}
.tabs a:hover {
  color: var(--text);
}
.tabs a[aria-current="page"] {
  border-bottom-color: var(--text);
  font-weight: 600;
  color: var(--text);
}
/* A plain mono figure, on no chip (board M08TenantAgents .tabs .n). */
.tabs .tab-count {
  font: 500 12px/1 var(--font-mono);
  color: var(--text-3);
}
/* The tenant page sits outside .wf, so its glyphs carry the system's line style themselves. */
:is(.tenant-facts, .acct-state, .glance-ok) .i {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tenant-section {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding-top: var(--space-3);
}
.tenant-section > *,
.admin-columns.overview > * {
  min-width: 0;
}
@media (max-width: 959px) {
  .admin-columns.overview {
    grid-template-columns: minmax(0, 1fr);
  }
}
.glance {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.glance > li {
  display: grid;
  gap: 2px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
}
.glance > li:first-child {
  border-top: 0;
}
.glance .glance-ok {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
}
/* "Open <section>" is the board's plain link. */
.glance a {
  justify-self: start;
  font-size: 13px;
  font-weight: 400;
  color: var(--agent);
}
.glance a:hover {
  color: var(--text);
}
/* A table wider than its box scrolls in the box, never the page (ADR-007 point 4). */
.table-scroll {
  container-type: inline-size;
  /* Positioned, so a visually hidden word inside it is clipped with the table, not placed beyond the page. */
  position: relative;
  max-width: 100%;
  overflow-x: auto;
}
.agent-table {
  min-width: 36rem;
}
.agent-table td {
  vertical-align: middle;
}
.agent-table .agent-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  white-space: nowrap;
}
.agent-table .acct-actions {
  min-width: 14rem;
}
.agent-table .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
/* The directory cell (board M08TenantAgents): the address in the text colour, then its state's glyph
   and word on their own line, in the state's tone. */
.agent-table .acct-line .mono {
  color: var(--text);
}
/* Only the address may break anywhere; the state keeps whole words, its glyph on the first line. */
.acct-state {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
  overflow-wrap: normal;
}
.acct-state .i {
  margin-top: 1.5px;
}
.acct-state.ok {
  color: var(--ok);
}
/* The section tables' header is the boards' quiet uppercase line, not Administration's grey band. */
:is(.agent-table, .tg-table) th {
  /* The cells' own inset, so a header sits over its column's words. */
  padding: 12px 20px 8px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font: 600 11px/14px var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
/* Administration's older .agent-row is a flex row; in the table a row is a row. */
.agent-table tr.agent-row {
  display: table-row;
  width: auto;
  padding: 0;
}
.agent-table tr.agent-row:hover {
  background: var(--raised);
}

/* The Directory section's panes (08 DESIGN surface 0 and 1). */
.wf-directory {
  padding: 0;
  border: 0;
  background: transparent;
}
.wf-directory > h2 {
  font: 600 20px/28px var(--font-sans);
}
.wf-directory .pane {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.wf-directory .pane > .hd > h2 {
  font: 600 17px/24px var(--font-sans);
}
.wf-directory .conn-cols {
  display: grid;
  gap: var(--space-4) var(--space-6, 32px);
  min-width: 0;
}
.wf-directory .conn-cols > * {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
}
/* Each column is as tall as its own content (board M08TeamGroups .conn), so the last-test card never
   stretches to the facts column's height. */
.wf-directory .conn-cols {
  align-items: start;
}
@media (min-width: 960px) {
  .wf-directory .conn-cols:not(.single) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
/* The last test sits in the board's quiet card (M08TeamGroups .test). */
.wf-directory .last-test {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg);
}
.wf-directory .last-test .disclose {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--agent);
  font: 400 13px/19px var(--font-sans);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.wf-directory .last-test .disclose:hover {
  color: var(--text);
}
.wf-directory .last-test .line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.wf-directory .last-test .line b {
  font-weight: 600;
}
.wf-directory .last-test .ts,
.wf-directory .last-test .t2 {
  color: var(--text-2);
  font-size: 13.5px;
}
.wf-directory .last-test [hidden] {
  display: none;
}
.wf-directory .tg-table {
  min-width: 40rem;
}
.wf-directory .tg-table th,
.wf-directory .tg-table td {
  vertical-align: top;
}
.wf-directory .tg-table .tg-actions {
  text-align: right;
  white-space: nowrap;
}
.wf-directory .tg-table .tg-actions .wf-btn + .wf-btn {
  margin-left: var(--space-2);
}
.wf-directory .tg-table small {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
}
.wf-directory .tg-table small .mono {
  font-size: 12px;
}
.wf-directory .tg-table .gone {
  color: var(--danger);
}
.wf-directory .tg-table tr.opened td {
  background: var(--raised);
}
/* An open row: the team beside its form. Sticky and no wider than the box, so on a phone the field, the
   refusal and the buttons stay inside what the box shows however far its table has been scrolled. The
   cell gives up its side inset to the block, so the block's right edge is the box's at scroll 0
   (08 F-13 item 1). */
.wf-directory .tg-table tr.opened td {
  padding-inline: 0;
}
.wf-directory .tg-open {
  position: sticky;
  left: 0;
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: var(--space-3);
  width: min(100cqw, 100%);
  padding-inline: 20px;
}
/* A refusal (board M08TeamGroupsMap): the danger title line, then the server's words in body text. */
.wf-directory .dir-notice.refusal {
  gap: 4px;
  padding: 12px 14px;
}
.wf-directory .dir-notice.refusal .top {
  align-items: center;
}
.wf-directory .dir-notice.refusal .top .i {
  margin-top: 0;
}
.wf-directory .tg-form {
  display: grid;
  gap: var(--space-2);
  max-width: 34rem;
}
.wf-directory .tg-form input {
  width: 100%;
}
.wf-directory .tg-form .acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
@media (max-width: 640px) {
  .wf-directory .tg-open {
    grid-template-columns: minmax(0, 1fr);
  }
}
.wf-directory .tg-result {
  font-size: 13.5px;
  line-height: 20px;
  color: var(--text-2);
}

/* Groups in the agent page's Directory account box (08 DESIGN surface 3). */
.agent-groups {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.agent-groups ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.agent-groups li {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
/* The address and the state share one line: a long address wraps beside the state, never under it. */
.agent-groups .group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.agent-groups .mono {
  min-width: 0;
  overflow-wrap: anywhere;
}
.agent-groups .group-head .wf-status {
  flex: none;
}
.agent-groups .groups-empty {
  margin: 0;
  color: var(--text-3);
}
.agent-groups .teams {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
}
/* A row's notice is body text on the danger-soft ground (board M08AgentGroups .gnote). */
.agent-groups .notice {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  padding: 12px 14px;
  background: var(--danger-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 19px;
}
.agent-groups .notice p {
  margin: 0;
  font-weight: 400;
}

/* The agent editor's group parts (08 DESIGN surface 2, board M08AgentEditorTeams): at the row's end, a
   mapped address in mono and "No group" in sans, both in text-3. On a phone the part takes its own line,
   left-aligned under the team's name (the checkbox's 16px and the row's 10px gap in). */
.team-row .group {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.team-row .group.mono {
  font-family: var(--font-mono);
}
@media (max-width: 640px) {
  .team-row .group {
    flex: 1 0 calc(100% - 26px);
    min-width: 0;
    margin-left: 26px;
    text-align: left;
  }
}
.team-group .hint {
  font-size: 13px;
  line-height: 19px;
  color: var(--text-3);
}

/* The Google client step (10 DESIGN "Google client step", boards M10Client*): two numbered steps in
   the Connection pane while not connected, a copyable redirect URI, one upload button over a native
   file input, and the refusal as an inline notice. Token values only. */
.wf-directory .steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wf-directory .steps > li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.wf-directory .steps > li:first-child {
  border-top: 0;
  padding-top: 4px;
}
.wf-directory .steps > li:last-child {
  padding-bottom: 0;
}
.wf-directory .steps .num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--raised);
  font: 500 12px/1 var(--font-mono);
  color: var(--text-2);
}
.wf-directory .steps .num.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.wf-directory .steps .num .i {
  width: 14px;
  height: 14px;
  stroke-width: 2.25;
}
.wf-directory .steps .body {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.wf-directory .steps .sh {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  min-height: 24px;
}
/* Numbered, as the checklist asks: .steps' list-style: none would otherwise inherit into the how-to. */
.wf-directory .howto {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  list-style: decimal;
  font-size: 13px;
  line-height: 19px;
  color: var(--text-2);
}
.wf-directory .howto b {
  font-weight: 600;
  color: var(--text);
}
.wf-directory .uri {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
}
.wf-directory .uri .mono {
  flex: 1;
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.wf-directory .upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.wf-directory label.wf-btn {
  cursor: pointer;
}
.wf-directory label.wf-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}
/* The file input stays in the page for the keyboard and the picker; only its box is hidden. */
.wf-directory .vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wf-directory .vh:focus-visible + label.wf-btn,
.wf-directory label.wf-btn:has(+ .vh:focus-visible) {
  outline: 2px solid var(--focus, var(--agent));
  outline-offset: 2px;
}
.wf-directory .reason {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-3);
}
.wf-directory .client {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}
.wf-directory .client .mono {
  min-width: 0;
  overflow-wrap: anywhere;
}
.wf-directory .dir-notice.refusal {
  gap: 4px;
  padding: 12px 14px;
}
.wf-directory .dir-notice.refusal .top {
  align-items: center;
}
.wf-directory .dir-notice.refusal .top .i {
  margin-top: 0;
}
.wf-directory .dir-notice.refusal .reason {
  color: var(--text-2);
}
.wf-directory .dir-notice b {
  font-weight: 600;
}
@media (max-width: 640px) {
  .wf-directory .upload {
    display: grid;
  }
  .wf-directory .uri {
    display: grid;
    padding: 10px 12px;
  }
  .wf-directory :is(.upload, .uri, .client) .wf-btn {
    width: 100%;
    height: 44px;
  }
}
