/* Value Machine. One stylesheet, no build step.
   The look: paper, ink, hairlines. Serif headings, a quiet sans for everything else, one accent,
   no shadows. Type and spacing carry the hierarchy; boxes stay out of the way. */

:root {
  --paper: #f7f5f0; --panel: #fffdf9; --ink: #1c1b18; --muted: #6f6b62; --faint: #a19c92;
  --line: #e3ded4; --line-strong: #c9c2b4;
  --accent: #1f3f5b; --accent-ink: #fffdf9; --accent-soft: #e6edf3;
  --good: #2f6b3a; --good-bg: #e7f0e6; --warn: #8a5a00; --warn-bg: #f6ecd2; --bad: #963038; --bad-bg: #f4e1e1;
  --neutral-bg: #eeeae2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Source Serif Pro", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: 1.85rem; line-height: 1.15; margin: 0 0 .25rem; }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
h3 { font-size: 1.02rem; margin: 0; }
h4 { font-size: .95rem; margin: 0 0 .5rem; }
.eyebrow, .muted.small.label, .org-head .eyebrow { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .83rem; }
.num { font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); font-style: italic; }
.error { color: var(--bad); font-size: .85rem; }
.problem { margin: .25rem 0; padding: .4rem .6rem; background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); }

/* shell */
.topbar { display: flex; align-items: baseline; gap: 1.25rem; padding: .8rem 1.5rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--ink); letter-spacing: -.01em; }
.crumbs { flex: 1; display: flex; gap: .5rem; align-items: baseline; color: var(--muted); font-size: .9rem; }
.crumbs .sep { color: var(--line-strong); }
.who { display: flex; align-items: baseline; gap: .9rem; font-size: .9rem; }
.who form { margin: 0; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.page { max-width: 1120px; margin: 2rem auto; padding: 0 1.5rem; }
.page.wide { max-width: 1400px; }
.flash { max-width: 1400px; margin: 1rem auto 0; padding: 0 1.5rem; }
.flash-item { padding: .6rem .9rem; border-radius: var(--radius); background: var(--neutral-bg); margin-bottom: .5rem; border-left: 3px solid var(--line-strong); }
.flash-item.success { background: var(--good-bg); color: var(--good); border-left-color: var(--good); }
.flash-item.error { background: var(--bad-bg); color: var(--bad); border-left-color: var(--bad); }
.notice { max-width: 560px; margin: 4rem auto; text-align: center; }
.entrance { width: min(400px, calc(100% - 3rem)); margin: 3rem auto; }
.entrance h1 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.entrance form { display: grid; gap: .8rem; }
.entrance input:not([type=checkbox]) { width: 100%; }
.sign-in .sign-in-options { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: .15rem 0 .4rem; }
.sign-in-options label { color: var(--muted); font-size: .83rem; }
.sign-in-options input { margin: 0; accent-color: var(--accent); }
.sign-in .sign-in-footer { margin: .4rem 0 0; text-align: center; }
.signup-field { display: grid; gap: .3rem; }
.signup-field ul { margin: .2rem 0 0; padding-left: 1.1rem; }

/* controls */
.user-search, .user-heading, .user-pagination { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.user-search { margin-bottom: 1.25rem; }
.user-search input { width: min(100%, 24rem); }
.page.staff-users { max-width: none; }
.user-card { margin-bottom: 1rem; }
.user-card button.small, .user-card select.small { box-sizing: border-box; height: 1.65rem; font-size: .75rem; line-height: 1.2; padding: 0 .45rem; }
.user-heading { justify-content: space-between; align-items: start; }
.user-heading h2 { font-size: 1.15rem; margin: 0 0 .35rem; overflow-wrap: anywhere; }
.user-heading p, .user-harnesses p { margin: 0 0 .4rem; }
.user-access { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .85rem; }
.user-access section { min-width: 0; }
.user-access h3 { font-size: .85rem; margin: 0 0 .65rem; }
.user-card form.user-membership { display: flex; align-items: start; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.membership-org { flex: 1; min-width: 8rem; overflow-wrap: anywhere; }
.user-membership select { max-width: 100%; }
.user-add { margin-top: .8rem; font-size: .85rem; }
.user-add summary { cursor: pointer; color: var(--accent); }
.user-harnesses { list-style: none; padding: 0; margin: 0; }
.user-harnesses li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: .5rem; margin-bottom: .5rem; }
.user-harnesses li > div { min-width: 0; overflow-wrap: anywhere; }
.user-harnesses li > .badge { box-sizing: border-box; display: inline-flex; align-items: center; height: 1.65rem; }
.user-card form.user-harness-actions { display: flex; gap: .3rem; margin: 0; }
.user-harness-actions button { white-space: nowrap; }
@media (max-width: 1000px) { .user-access { grid-template-columns: 1fr; gap: 1rem; } }
@media (max-width: 520px) {
  .user-harnesses li { grid-template-columns: minmax(0, 1fr) auto; }
  .user-card form.user-harness-actions { grid-column: 1 / -1; justify-self: end; }
}

button, .button { font: inherit; font-size: .9rem; padding: .45rem .9rem; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); cursor: pointer; line-height: 1.3; }
button:hover, .button:hover { border-color: var(--ink); text-decoration: none; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover { background: #17324a; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:disabled:hover { border-color: var(--line-strong); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: .2rem .5rem; }
button.small, .button.small, a.button.small { font-size: .8rem; padding: .3rem .65rem; }
input:not([type=checkbox]), select, textarea { font: inherit; padding: .45rem .6rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); color: var(--ink); }
select.small, input.small {
  font-size: .8rem;
  line-height: 1.3;
  padding: .3rem .65rem;
  height: calc(1.3em + .6rem + 2px);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label { display: grid; gap: .3rem; font-size: .9rem; }
label.inline { display: inline-flex; align-items: center; gap: .5rem; }
.field .label em { font-style: normal; color: var(--faint); font-size: .75rem; margin-left: .3rem; }
.field .help { color: var(--muted); font-size: .78rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.panel form, form.panel, .record-form { display: grid; gap: .8rem; align-items: start; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; }
.stack { display: grid; gap: 1.25rem; align-content: start; }

/* cards: a ruled list, not a stack of boxes */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.card { display: grid; gap: .25rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; color: var(--ink); }
.card:hover { border-color: var(--ink); text-decoration: none; }
.card-title { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }

/* home: organization → projects */
.org { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 2.5rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); }
.org:first-child { border-top: 0; padding-top: .5rem; }
.org-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .25rem; }
.org-head h1 { margin: 0; font-size: 2rem; }
.org .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.new-project { display: grid; gap: .6rem; align-content: start; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.new-project .row { display: flex; gap: .5rem; align-items: center; }
.new-project label.inline { display: grid; gap: .3rem; }
.new-project input[name=name] { width: 100%; }
.new-project .row select { flex: 1; }
.welcome { max-width: 520px; margin: 3rem auto; }
.welcome form { margin-top: 1rem; }
.plain { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .3rem; }
details summary { cursor: pointer; }
details form { margin-top: .5rem; }

/* project overview, canvas page */
.project-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.project-head .muted.small { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.project-head .muted.small a { color: inherit; }
/* where the project's code lives: one line under the description, above the canvases */
.project-repo { display: flex; align-items: center; gap: .4rem; margin-top: .35rem; font-size: .85rem; }
.project-repo .icon { width: 1rem; height: 1rem; color: var(--muted); flex: none; }
.project-repo .muted { font-size: .8rem; }
/* the project's code: how an agent connects to it, then its files, a folder at a time */
.code-connect { margin-bottom: 1.25rem; }
/* the git address is one short line: a compact dark chip sized to it, not a band across the panel */
/* (both classes: `.commands .command` further down would otherwise win and stretch it again) */
.commands.code-address .line { gap: .45rem; }
.commands.code-address .who { width: auto; }
.commands.code-address .command { flex: 0 1 auto; width: fit-content; max-width: 100%; padding: .12rem .45rem; }
.commands.code-address .copy-id { padding: .1rem .45rem; font-size: .72rem; }
/* the git address and the API key sit one above the other, so their labels share a width; a line
   wraps rather than pushing its buttons off a narrow screen */
.code-connect .commands.code-address { margin: .2rem 0 .6rem; }
.code-connect .commands.code-address .line { flex-wrap: wrap; }
.code-connect .commands.code-address .who { width: 5.2rem; }
.code-key .key-value { font-variant-ligatures: none; }
.code-key .danger-quiet { padding: .1rem .45rem; font-size: .72rem; }
.code-key .key-confirm { display: grid; gap: .45rem; max-width: 52ch; margin: .35rem 0 .2rem; }
.code-key .key-confirm p { margin: 0; }
.code-key .key-confirm .actions { display: flex; gap: .4rem; }
.code-key .problem { margin: .35rem 0 0; }
.code-key .key-once { margin: .35rem 0 0; color: var(--warn); }
.code-connect p { margin: 0 0 .5rem; }
.code-connect p:last-child { margin-bottom: 0; }
.code-trail { display: flex; flex-wrap: wrap; gap: .35rem; align-items: baseline; font-size: .95rem; min-width: 0; }
.code-trail .sep { color: var(--line-strong); }
table.code-list td { vertical-align: middle; }
table.code-list tr:last-child td { border-bottom: 0; }
table.code-list .entry { display: inline-flex; align-items: center; gap: .45rem; overflow-wrap: anywhere; }
table.code-list .icon { width: 1rem; height: 1rem; color: var(--muted); flex: none; }
table.code-list td.size, table.code-list td.take { width: 1%; text-align: right; white-space: nowrap; }
.code-file-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; margin-bottom: .6rem; }
.code-file-head .name { font-weight: 600; overflow-wrap: anywhere; }
.code-text { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; margin: 0; font-size: .8rem; line-height: 1.45; white-space: pre; overflow: auto; max-height: 70vh; }
.code-markdown { overflow-wrap: anywhere; line-height: 1.65; }
.code-markdown > :first-child { margin-top: 0; }
.code-markdown pre { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; overflow: auto; }
.code-markdown img { max-width: 100%; height: auto; }
.code-markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.code-markdown th, .code-markdown td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; }
.overview { margin-bottom: 1.5rem; }
.overview h2 .muted { font-weight: 400; font-family: var(--sans); font-size: .83rem; margin-left: .5rem; }
.canvas-card { min-height: 84px; }
.graph-card { border-style: dashed; }
.tabs { display: flex; gap: .1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tab { padding: .55rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .95rem; }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab:hover { text-decoration: none; color: var(--ink); }
.layout { display: grid; grid-template-columns: 1fr 220px; gap: 1.25rem; align-items: start; }
.side { position: sticky; top: 1rem; }
.side h3 { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: .5rem; }
.types { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .3rem; }
.types li { display: flex; gap: .5rem; align-items: baseline; }
.types li > :first-child { flex: 1; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .82rem; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem 1rem; min-height: 120px; }
.tile.htmx-request { opacity: .7; }
.canvas-empty { grid-column: 1 / -1; margin: 0; padding: 1rem 0; }
.span-1{grid-column:span 1}.span-2{grid-column:span 2}.span-3{grid-column:span 3}.span-4{grid-column:span 4}
.span-5{grid-column:span 5}.span-6{grid-column:span 6}.span-7{grid-column:span 7}.span-8{grid-column:span 8}
.span-9{grid-column:span 9}.span-10{grid-column:span 10}.span-11{grid-column:span 11}.span-12{grid-column:span 12}
.tile-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .6rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.tile-head h3 { flex: 1; }
.tile-head .table-type { display: inline-block; margin-left: .4rem; padding: .08rem .35rem; border: 1px solid var(--line); border-radius: var(--radius); font: 400 .65rem/1.3 var(--sans); letter-spacing: normal; color: var(--muted); vertical-align: middle; }
.tile-head .table-type:hover { color: var(--accent); border-color: var(--accent); }
.tile-head .add { color: var(--muted); }
.needs { font-size: .72rem; background: var(--warn-bg); color: var(--warn); padding: .1rem .5rem; border-radius: 999px; }
.toolbar { display: flex; gap: .5rem; margin-bottom: .6rem; }
.toolbar input[type=search] { flex: 1; max-width: 320px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; white-space: nowrap; }
th a { color: inherit; cursor: pointer; }
th.sorted a { color: var(--ink); }
tbody tr:hover { background: var(--paper); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; }
.pager a { cursor: pointer; }
.badge { display: inline-block; font-size: .76rem; padding: .08rem .55rem; border-radius: 999px; background: var(--neutral-bg); color: var(--ink); white-space: nowrap; border: 1px solid transparent; }
/* its own display outranks the browser's rule for [hidden], as a console line's did */
.badge[hidden] { display: none; }
.badge.tone-good { background: var(--good-bg); color: var(--good); }
.badge.tone-warn { background: var(--warn-bg); color: var(--warn); }
.badge.tone-bad { background: var(--bad-bg); color: var(--bad); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .25rem; }
.board .col { border-top: 2px solid var(--line-strong); padding: .6rem .2rem; min-height: 80px; min-width: 0; overflow-wrap: anywhere; }
.board .col.closed { opacity: .7; }
.board .col.tone-good { border-top-color: var(--good); }
.board .col.tone-bad { border-top-color: var(--bad); }
.board .col.tone-warn { border-top-color: var(--warn); }
.board h4 { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.board .card { grid-template-columns: minmax(0, 1fr); min-width: 0; margin-bottom: .5rem; padding: .55rem .7rem; overflow-wrap: anywhere; }
.board .card > * { min-width: 0; }
.board .card strong { font-family: var(--serif); font-weight: 600; }
.board .kv { color: var(--muted); font-size: .8rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; }
/* the map is a picture the markers sit on, so it stays quiet: the basemap style is already the
   pale one (positron), which is why there is no filter here any more - MapLibre draws to a canvas
   and filtering that would dim the markers with it */
.view-map .map-canvas { height: 420px; border-radius: var(--radius); background: var(--neutral-bg); overflow: hidden; position: relative; }
.map-canvas .maplibregl-popup-content { padding: .4rem .6rem; border-radius: var(--radius); }
.map-canvas .maplibregl-popup-content a { font-weight: 600; }
.map-canvas .yard-map-marker { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.map-canvas .yard-map-dot { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--ink); box-shadow: 0 1px 4px #0005; }
.map-canvas .yard-map-marker:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 50%; }
/* MapLibre sets its own type; match the page rather than its default sans stack */
.map-canvas .maplibregl-ctrl-attrib { font-family: var(--sans); font-size: .68rem; }
/* charts: thin marks on the tile's own paper, hairline grid, the page's ink for every word.
   One series takes the accent. Split series take these eight in a fixed order, checked for
   colour-blind separation between neighbours against the panel (dataviz validator, 2026-09-14:
   worst adjacent deltaE 11.7, normal-vision 19.9); the ochre sits under 3:1, which is why every
   chart has a legend beside it and its numbers below. Other and "no value" are grays. */
.view-chart { --series-1: #33689e; --series-2: #c4692a; --series-3: #1f9383; --series-4: #bf9a1a; --series-5: #9a4d84; --series-6: #4f8a36; --series-7: #7383d4; --series-8: #bd4f4b; --series-other: #8a8478; --series-none: #bdb5a6; --series-accent: var(--accent); }
.view-chart .chart { position: relative; margin: 0; }
.chart-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; margin-bottom: .35rem; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin: 0; padding: 0; list-style: none; font-size: .78rem; color: var(--ink); }
.chart-legend li { display: inline-flex; align-items: center; gap: .35rem; }
.chart-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--series-accent); }
.chart-line .chart-key, .chart-tip .chart-key { width: 14px; height: 2px; border-radius: 1px; }
.chart-plot { position: relative; width: 100%; height: 260px; }
.chart-plot svg { display: block; overflow: visible; }
.chart-plot text { font: 11px var(--sans); fill: var(--muted); }
.chart-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart-base { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; }
.chart-bar { stroke: none; }
.chart-path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { stroke: var(--panel); stroke-width: 2; }
.chart-hit { fill: transparent; cursor: default; outline: none; }
.chart-hit.opens { cursor: pointer; }
.chart-band { fill: var(--ink); opacity: .04; pointer-events: none; }
.chart-cross { stroke: var(--line-strong); stroke-width: 1; pointer-events: none; shape-rendering: crispEdges; }
.chart-tip { position: absolute; z-index: 5; min-width: 8rem; max-width: 16rem; padding: .4rem .55rem; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: .78rem; pointer-events: none; }
.chart-tip .tip-title { margin: 0 0 .2rem; color: var(--muted); }
.chart-tip .tip-row { display: grid; grid-template-columns: 14px auto 1fr; align-items: center; gap: .4rem; }
.chart-tip .tip-row strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip .tip-row span:last-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-chart .tone-accent { --tone: var(--series-accent); }
.view-chart .tone-1 { --tone: var(--series-1); }
.view-chart .tone-2 { --tone: var(--series-2); }
.view-chart .tone-3 { --tone: var(--series-3); }
.view-chart .tone-4 { --tone: var(--series-4); }
.view-chart .tone-5 { --tone: var(--series-5); }
.view-chart .tone-6 { --tone: var(--series-6); }
.view-chart .tone-7 { --tone: var(--series-7); }
.view-chart .tone-8 { --tone: var(--series-8); }
.view-chart .tone-other { --tone: var(--series-other); }
.view-chart .tone-none { --tone: var(--series-none); }
.view-chart .chart-key { background: var(--tone); }
.view-chart .chart-bar, .view-chart .chart-dot { fill: var(--tone); }
.view-chart .chart-path { stroke: var(--tone); }
.chart-note { margin: .3rem 0 0; }
.chart-table { margin-top: .4rem; }
.chart-table summary { color: var(--muted); cursor: pointer; }
.chart-table-scroll { overflow-x: auto; margin-top: .35rem; }
.chart-table table { border-collapse: collapse; font-size: .8rem; }
.chart-table th, .chart-table td { padding: .2rem .7rem .2rem 0; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.chart-table thead th { color: var(--muted); font-weight: 400; }
.chart-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stat { display: grid; gap: .1rem; padding: .6rem .8rem; border-left: 2px solid var(--line-strong); }
.stat-value { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .8rem; }
.todos, .attention, .links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.todo, .attention li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.attention li { flex-wrap: nowrap; }
.attention .what { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .4rem; }
.attention .what > a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attention .for { flex: 0 1 auto; min-width: 0; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo form { margin: 0; display: flex; }
.todo.done a { text-decoration: line-through; color: var(--muted); }
.todo a { flex: 1; }
.due { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.badge.reason { min-width: 5.5rem; text-align: center; }
.reason-overdue .badge { background: var(--bad-bg); color: var(--bad); }
.reason-due_soon .badge { background: var(--warn-bg); color: var(--warn); }
.reason-stalled .badge { background: var(--neutral-bg); color: var(--muted); }
button.work { border-color: var(--line-strong); color: var(--accent); background: var(--panel); padding: .2rem .6rem; }
button.work:disabled { color: var(--muted); }
label.inline input[type=checkbox] { margin: 0; }
tr.archived td { color: var(--muted); }

/* tiles keep a sensible height: tables page, boards and lists scroll inside */
.view-table .scroll { max-height: 440px; overflow: auto; }
.view-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.board { max-height: 480px; }
.board .col { max-height: 460px; overflow-y: auto; }
.view-todo .todos, .view-attention .attention { max-height: 420px; overflow-y: auto; }

/* the filter bar */
form.toolbar { flex-wrap: wrap; align-items: flex-start; }
form.toolbar input[type=search] { flex: 1 1 200px; max-width: 320px; }
.filter-bar { flex: 1 1 100%; }
.filter-bar summary { cursor: pointer; color: var(--muted); }
.filter-bar .controls { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: flex-end; padding: .5rem 0 .25rem; }
.fc { font-size: .78rem; gap: .15rem; }
.fc > span:first-child { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; }
.fc input, .fc select { padding: .3rem .5rem; font-size: .85rem; }
.fc .pair { display: flex; gap: .3rem; }
.fc .pair input { width: 7.5rem; }
.filter-bar .actions { display: flex; gap: .6rem; align-items: center; padding-bottom: .35rem; }
.view-table form.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.view-table form.toolbar input[type=search] { flex: 0 1 14rem; width: 14rem; min-width: 0; height: 1.55rem; padding: .1rem .3rem; font-size: .8rem; line-height: 1.2; }
.view-table .filter-bar { flex: 1 1 auto; min-width: 0; }
.view-table .filter-bar summary { width: fit-content; padding: .2rem 0; font-size: .75rem; line-height: 1.2; white-space: nowrap; }

/* a record's page */
.record { overflow-wrap: anywhere; }
.record-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.record-head > div { min-width: 0; }
.record-head .muted.small { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.record.narrow { max-width: 640px; }
.details { display: grid; grid-template-columns: fit-content(35%) minmax(0, 1fr); gap: .5rem 1.25rem; margin: 0; }
.details dt { color: var(--muted); font-size: .85rem; padding-top: .1rem; }
.details dd { min-width: 0; margin: 0; }
.details dd.kind-note { white-space: pre-wrap; }
.cell-img { max-width: 48px; max-height: 48px; border-radius: 4px; object-fit: cover; vertical-align: middle; }
.cell-img.detail-img { max-width: min(100%, 320px); max-height: 320px; height: auto; border-radius: var(--radius); display: block; }
.history { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .9rem; }
.attribution { margin-bottom: .25rem; }
[x-cloak] { display: none !important; }
.record-head .copy-id, .record-head .edit-toggle { box-sizing: border-box; height: 1.55rem; min-width: 3.6rem; padding: .1rem .4rem; font-size: .75rem; line-height: 1.2; }
.actions { display: flex; gap: .5rem; align-items: center; }
.record-body { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
.record-body.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-body.columns-2 .col-1 { grid-column: 1; }
.record-body.columns-2 .col-2 { grid-column: 2; }
.record-body .panel { min-width: 0; align-self: start; }
.record .md { min-width: 0; overflow-x: auto; }
.record .md img { max-width: 100%; height: auto; }
.record-form .field, .record-form input, .record-form select, .record-form textarea { min-width: 0; max-width: 100%; }
.record-form .actions { flex-wrap: wrap; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { font-size: 1rem; margin: .8rem 0 .3rem; }
.md p, .md ul, .md ol { margin: .4rem 0; }
.md code { background: var(--neutral-bg); padding: .05rem .3rem; border-radius: 3px; font-size: .88em; }
.md pre { background: var(--neutral-bg); padding: .6rem .8rem; border-radius: var(--radius); overflow-x: auto; }
.md table { width: auto; margin: .4rem 0; }
.md blockquote { margin: .4rem 0; padding-left: .8rem; border-left: 3px solid var(--line-strong); color: var(--muted); }

/* the graph */
.graph-layout { display: grid; grid-template-columns: 1fr 8px var(--graph-side, 280px); gap: .6rem; align-items: start; }
.graph-canvas { height: calc(100vh - 230px); min-height: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); position: relative; }
.graph-canvas .tile-loading { position: absolute; top: 1rem; left: 1rem; }
.splitter { width: 8px; align-self: stretch; border-radius: 4px; background: var(--line); cursor: col-resize; }
.splitter:hover, .splitter.dragging { background: var(--accent); }
body.dragging { user-select: none; cursor: col-resize; }
.graph-side { display: grid; gap: .9rem; align-content: start; overflow-y: auto; position: static; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.graph-side h3 { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0; }
.graph-side input[type=search] { width: 100%; }
.graph-controls { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.graph-controls select { padding: .3rem .5rem; font-size: .85rem; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .9rem; }
.legend label { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.graph-detail { border-top: 1px solid var(--line); padding: .8rem 0 0; font-size: .9rem; }
.graph-detail h4 { font-size: 1rem; margin: .15rem 0 .5rem; }
.graph-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .7rem; margin: .4rem 0; font-size: .85rem; }
.graph-detail dt { color: var(--muted); }
.graph-detail dd { margin: 0; overflow-wrap: anywhere; }
.graph-detail .button { display: inline-block; }
#graph-stats { margin: 0; padding-top: .6rem; border-top: 1px solid var(--line); }

/* the streams console: the streams beside a log that grows at the bottom, one message a line */
.streams-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: .75rem; align-items: start; }
.streams-side { display: grid; gap: .6rem; align-content: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem .8rem; }
.streams-side h3 { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 .3rem; }
.streams-side > p { margin: 0 .3rem; }
.stream-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.stream-list p { margin: 0 .55rem .35rem; font-size: .75rem; overflow-wrap: anywhere; }
.stream-pick { display: flex; width: 100%; align-items: baseline; gap: .5rem; padding: .3rem .55rem; border: 0; background: none; text-align: left; font-size: .85rem; color: var(--ink); }
.stream-pick:hover { background: var(--paper); }
.stream-pick[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.stream-pick .stream-key { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.console { position: relative; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.console-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem .7rem; border-bottom: 1px solid var(--line); }
.console-bar input[type=search] { flex: 1; min-width: 8rem; max-width: 320px; margin-left: auto; }
.console-bar .live-badge[data-state="live"] { background: var(--good-bg); color: var(--good); }
.console-bar .live-badge[data-state="polling"] { background: var(--warn-bg); color: var(--warn); }
.console-filter-bar { padding: .35rem .7rem; border-bottom: 1px solid var(--line); }
.console-filter-bar summary { width: fit-content; font-size: .75rem; }
.console-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .45rem .6rem; padding: .45rem 0 .2rem; }
.console-filters label { display: grid; gap: .15rem; font-size: .72rem; color: var(--muted); }
.console-filters input { font-size: .8rem; padding: .3rem .45rem; width: 9.5rem; }
.console-filters input[type=datetime-local] { width: 12.5rem; }
.console-filters .console-path { flex: 1; min-width: 14rem; }
.console-filters .console-path input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.console-filter-actions { display: flex; gap: .35rem; }
.console-refusal { margin: 0; padding: .35rem .7rem; border-bottom: 1px solid var(--line); color: var(--bad); overflow-wrap: anywhere; }
.console-body { position: relative; }
.console-log { list-style: none; margin: 0; padding: .35rem 0; height: calc(100vh - 320px); min-height: 360px; overflow-y: auto; font: .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.console-line { display: grid; grid-template-columns: 7.2rem minmax(4rem, 9rem) minmax(3rem, 6rem) minmax(3rem, 7rem) minmax(0, 1fr); gap: .75rem; padding: .1rem .8rem; cursor: pointer; }
.console-line:hover { background: var(--paper); }
/* its own `display: grid` would otherwise outrank the browser's rule for [hidden], and the find
   box would hide nothing (it didn't, 2026-09-14) */
.console-line[hidden] { display: none; }
.console-line > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-line .c-time { color: var(--faint); font-variant-numeric: tabular-nums; }
.console-line .c-stream { color: var(--accent); }
.console-line .c-type { color: var(--warn); }
.console-line .c-sender { color: var(--muted); }
.console-line .c-payload { font: inherit; color: var(--ink); }
.console-line.open { background: var(--paper); }
.console-line.open .c-payload { white-space: pre-wrap; overflow-wrap: anywhere; }
.console-empty { position: absolute; top: .6rem; left: .8rem; right: .8rem; margin: 0; }
.console-jump { position: absolute; right: 1rem; bottom: .8rem; }
@media (max-width: 900px) {
  .streams-layout { grid-template-columns: 1fr; }
  .console-line { grid-template-columns: 6.6rem minmax(0, 1fr); }
  .console-line .c-type, .console-line .c-sender { display: none; }
  .console-line .c-payload { grid-column: 1 / -1; }
}

/* a change arrived: say so, and glow what refreshed */
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 50; max-width: 360px; }
.toast { background: var(--ink); color: var(--paper); padding: .6rem .9rem; border-radius: var(--radius); font-size: .9rem; animation: toast-in .2s ease-out; }
.toast.gone { opacity: 0; transition: opacity .5s; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.live-updated { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--accent-soft); } 100% { box-shadow: none; } }

@media (max-width: 900px) {
  .layout, .two-up, .org { grid-template-columns: 1fr; }
  .record-body.columns-2 { grid-template-columns: minmax(0, 1fr); }
  .org .cards { grid-template-columns: 1fr; }
  .side { position: static; }
  .grid > .tile { grid-column: span 12; }
  .project-head, .record-head { flex-direction: column; align-items: flex-start; }
  .record-body.columns-2 .col-1, .record-body.columns-2 .col-2 { grid-column: auto; }
  .graph-layout { grid-template-columns: 1fr; }
  .splitter { display: none; }
}
.org { align-items: start; }
.card { align-content: start; }

/* a record's id, one click to copy */
.record-id { display: inline-flex; align-items: center; gap: .5rem; margin-top: .35rem; }
.record-id code { font-size: .78rem; color: var(--muted); background: var(--neutral-bg); padding: .1rem .4rem; border-radius: 3px; }
.copy-id { font-size: .75rem; padding: .15rem .5rem; }
.graph-actions { display: flex; gap: .4rem; align-items: center; }

/* the change log: the last few commits, each a point to go back to */
.changes { margin-top: 1.25rem; }
.changelog { list-style: none; margin: 0; padding: 0; font-size: .72rem; line-height: 1.35; }
.changelog li { display: grid; gap: .05rem; padding: .3rem 0; border-top: 1px solid var(--line); }
.changelog .what { color: var(--ink); overflow-wrap: anywhere; }
.changelog .when { color: var(--muted); }
.changelog li.kind-schema .what { color: var(--muted); }
.changelog li.kind-rollback .what::before { content: "\21BA  "; color: var(--accent); }
.changelog .rollback { cursor: pointer; }

/* the door: a dark band with the wordmark, then the sign-in */
.page.landing { max-width: none; margin: 0; padding: 0; }
.hero { background: var(--ink); color: var(--paper); padding: clamp(3rem, 7vw, 5rem) 1.5rem clamp(2.25rem, 5vw, 3.5rem); text-align: center; }
.hero-mark { font-family: var(--serif); font-weight: 700; font-size: clamp(2.6rem, 7vw, 5rem); letter-spacing: -.02em; line-height: 1; margin: 0; }
.hero-sub { margin: 1.25rem 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .28em; color: #b9b3a6; padding-left: .28em; text-wrap: balance; }
.landing .connect-line { text-align: center; max-width: 62rem; padding: 0 1.5rem; margin-top: clamp(2.5rem, 6vw, 3.5rem); margin-bottom: 0; }
.door-links { display: flex; justify-content: center; gap: 1.5rem; }
.quiet-link { color: var(--muted); }
.quiet-link:hover { color: var(--ink); }
.landing .door { text-align: center; max-width: 62rem; padding: 0 1.5rem; margin: 2rem auto clamp(2.5rem, 6vw, 3.5rem); }
/* the pitch below the way in. Type and hairlines carry it; no boxes, no shadows. */
.landing .band { text-align: center; max-width: 62rem; margin: 0 auto; padding: clamp(2.75rem, 6vw, 4rem) 1.5rem; }
.landing .pitch, .landing .steps, .landing .uses { border-top: 1px solid var(--line); }
.statement { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 4.2vw, 2.8rem); line-height: 1.08; letter-spacing: -.022em; margin: 0 auto; max-width: 20ch; text-wrap: balance; }
.small-statement { font-size: clamp(1.4rem, 3vw, 2rem); }
.lede { margin: 1.1rem auto 0; max-width: 48ch; color: var(--muted); font-size: 1.02rem; line-height: 1.65; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.steps li { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.step-n { font-size: .72rem; letter-spacing: .09em; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); }
.uses dl { margin: 2rem 0 0; }
.uses dl > div { display: grid; gap: .3rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.uses dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.uses dt { font-family: var(--serif); font-weight: 600; font-size: 1.06rem; }
.uses dd { margin: 0 auto; max-width: 52ch; color: var(--muted); }
.proof { background: var(--ink); color: var(--paper); }
.proof .statement { color: var(--paper); }
.proof .lede { color: #b9b3a6; }
/* the argument runs centred, except the template list: a column of names with a long line
   beside each one reads better ranged left than stacked centre. */
.landing .uses { text-align: left; }
.landing .uses .statement, .landing .uses .lede { margin-left: 0; margin-right: 0; }
.uses dl > div { grid-template-columns: minmax(8rem, 11rem) 1fr; gap: .25rem 2rem; padding: .95rem 0; }
.uses dd { margin: 0; max-width: none; }
@media (max-width: 34rem) { .uses dl > div { grid-template-columns: 1fr; } }

/* connecting a harness. `.command` is not scoped to this page: the same block shows the minted
   token on an organization's harness roster, where it was rendering as unstyled preformatted
   text with a live credential in it. */
.command { background: var(--ink); color: var(--paper); padding: .4rem .6rem; border-radius: var(--radius); font-size: .78rem; line-height: 1.35; overflow-x: auto; white-space: pre; margin: .2rem 0; }
.connect .harness { margin: .8rem 0 0; }
.connect .harness h3 { font-size: .85rem; margin: 0 0 .35rem; }
.connect .harness .line { display: flex; gap: .3rem; align-items: flex-start; }
.connect .harness .command { flex: 1; min-width: 0; margin: 0; }
.connect .harness p { margin: .35rem 0 0; }
/* the mint form is one line: text, name, role, button, all the same height */
.connect .mint { display: flex; flex-wrap: nowrap; gap: .5rem; align-items: center; margin: .8rem 0 0; }
.connect .mint span { white-space: nowrap; }
.connect .mint input, .connect .mint select, .connect .mint button { box-sizing: border-box; height: 1.9rem; padding: 0 .5rem; font-size: .8rem; line-height: 1.3; }
.connect .mint input { flex: 1 1 8rem; min-width: 5rem; }
.connect .mint button { white-space: nowrap; }
.connect .agents { list-style: none; margin: .8rem 0 0; padding: .6rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .25rem; }

/* the consent page of the OAuth flow: two buttons and the least a person needs to answer them */
.consent { max-width: 400px; }
.consent .eyebrow { margin: 0 0 .3rem; }
.consent h1 { margin: 0 0 1.1rem; }
.consent form > label { display: block; margin: 0 0 .8rem; font-size: .9rem; }
.consent form > label > input, .consent form > label > select { display: block; width: 100%; margin-top: .25rem; }
.consent .decide { display: flex; gap: .6rem; margin-top: 1.1rem; }
.consent .returns { margin-top: .9rem; }

/* a tool card that carries state: the word says how far agents reach, the tone says whether
   that is worth a second look */
.tool .state.tone-warn { color: var(--warn); }
.tool .state.tone-good { color: var(--good); }
.tool .state.tone-quiet { color: var(--muted); }

/* adding a person sits with the people, so it needs a rule above it rather than a panel of
   its own */
.invite-row { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.invite-row h3.small { margin: 0 0 .15rem; }
.invite-row p.muted.small { margin: 0 0 .5rem; }

/* who and what can reach one project: name and owner on the left, the level hard against the
   right. Same row shape for a person and for a harness, because it is the same question. */
.access-list { list-style: none; margin: 0; padding: 0; }
.access-list li { display: grid; grid-template-columns: minmax(0, 1fr) 16rem 6.5rem;
  gap: 1rem; align-items: center; padding: .45rem .2rem; }
.access-list li + li { border-top: 1px solid var(--line); }
/* the who column is a grid track, so it needs min-width:0 before it will ellipsis rather than
   push the row wider than its columns */
.access-list .who { min-width: 0; }
.access-list .name { font-weight: 600; color: inherit; text-decoration: none;
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-list a.name:hover { text-decoration: underline; }
.access-list .sub { color: var(--muted); font-size: .84rem; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.access-list .fixed { color: var(--muted); font-size: .82rem; text-align: right; }
.access-list form { margin: 0; }
.access-list .fixed .ends { display: flex; gap: .3rem; justify-content: flex-end; }
/* setting a customer up: three acts sharing one panel, one visible at a time, so the list of
   organizations this page is actually for stays above the fold. Each row is inputs and a button
   on one line, with the sentence that matters underneath. */
.setup { padding: .5rem .7rem .7rem; margin-bottom: 1rem; }
.setup .tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--line); margin-bottom: .7rem; }
.setup .tabs button { background: none; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; padding: .35rem .6rem; font-size: .82rem; color: var(--muted); cursor: pointer; }
.setup .tabs button:hover { color: var(--ink); }
.setup .tabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
/* A grid rather than a stack: the fields sit two or more abreast and fold to two on a narrow
   window, so the tallest of these forms is three short rows instead of six. `auto-fit` means
   the count follows the width and nothing has to be told how many fields it has. */
.setup form.setup-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .4rem; align-items: center; margin: 0; }
.setup form.setup-row input, .setup form.setup-row select { font-size: .84rem; padding: .28rem .45rem; min-width: 0;
  width: 100%; }
/* the button keeps its own size and sits at the end of the last field row */
.setup form.setup-row button { justify-self: start; }
/* the sentence runs under the fields, whatever the column count */
.setup form.setup-row p { grid-column: 1 / -1; margin: .15rem 0 0; }

/* a token, shown once, above the roster it belongs to */
.minted { margin: 0 0 .8rem; }
.minted p { margin: 0 0 .25rem; }
.access-list select { width: 100%; padding: .15rem .35rem; font-size: .84rem; }
/* the same row, wider, on the organization page: a harness, whose it is, when it last called,
   and what you can do about it. Four columns for four things — it was five, the spare left over
   from a column of scope labels that no longer exists, which left the buttons in a 7rem slot. */
.access-list.harnesses li { grid-template-columns: minmax(0, 1fr) 14rem 8rem 12rem; }
.access-list.projects li { grid-template-columns: minmax(0, 1fr) 9rem 5rem 5.5rem; }
/* the project's own line about itself, under its name: a member who cannot open a project
   still learns what it is for, which is how they know what to ask for */
.access-list.projects .who .sub { display: block; }
.access-list .num { text-align: right; }
.access-list .state.tone-warn { color: var(--warn); }
.access-list .state.tone-good { color: var(--good); }
@media (max-width: 60rem) {
  .access-list.harnesses li { grid-template-columns: minmax(0, 1fr) 12rem; }
  .access-list.harnesses .num { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .access-list li { grid-template-columns: minmax(0, 1fr) 6.5rem; }
  .access-list .sub { grid-column: 1 / -1; }
}

/* the agents list: one line each, scannable, the detail a click away. `.agent-list` rather than
   `.agents`, which the connect page already uses for its chips and would flex these rows. */
.agent-list { list-style: none; margin: 0; padding: 0; }
.agent-list li + li { border-top: 1px solid var(--line); }
/* fixed columns, so the four line up down the list rather than each row sizing itself */
.agent-list a { display: grid; grid-template-columns: minmax(0, 1fr) 14rem 6rem 7rem; gap: 1rem; align-items: baseline; padding: .55rem .3rem; text-decoration: none; color: inherit; border-radius: var(--radius); }
.agent-list a:hover { background: rgba(0, 0, 0, .03); }
.agent-list .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-list .who, .agent-list .reach, .agent-list .when { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-list .reach, .agent-list .when { text-align: right; }

/* the same list asked from inside one project: name and owner on the left, and the dropdown
   that sets this project's permission hard against the right */
.agent-list.scoped li { display: flex; align-items: center; gap: 1rem; padding: 0 .3rem; }
.agent-list.scoped li > a { flex: 1; grid-template-columns: minmax(0, 1fr) 14rem; padding: .5rem 0; }
.agent-list.scoped form { margin: 0; }
.agent-list.scoped select { width: 6.5rem; padding: .15rem .35rem; font-size: .84rem; }
.agent-list.scoped .locked { width: 6.5rem; text-align: right; }
/* the scope control: a question the page is answering, not a form to fill in */
.project-head form.scope { display: flex; align-items: baseline; gap: .5rem; margin: .55rem 0 0; }
.project-head form.scope select { padding: .15rem .4rem; font-size: .85rem; max-width: 18rem; }

/* a person's own harnesses: one panel each, narrow, because the page is a list of names and
   two buttons rather than a table. The scope tree and the grant lists that used to live here
   are gone with the page per connection — a harness acts as its person, so there was nothing
   in them but that person's own access, written out again. */
.page.agent { max-width: 720px; }
.page.agent .project-head .muted.small { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.page.agent .panel + .panel { margin-top: .8rem; }
.page.agent .panel p:last-child { margin-bottom: 0; }
.harness-empty p { margin: 0; }
.harness-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; }
.harness-summary { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.harness-summary h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.harness-summary p { margin: 0; }
.harness-card-actions { display: flex; gap: .35rem; }
.harness-card-actions form { margin: 0; }
.harness-card-actions button { white-space: nowrap; }
.harness-card > p { margin: .65rem 0 0; }

/* the foot of a record: archive and unarchive */
.record-foot { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.record-foot form { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.record.archived h1 { color: var(--muted); }

/* what a project is for: one line under the title, editable in place */
.project-head .about { flex: 1; min-width: 0; }
.project-head .description { margin: .15rem 0 0; font-size: .9rem; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.project-head .description .link { font-size: .78rem; color: var(--muted); padding: 0; }
.project-head .describe { display: flex; gap: .5rem; align-items: center; margin-top: .3rem; }
.project-head .describe input { flex: 1; min-width: 20ch; }
button.quiet { border-color: transparent; background: transparent; color: var(--muted); padding-left: 0; }
button.quiet:hover { color: var(--ink); }

/* billing and plan */
.who-link { text-decoration: none; }
.who-link:hover { color: var(--ink); text-decoration: underline; }
.billing-org { margin-bottom: 1rem; }
.billing-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.billing-head h2 { margin: .2rem 0 .4rem; }
.meters { display: grid; gap: .6rem; margin: .8rem 0 0; }
.meter { display: grid; grid-template-columns: 8rem 1fr; gap: .8rem; align-items: center; }
.meter dt { font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.meter dd { margin: 0; display: flex; align-items: center; gap: .8rem; }
.meter .bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.meter .fill { display: block; height: 100%; background: var(--accent); }
.meter.tone-warn .fill { background: var(--warn); }
.meter.tone-bad .fill { background: #9b2c2c; }
.meter .figure { font-size: .8rem; color: var(--muted); white-space: nowrap; }
/* every plan gets the same width, whatever it is called and however long its price reads */
.plans-table { border-collapse: collapse; margin-top: .5rem; width: 100%; table-layout: fixed; }
.plans-table th:first-child, .plans-table td:first-child { width: 12rem; }
.plans-table th, .plans-table td { text-align: left; padding: .4rem 1.2rem .4rem 0; border-top: 1px solid var(--line); font-weight: normal; }
.plans-table thead th { border-top: 0; font-family: var(--serif); font-size: 1.05rem; }
.plans-table tbody th { color: var(--muted); font-family: var(--sans); font-size: .8rem; }
.plans-table td.mark { font-family: var(--sans); }
.export-card.locked { opacity: .6; cursor: not-allowed; }
.export-card .badge { font-size: .65rem; vertical-align: middle; }

/* a thin footer on every page */
.foot { display: flex; gap: 1.1rem; justify-content: center; align-items: center; padding: 1.2rem 1.5rem 1.6rem; font-family: var(--sans); font-size: .72rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 3rem; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.page.legal { max-width: 72ch; }
.page.legal h2 { font-size: 1.1rem; margin-top: 1.6rem; }
.page.legal p, .page.legal li { line-height: 1.6; }

/* the co-worker window */
.copilot[x-cloak], .copilot [x-cloak] { display: none !important; }
.copilot-launcher { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 999px; background: var(--ink); color: var(--paper); border: 0; font-family: var(--sans); font-size: .85rem; box-shadow: 0 6px 24px rgba(28,27,24,.25); cursor: pointer; }
.copilot-launcher.locked { background: #6b6760; }
.copilot-launcher .badge { background: var(--paper); color: var(--ink); }
.copilot .dot { width: .55rem; height: .55rem; border-radius: 50%; background: #9a958b; display: inline-block; }
.copilot .dot[data-status="idle"] { background: #3b8b5a; }
.copilot .dot[data-status="running"] { background: #d97706; animation: pulse 1.2s infinite; }
.copilot .dot[data-status="creating"] { background: #d97706; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.copilot-panel { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 41; width: min(420px, calc(100vw - 2rem)); height: min(600px, calc(100vh - 3rem)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 60px rgba(28,27,24,.22); overflow: hidden; }
.copilot-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: 1px solid var(--line); cursor: grab; user-select: none; font-family: var(--sans); font-size: .9rem; background: var(--paper); white-space: nowrap; }
.copilot-head .cost { overflow: hidden; text-overflow: ellipsis; }
.copilot-head:active { cursor: grabbing; }
.copilot-head .grow { flex: 1; }
.copilot-head .icon { border: 0; background: transparent; font-size: 1.1rem; line-height: 1; padding: 0 .25rem; cursor: pointer; color: var(--muted); }
.copilot-body { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; }
.copilot-body .locked-note { margin: auto 0; }
.copilot .bubble { max-width: 88%; padding: .5rem .75rem; border-radius: 12px; line-height: 1.45; white-space: pre-wrap; }
.copilot .bubble.user { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; }
.copilot .bubble.agent { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; white-space: normal; }
.copilot .bubble.agent p:first-child { margin-top: 0; } .copilot .bubble.agent p:last-child { margin-bottom: 0; }
.copilot .ev-user { display: flex; justify-content: flex-end; }
.copilot .chip { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; font-family: var(--sans); font-size: .74rem; color: var(--muted); padding: .15rem .5rem; border: 1px solid var(--line); border-radius: 999px; }
.copilot .chip .spark { width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); }
.copilot .typing { display: inline-flex; gap: .25rem; padding: .3rem .2rem; }
.copilot .typing span { width: .4rem; height: .4rem; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.copilot .typing span:nth-child(2) { animation-delay: .2s; } .copilot .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }
.copilot-foot { border-top: 1px solid var(--line); padding: .4rem .6rem .5rem; background: var(--paper); display: grid; gap: .3rem; }
.copilot-foot select { padding: .1rem .35rem; font-size: .8rem; height: 1.6rem; }
.copilot-foot label.inline { gap: .3rem; font-size: .78rem; }
.copilot-foot .row { display: flex; align-items: center; gap: .6rem; }
.copilot-foot .compose { display: flex; gap: .5rem; align-items: flex-end; }
.copilot-foot textarea { flex: 1; resize: none; font: inherit; font-size: .9rem; line-height: 1.3; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
button.work[disabled] { opacity: .55; cursor: not-allowed; }
button.work .badge { margin-left: .35rem; font-size: .6rem; }

/* deleting a project: a plain dark red button at the very bottom, behind a typed confirmation */
.delete-project { margin-top: 2.5rem; }
.delete-project .confirm { display: grid; gap: .6rem; max-width: 40ch; }
button.danger { background: #7a1f27; color: #fff; border-color: #7a1f27; }
button.danger:hover { background: #63181f; }
button.danger[disabled] { opacity: .45; cursor: not-allowed; }

/* Coworker credit on the billing page: the month's allowance, what was added, what is left. */
.credit { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.credit-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.credit-head h3 { margin: 0; font-size: 0.95rem; }
.credit-figures { display: flex; gap: 22px; flex-wrap: wrap; margin: 10px 0 8px; }
.credit-figures div { margin: 0; }
.credit-figures dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.credit-figures dd { margin: 2px 0 0; font-size: 1rem; }
.credit-figures dd.strong { font-weight: 600; }
.credit .meter { max-width: 420px; }
.credit .actions { display: flex; gap: 8px; margin-top: 10px; }
.meter.waiting .bar { opacity: .4; }
/* the × that disconnects a harness: quiet until the row is hovered */
.agents li { display: flex; align-items: center; gap: .4rem; }
.agents li .x { margin-left: auto; border: 0; background: none; color: var(--faint); font-size: 1rem; line-height: 1; padding: 0 .25rem; cursor: pointer; }
.agents li:hover .x, .agents li .x:focus { color: var(--bad); }

/* the organization's people: roles, invitations, and the links that carry them */
.org-people section.panel + section.panel { margin-top: 1.25rem; }
.org-people .panel > h2, .org-people .panel-head h2 { margin: 0; }
.panel-head { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; margin-bottom: .7rem; }
.panel-head p::before { content: "·"; color: var(--faint); margin-right: .55rem; }
.panel-head p { margin: 0; }
table.people { width: 100%; border-collapse: collapse; margin-top: .4rem; }
table.people th, table.people td { text-align: left; padding: .5rem 1rem .5rem 0; border-top: 1px solid var(--line); font-weight: normal; vertical-align: middle; }
table.people th:last-child, table.people td:last-child { padding-right: 0; width: 6rem; }
table.people th:nth-child(2), table.people td:nth-child(2) { width: 11rem; }
table.people select { width: auto; min-width: 9rem; padding: .25rem .5rem; font-size: .85rem; }
table.people thead th { border-top: 0; font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.people td.row-actions { text-align: right; }
table.people form.inline-form { margin: 0; }
.role-key { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .6rem; margin: .9rem 0 0; }
.role-key div { display: contents; }
.role-key dt { font-family: var(--sans); text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; padding-top: .1rem; }
.role-key dd { margin: 0; }
.panel-head form.right, .panel-head a.right { margin-left: auto; }
/* connections: one line per harness, its projects as chips */
.commands .line { display: flex; align-items: center; gap: .6rem; margin: .3rem 0; }
.commands .who { width: 6.5rem; font-size: .74rem; color: var(--muted); flex: none; }
/* a command reads as a terminal line: dark, small, one line, scrolls rather than wraps */
.commands .command, .connections .command, .connect-line .command { flex: 1; margin: 0; background: var(--ink); color: var(--paper); padding: .38rem .6rem; border-radius: var(--radius); font-size: .72rem; line-height: 1.4; overflow-x: auto; white-space: pre; }
ul.connections { list-style: none; padding: 0; margin: .2rem 0 0; }
ul.connections > li { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .55rem 0; border-top: 1px solid var(--line); }
ul.connections > li:first-child { border-top: 0; }
ul.connections .who { min-width: 9rem; }
ul.connections .reaches { display: flex; gap: .35rem; flex-wrap: wrap; flex: 1; min-width: 12rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--accent-soft); border-radius: 999px; padding: .12rem .5rem; font-size: .76rem; }
.chip-role { color: var(--muted); }
.chip form { margin: 0; display: inline; }
.chip .x { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 0; font-size: .9rem; line-height: 1; }
.chip:hover .x { color: var(--bad); }
ul.connections .give { display: flex; gap: .3rem; margin: 0; }
ul.connections .give select { padding: .18rem .4rem; font-size: .78rem; max-width: 9rem; }
ul.connections .ends { display: flex; gap: .3rem; margin-left: auto; }
.panel-head .ends.right { display: flex; gap: .3rem; margin-left: auto; }
.panel-head .ends.right form { margin: 0; }
table.permissions td:last-child { width: 11rem; }
.connection { margin-top: 1.1rem; }
/* the plan, beside a heading: a quiet pill that links to billing */
.plan-badge { display: inline-block; font-family: var(--sans); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 999px; text-decoration: none; vertical-align: middle; background: var(--neutral-bg, var(--accent-soft)); color: var(--muted); border: 1px solid transparent; }
.plan-badge.tone-good { background: var(--good-bg); color: var(--good); }
.plan-badge.tone-warn { background: var(--warn-bg); color: var(--warn); }
.plan-badge.tone-bad { background: var(--bad-bg); color: var(--bad); }
.copilot-head .access { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
/* the tools under the canvases: ways to look at the project, at their own smaller weight */
.export-tool { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; font-size: .78rem; }
.export-tool form { display: inline; margin: 0; }
.export-tool .muted { color: var(--muted); }
button.linky { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
/* a hint: a small mark that opens one line of plain words */
.hint { position: relative; display: inline-block; margin-left: .4rem; vertical-align: middle; }
.hint-mark { width: 1.05rem; height: 1.05rem; padding: 0; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-family: var(--sans); font-size: .62rem; line-height: 1; cursor: pointer; vertical-align: middle; }
.hint-mark:hover { color: var(--accent); border-color: var(--accent); }
.hint-text { position: absolute; left: 0; top: 1.5rem; z-index: 20; width: max-content; max-width: 22rem; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .5rem .7rem; font-family: var(--sans); font-size: .78rem; line-height: 1.5; color: var(--ink); box-shadow: 0 6px 18px rgba(28, 27, 24, .08); text-transform: none; letter-spacing: 0; }
ul.connections .ends form { margin: 0; }
button.danger-quiet { color: var(--bad); border-color: var(--line); }
.problem.banner { margin: 0 0 1rem; padding: .6rem .8rem; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn); }
/* A thin rule closes the canvases: what is above is where the work lives, what is below is
   the records and the ways to look at them. */
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0 0; }

/* Tools, as cards beside the records. Each is an icon, a name and a line saying what it does. */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .5rem; }
.tool {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: .55rem;
  row-gap: .1rem;
  align-items: center;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}
/* every card that does something lifts, whether it is a link or holds a control */
.tool:not(.locked):hover { border-color: var(--line-strong); background: var(--accent-soft); }
a.tool:hover { text-decoration: none; }
.tool:focus-visible, .tool:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.tool .icon { width: 1.15rem; height: 1.15rem; color: var(--accent); grid-row: 1 / span 2; align-self: start; margin-top: .12rem; }
.tool .tool-name { font-family: var(--serif); font-size: .98rem; }
.tool .muted.small, .tool .export-tool { grid-column: 2; line-height: 1.35; }
.tool.locked { color: var(--muted); background: transparent; }
.tool.locked .icon { color: var(--faint); }

/* One line sets a harness up, so it is given the weight of one: the link, black, and a copy
   button beside it. */
.connect-line { margin: 0 auto 1.6rem; max-width: 30rem; }
.connect-line h2 { margin-bottom: .35rem; }
.connect-line .command-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: .4rem; width: fit-content; max-width: 100%; }
.connect-line .command { flex: 0 0 auto; max-width: 100%; min-width: 0; font-size: .82rem; padding: .32rem .35rem; display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; overflow: visible; }
.connect-line .command code { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.connect-line .command-row button { white-space: nowrap; }
.connect-line p { margin: 0 0 .5rem; max-width: 34rem; }
.landing .connect-line p { margin: 0 auto .5rem; }
.landing .connect-line .command-row { margin: 0 auto; }

.may-create-box { display: flex; align-items: baseline; gap: .5rem; margin: .9rem 0; }
/* the developer docs: one column, hairlines between sections, code the same ink as the hero */
.page.docs { max-width: 54rem; }
.docs-head { padding-bottom: 1.4rem; border-bottom: 1px solid var(--line-strong); }
.docs-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.1; margin: .3rem 0 0; }
.docs-head .lede { margin: .9rem 0 0; max-width: 52ch; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.docs-toc { display: flex; flex-wrap: wrap; gap: 0 1.25rem; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.docs-section { padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.docs-section:last-child { border-bottom: 0; }
.docs-section > .eyebrow { display: block; }  /* why: an eyebrow is a span, and it labels the section above its heading */
.docs-section > h2 { font-size: 1.5rem; margin: .15rem 0 .8rem; scroll-margin-top: 1rem; }
.docs .command-label { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 1rem 0 .3rem; }  /* why: says which harness the black line below belongs to */
.docs-section > h3 { margin: 1.8rem 0 .5rem; }
.docs-section p { max-width: 62ch; margin: 0 0 .8rem; }
.docs .command-row { display: flex; align-items: stretch; gap: .4rem; max-width: 44rem; margin: 1rem 0; }
.docs .command { flex: 1; margin: 0; background: var(--ink); color: var(--paper); padding: .45rem .7rem; border-radius: var(--radius); font-size: .8rem; overflow-x: auto; white-space: pre; display: flex; align-items: center; }
.steps-list { list-style: none; counter-reset: step; margin: 1.4rem 0 0; padding: 0; }
.steps-list > li { counter-increment: step; position: relative; padding: 0 0 1.4rem 2.6rem; }
.steps-list > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: .15rem; font-size: .72rem; letter-spacing: .09em; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps-list h3 { margin: 0 0 .35rem; font-size: 1.02rem; }
.steps-list p { margin: 0 0 .5rem; color: var(--muted); }
.callout { border-left: 3px solid var(--accent); padding: .5rem 0 .5rem .8rem; background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.docs .callout { color: var(--ink); }
.tool-list, .uses-list { margin: 1.2rem 0 0; }
.tool-list > div, .uses-list > div { display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr; gap: .25rem 1.5rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.tool-list > div:last-child, .uses-list > div:last-child { border-bottom: 0; }
.tool-list dt, .uses-list dt { font-family: var(--serif); font-weight: 600; font-size: 1rem; }
.tool-list dd, .uses-list dd { margin: 0; color: var(--muted); line-height: 1.9; }
.uses-list dd { line-height: 1.6; }
.api-details { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .7rem 1rem; }
.api-details > summary { cursor: pointer; font-weight: 600; font-family: var(--serif); }
.api-details[open] > summary { margin-bottom: .8rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.api-body p { margin: 0 0 .7rem; }
@media (max-width: 34rem) { .tool-list > div, .uses-list > div { grid-template-columns: 1fr; } }

/* Whether a connection may start projects of its own: one line, and the button that flips it. */
.may-create { display: flex; align-items: baseline; gap: .75rem; margin: 0 0 .8rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.may-create span { flex: 1; color: var(--muted); font-size: .88rem; }

/* Where a trial stands, said plainly: it decides whether the projects take changes tomorrow. */
.trial-line { margin: .35rem 0 0; font-size: .92rem; }

/* the shape's lock sits on the schema page, beside the heading that describes it */
.project-head form.lock { margin: 0; margin-left: auto; align-self: center; }
/* Scheduled tasks have a page of their own: a cadence, what it does, when it last ran. */
ul.scheduled { list-style: none; padding: 0; margin: 1.2rem 0 0; }
ul.scheduled > li {
  display: grid;
  /* the cadence sizes to its own longest phrase ("every weekday at 17:00 UTC"), the task takes
     what is left, and the two right-hand columns hold their line */
  grid-template-columns: max-content minmax(6rem, 1fr) max-content max-content;
  align-items: baseline;
  gap: .35rem .9rem;
  padding: .5rem 0;
  border-top: 1px solid var(--line);
}
ul.scheduled > li:first-child { border-top: 0; }
ul.scheduled .when { font-variant-numeric: tabular-nums; font-size: .82rem; white-space: nowrap; }
ul.scheduled .what { min-width: 0; overflow-wrap: anywhere; }
ul.scheduled .ran { font-size: .78rem; color: var(--muted); white-space: nowrap; }
ul.scheduled .acts { display: flex; gap: .3rem; justify-self: end; }
ul.scheduled .acts form { margin: 0; }
ul.scheduled li.paused .when, ul.scheduled li.paused .what { color: var(--faint); }
form.add-schedule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: .4rem;
  align-items: center;
  margin: 1.1rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}
form.add-schedule select { max-width: 10rem; }
@media (max-width: 700px) {
  ul.scheduled > li, form.add-schedule { grid-template-columns: 1fr; }
  ul.scheduled .acts { justify-self: start; }
}
/* the schema as an entity diagram: real tables in a grid, lines drawn behind them */
.erd { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 2.6rem 3.4rem; margin-top: 1.2rem; align-items: start; }
.erd-lines { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: visible; }
.erd-line { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }
.erd-line.reference { stroke: var(--accent); stroke-dasharray: 4 3; }
.erd-arrow { fill: var(--line-strong); }
.erd-arrow.reference { fill: var(--accent); }
.erd-label { font-family: var(--sans); font-size: 10px; fill: var(--muted); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.erd-table { position: relative; z-index: 1; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.erd-table > header { display: flex; align-items: baseline; gap: .5rem; padding: .5rem .7rem; background: var(--accent-soft); border-bottom: 1px solid var(--line-strong); }
.erd-table > header h2 { margin: 0; font-size: .92rem; }
.erd-table > p { margin: .5rem .7rem 0; }
.erd-table table { width: 100%; border-collapse: collapse; }
.erd-table th, .erd-table td { text-align: left; padding: .3rem .7rem; font-weight: normal; font-size: .8rem; vertical-align: baseline; border-top: 1px solid var(--line); }
.erd-table tr:first-child th, .erd-table tr:first-child td { border-top: 0; }
/* a field name is a name, not a column heading: normal case, the body colour */
.erd-table th { width: 52%; font-family: var(--sans); font-size: .78rem; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 400; white-space: normal; }
.erd-table .kind { font-family: var(--sans); font-size: .72rem; color: var(--muted); }
.erd-table .req { color: var(--bad); }
.erd-table .choices { font-size: .7rem; }
.erd-table .badge { font-size: .62rem; margin-left: .3rem; }
.erd-key { margin-top: 1.6rem; }
ul.relations { list-style: none; padding: 0; margin: .3rem 0 0; }
ul.relations li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-top: 1px solid var(--line); }
ul.relations li:first-child { border-top: 0; }
ul.relations .arrow { color: var(--line-strong); font-family: var(--sans); }
ul.relations .arrow.reference { color: var(--accent); }
/* what a field can be: two tidy columns, the name in its own column so the eye can run down it */
dl.kinds { margin: .4rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 2.4rem; }
dl.kinds > div { display: grid; grid-template-columns: 6rem 1fr; gap: .8rem; align-items: baseline; padding: .32rem 0; border-top: 1px solid var(--line); }
dl.kinds dt { font-family: var(--sans); font-size: .76rem; color: var(--muted); }
dl.kinds > div.in-use dt { color: var(--ink); }
dl.kinds dd { margin: 0; font-size: .84rem; color: var(--muted); }
dl.kinds > div.in-use dd { color: var(--ink); }
.schema-lock .panel-head { margin: 0; }
form.invite { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0; }
form.invite select { width: auto; min-width: 9rem; }
.org-people h3.small { margin: 1.1rem 0 0; font-family: var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
form.invite input[type=email] { flex: 1 1 16rem; }
ul.invites { list-style: none; padding: 0; margin: .4rem 0 0; }
ul.invites li { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-top: 1px solid var(--line); }
ul.invites form { margin: 0; }
.invite-link { flex: 1; min-width: 8rem; font-size: .72rem; color: var(--muted); padding: .2rem .4rem; }
ul.invites .x { border: 0; background: none; color: var(--faint); font-size: 1rem; line-height: 1; padding: 0 .25rem; cursor: pointer; }
ul.invites li:hover .x { color: var(--bad); }

/* The staff band. Present for staff on every page; tinted inside somebody else's organization,
   so "whose is this?" is answered before anything is clicked. */
.staffbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  background: var(--surface-2, #f1f3f5);
  border-bottom: 1px solid var(--line, #dee2e6);
}
.staffbar strong { letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.7rem; }
.staffbar a, .staffbar .link { margin-left: auto; }
.staffbar a + a { margin-left: 0; }
.staffbar form { display: inline; }
.staffbar.visiting { background: #fff4e0; border-bottom-color: #f0c37a; color: #6b4a12; }
.staffbar.visiting .link { color: #6b4a12; }

/* Us in the People list, so the customer reads it the way we do. */
.people .staff-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fff4e0;
  border: 1px solid #f0c37a;
  color: #6b4a12;
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
}
.staff-orgs .sub { min-width: 12rem; }

/* Change history: dense log rows with aligned, compact record details. */
.change-heading { display: grid; gap: .15rem; }
.changelog .change-record { margin: .4rem 0; overflow-wrap: anywhere; }
.changelog .change-summary { display: block; font-size: .8rem; }
.changelog .change-id { display: block; font-size: .7rem; }
.page.changes-page { max-width: none; }
.changes-page-heading, .changes-heading { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.changes-heading { align-items: center; margin: .75rem 0 .35rem; }
.changes-heading h3 { margin: 0; }
.changes-heading + .changes { margin-top: 0; }
.side > .types { margin-bottom: 0; }
.side > .record-search { margin: 0 0 .5rem; padding-bottom: .5rem; }
.live-badge { margin: 0; padding: .08rem .35rem; font-size: .62rem; font-weight: 400; line-height: 1.3; color: var(--muted); }
.changes-page-heading { align-items: center; padding-bottom: .5rem; }
.changes-page-heading h1 { margin: 0; font-size: 1.25rem; }
.changes-page-heading p { margin: 0; }
.changes-wide { margin-top: .65rem; }
.changes-wide .changelog { font: 400 .72rem/1.4 var(--sans); color: var(--muted); }
.changes-wide .changelog > .log-entry { border-top-color: color-mix(in srgb, var(--line) 55%, transparent); }
.changes-wide .changelog > .log-entry { display: block; padding: 0; }
.changes-wide .log-line { display: grid; grid-template-columns: 16rem 4rem minmax(0, 1fr) 8rem 5rem; align-items: baseline; gap: .5rem; padding: .35rem .4rem; color: var(--muted); line-height: 1.4; cursor: pointer; list-style: none; }
.changes-wide .log-line::-webkit-details-marker { display: none; }
.changes-wide .log-line > * { min-width: 0; }
.changes-wide .log-time, .changes-wide .log-source { font: inherit; font-size: .7rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.changes-wide .log-time { display: grid; grid-template-columns: .75rem 3.1rem auto; align-items: baseline; gap: .25rem; }
.changes-wide .log-time .commit-number { margin: 0; font: inherit; color: var(--muted); }
.changes-wide li.log-entry .what { font: inherit; color: var(--muted); }
.changes-wide li.log-entry .what::before { content: none; }
.changes-wide .log-time::before { content: "▸"; display: inline-block; width: .75rem; color: var(--muted); }
.changes-wide details[open] > .log-line .log-time::before { content: "▾"; }
.changes-wide .log-count, .changes-wide .log-who { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.changes-wide .log-detail { --change-columns: minmax(10rem, 1fr) minmax(0, 2fr) minmax(12rem, 1.2fr); margin: 0 .4rem .5rem 1.4rem; padding: .4rem .6rem; border-left: 2px solid var(--line); border-radius: 0 3px 3px 0; background: var(--panel); }
.changes-wide .log-detail > ul { margin: 0; padding: 0; list-style: none; }
.changes-wide .log-detail p { margin: .15rem 0; font-size: .7rem; }
.changes-wide .change-columns, .changes-wide .change-record { display: grid; grid-template-columns: var(--change-columns); align-items: baseline; column-gap: .8rem; }
.changes-wide .change-columns { padding-bottom: .15rem; font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.changes-wide .change-record { margin: 0; padding: .2rem 0; border: 0; row-gap: .15rem; line-height: 1.25; }
.changes-wide .change-record + .change-record { border-top: 1px solid var(--line); }
.changes-wide .change-record > * { min-width: 0; }
.changes-wide .change-record strong { font-weight: 400; font-size: .72rem; color: var(--muted); }
.changes-wide .change-summary { font-size: .72rem; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.changes-wide .change-id { font: 400 .7rem/1.4 var(--sans); color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
.changes-wide .change-id code { font: inherit; }
.changes-wide .change-id:hover { text-decoration-color: currentColor; }
.changes-wide .change-endpoints { grid-column: 2 / -1; font-size: .65rem; }
.changes-tabs { margin: .25rem 0 0; }
.code-changes .log-line { grid-template-columns: 17rem minmax(0, 1fr) 12rem; }
.code-changes .log-time { grid-template-columns: .75rem 3.8rem auto; }
.code-changes .log-who { text-align: right; }
.code-changes .commit-sha { font: 400 .7rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); }
.code-changes .log-line .what { color: var(--ink); }
.code-changes .commit-body { margin: .1rem 0 .3rem; font: 400 .75rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.code-changes .log-detail code { font-size: .68rem; }
.code-changes > .empty, .code-changes > .problem { margin: .75rem 0; }
.changes-pagination, .pagination-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.changes-pagination { justify-content: space-between; border-top: 1px solid var(--line); padding: .5rem .4rem; font-size: .7rem; }
@media (max-width: 900px) {
  .changes-wide .log-line { grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .5rem; padding: .35rem .25rem; }
  .changes-wide .log-time { grid-template-columns: .65rem 3rem auto; gap: .2rem; font-size: .72rem; justify-content: start; }
  .changes-wide .log-source { font-size: .72rem; }
  .changes-wide .log-line .what { grid-column: 1 / -1; padding-left: .85rem; }
  .changes-wide .log-count { grid-column: 1; padding-left: .85rem; }
  .changes-wide .log-who { grid-column: 2; }
  .code-changes .log-line { grid-template-columns: minmax(0, 1fr) auto; }
  .changes-page .changes-wide .changelog > .log-entry.has-actions { padding-right: 0; }
  .changes-wide .log-entry .log-actions { position: static; width: fit-content; margin: 0 .25rem .35rem auto; }
  .changes-wide .log-detail { margin: .1rem .25rem .35rem .85rem; padding: .3rem .5rem; --change-columns: minmax(0, 1fr); }
  .changes-wide .change-columns { display: none; }
  .changes-wide .change-id, .changes-wide .change-endpoints { grid-column: 1; }
  .changes-wide .change-endpoints a { color: var(--muted); }
  .changes-pagination { gap: .4rem; padding: .4rem .25rem; }
}

.record-search, .panel form.record-search { display: flex; align-items: center; gap: .25rem; margin: .3rem 0; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.record-search input[type=search], .record-search button { box-sizing: border-box; height: 1.55rem; padding: .1rem .3rem; font-size: .8rem; line-height: 1.2; }
.record-search input[type=search] { flex: 1; min-width: 0; width: 0; }
.record-search button { flex-shrink: 0; padding-inline: .4rem; }
.record-search-results { list-style: none; margin: 0; padding: 0; }
.record-search-results > li { padding: .35rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; line-height: 1.35; }
.search-result-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .5rem; font-size: .85rem; }
.search-result-heading > a { font-weight: 600; }
.record-search-results p { margin: .1rem 0; font-size: .8rem; }
.record-search-results > li > a { font-size: .7rem; }

.changes-wide .changelog > .log-entry.has-actions { position: relative; padding-right: 6.5rem; }
.changes-wide .log-actions { position: absolute; right: .4rem; top: .35rem; display: flex; gap: .6rem; font-size: .7rem; line-height: 1.25; }
.changes-wide .log-actions a { color: var(--muted); }
.project-title { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.project-title h1 { margin-bottom: 0; }
.project-title .link.small { padding: 0; color: var(--muted); font-size: .75rem; line-height: 1.2; text-transform: none; letter-spacing: normal; }
.fork-page { max-width: 40rem; }
.fork-form { gap: .5rem; margin-top: 1.25rem; }
.fork-form .actions { margin-top: .25rem; }

.view-table [data-column][hidden] { display: none; }
.table-toolbar { display: flex; align-items: flex-start; gap: .5rem; }
.table-toolbar > form.toolbar { flex: 1; min-width: 0; }
.column-picker { flex: 0 0 auto; margin-left: auto; }
.column-picker-button { display: block; box-sizing: border-box; height: 1.55rem; padding: .1rem .4rem; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: .7rem; line-height: 1.2; white-space: nowrap; }
.column-menu { position: fixed; inset: auto; margin: 0; padding: .5rem; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); box-shadow: 0 5px 20px #0002; font: .8rem/1.4 var(--sans); text-align: left; text-transform: none; letter-spacing: normal; }
.column-menu-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .15rem .35rem .35rem; font-weight: 600; }
.column-menu label { display: flex; align-items: center; gap: .4rem; padding: .25rem .35rem; cursor: pointer; }
.column-menu label:hover { background: var(--paper); }
.column-menu label .muted { margin-left: auto; font-size: .65rem; }
.column-menu input { margin: 0; flex: 0 0 auto; }

.commit-number { font-weight: 600; color: var(--ink); white-space: nowrap; margin-right: .25rem; }

.view-table form.toolbar > button { box-sizing: border-box; height: 1.55rem; padding: .1rem .4rem; font-size: .75rem; line-height: 1.2; }
.view-table form.toolbar > label.inline { display: inline-flex; align-items: center; gap: .25rem; min-height: 1.55rem; }

.table-head { align-items: center; flex-wrap: wrap; gap: .4rem .75rem; padding-bottom: .5rem; margin-bottom: .4rem; }
.table-head > h3 { align-self: center; }
.table-head .table-toolbar { flex: 0 1 auto; min-width: 0; }
.table-head form.toolbar { margin-bottom: 0; }
.table-head > .add { align-self: center; white-space: nowrap; }

.table-head > .table-heading { flex: 1; min-width: 8rem; }
.table-heading h1 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.table-heading p { margin: .2rem 0 0; font-size: .75rem; }
.table-head .table-toolbar { align-items: center; gap: .5rem; }
.table-head input[type=search], .table-head button { border-color: var(--line); }
.table-head button, .table-head label.inline, .table-head > .add { color: var(--muted); font-size: .7rem; }
.table-head button:hover { color: var(--ink); border-color: var(--line-strong); }
.table-head .table-type { border: 0; padding: 0; font-size: .62rem; }
.table-markdown { min-width: 12rem; max-width: 32rem; max-height: 12rem; overflow: auto; white-space: normal; overflow-wrap: anywhere; font-size: .8rem; line-height: 1.4; }
.table-markdown > :first-child { margin-top: 0; }
.table-markdown > :last-child { margin-bottom: 0; }
.table-markdown p { margin: .3rem 0; }
.table-markdown pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.changelog > .compact-change { grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: .4rem; padding: .3rem 0; font: 400 .72rem/1.4 var(--sans); }
.changelog > .compact-change .commit-number { margin: 0; color: var(--muted); font: inherit; }
.changelog > li.compact-change .what { color: var(--muted); font: inherit; }
.changelog > li.compact-change { border-top-color: color-mix(in srgb, var(--line) 55%, transparent); }
.changelog > li.compact-change .what::before { content: none; }
/* the top bar on a narrow screen: brand and account stay on the first line, the trail drops to
   its own. Not scoped to a page any more - a canvas has the longest trail of the lot
   (organization / project / canvas) and was breaking a project's name across two lines. */
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: .4rem .75rem; }
  .brand { white-space: nowrap; }
  .crumbs { order: 3; flex-basis: 100%; flex-wrap: wrap; font-size: .75rem; }
  .who { flex-wrap: wrap; gap: .5rem; font-size: .75rem; }
}
@media (max-width: 540px) {
  .record .details { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .record .details dd + dt { margin-top: .65rem; }
}
