/* Agent work on your own machine (machine-flows.js): the join steps under Add a machine, the New SSH key form with
   where a key may be used, the deploy-key truth, the repository's key line, and agent work in the New task form.
   Flat: hairlines and spacing, no boxes, theme tokens only; one column on a phone. */
.mf-small { font-size: 12.5px; line-height: 1.45; margin: 4px 0 0; }
.mf-warn { color: var(--warn); }
.mf-ok { color: var(--ok); font-weight: 600; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--sky); text-decoration: underline; cursor: pointer; }

/* 1. Joining: three numbered steps on hairlines; the code field appears in step 2 when the machine asks. */
.mf-join { margin-top: 12px; }
.mf-join > .mf-warn { margin: 0 0 6px; font-size: 12.5px; }
.mf-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mf-steps > li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.mf-steps > li > div { flex: 1; min-width: 0; }
.mf-steps b { color: var(--text); font-weight: 600; font-size: 13.5px; }
.mf-n { flex: none; width: 20px; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 13px; line-height: 1.5; }
.mf-steps .inv-link { margin-top: 8px; }
.mf-wait { margin-top: 6px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; animation: mf-pulse 1.6s ease-in-out infinite; }
@keyframes mf-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .mf-dot { animation: none; } }
.mf-code { margin-top: 10px; padding: 0; align-items: flex-end; }
.mf-code input { font-size: 18px; letter-spacing: .2em; max-width: 11ch; }
.mf-err { font-size: 12.5px; flex-basis: 100%; }
.mf-err:empty { display: none; }
.mf-ssh .mf-err { margin: 0 0 10px; }
#skFill { margin-bottom: 12px; }

/* 2. The New SSH key form: what it signs in to, then where it may be used. */
.mf-seg { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0 0 12px; font-size: 13px; color: var(--text); }
.mf-seg label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.mf-seg input { accent-color: var(--canopy); }
.mf-grow { flex: 2 1 240px !important; min-width: 0; }
.mf-cmds { margin-top: 4px; }
.mf-cmds pre { margin: 4px 0 0; font: 12px var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.mf-where { border: 0; border-top: 1px solid var(--line); margin: 4px 0 12px; padding: 10px 0 0; min-width: 0; }
.mf-where legend { padding: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.mf-where .checks { gap: 0; }
.mf-where .check div { color: var(--text); }
.mf-sub { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 12px 28px; border-bottom: 1px solid var(--line); }
.mf-sub[hidden] { display: none; }
.mf-sub .vf-row { flex-basis: 100%; padding-bottom: 4px; }
.mf-machs { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-end { align-items: center; }
.mf-end .check { border: 0; padding: 0; }

/* 3. Adding the key: the truth about write access, under the instructions. */
.mf-add .ph p { margin: 4px 0 0; }
.mf-truth { margin: 10px 0 0; }
.mf-truth p { margin: 0 0 6px; }
.mf-truth p:last-child { margin: 0; }

/* 4. The repository's key line. */
.mf-cov > span:nth-child(2) { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }

/* 5. Agent work in the New task form. */
.mf-aw { margin: 0 0 12px; }
.mf-aw-on { border-top: 1px solid var(--line); }
.mf-aw > div { padding: 10px 0 0 28px; }
.mf-prompt { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.mf-prompt textarea { background: var(--ink-2); border: 1px solid var(--control); border-radius: 4px; padding: 9px 11px; color: var(--text); font: 14px var(--sans); }
.mf-aw-say p { margin: 0 0 6px; font-size: 13px; }

@media (max-width: 640px) {
  .mf-sub, .mf-aw > div { padding-left: 0; }
  .mf-code input { max-width: none; flex: 1; }
  .mf-grow { flex-basis: 100% !important; }
}

/* 8. The node's version, the update command when it's behind, and everything it reports (a section that opens). */
.mf-update { padding: 10px 0 12px; border-top: 1px solid var(--line); }
.mf-update .mf-small:first-child { margin-top: 0; }
.mf-update .inv-link { margin-top: 6px; }
.mf-report { border-top: 1px solid var(--line); padding: 10px 0 4px; margin: 0 0 12px; }
.mf-report > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text); list-style-position: outside; }
.mf-report > summary .dim { font-weight: 400; font-size: 12.5px; }
.mf-report h4 { margin: 14px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.mf-report .mch-kv { margin-bottom: 4px; }
@media (max-width: 560px) { .mf-report .mch-kv { grid-template-columns: 1fr; gap: 0 0; } .mf-report .mch-kv dd { margin-bottom: 6px; } }

/* 0. Add a machine (machine-flows.js addMachine): the computer first, what it needs, then four steps with an icon each.
   Flat: the picked computer is underlined, steps sit on hairlines, a step done shows a check. One column on a phone. */
.am { margin-top: 10px; min-width: 0; }
.am-lead { margin: 0 0 10px; color: var(--text-2); font-size: 13px; }
.am-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.am-os { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 12px; cursor: pointer; color: var(--text-2); text-align: center; min-width: 0; }
.am-os input { position: absolute; opacity: 0; pointer-events: none; }
.am-os svg { width: 28px; height: 28px; }
.am-os b { font-weight: 600; font-size: 14px; color: var(--text); }
.am-tag { font-size: 11.5px; color: var(--text-3); min-height: 1.3em; }
.am-os:has(input:checked) { color: var(--canopy); box-shadow: inset 0 -2px 0 var(--canopy); }
.am-os:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.am-phone { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 13px; color: var(--text-2); }
.am-phone svg { width: 18px; height: 18px; flex: none; color: var(--sky); }
.am-hint { margin-top: 10px; }
.am-needs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: var(--text-2); }
.am-needs li { display: inline-flex; gap: 6px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.am-needs li::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); transform: translateY(-2px); }
.am-steps { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.am-steps > li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.am-steps > li > div { flex: 1; min-width: 0; }
.am-steps > li > div > b { color: var(--text); font-weight: 600; font-size: 14px; }
.am-n { flex: none; width: 24px; height: 24px; color: var(--text-3); }
.am-n svg { width: 22px; height: 22px; }
.am-steps > li.on .am-n { color: var(--canopy); }
.am-steps > li.done .am-n { color: var(--ok); }
.am-steps > li:not(.on):not(.done) > div > b { color: var(--text-2); }
.am-cmd { display: flex; gap: 10px; align-items: flex-start; margin-top: 6px; padding: 6px 0 6px 10px; border-left: 2px solid var(--line-2); min-width: 0; }
.am-cmd code { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.5; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 3px; user-select: all; }
.am-cmd .btn { flex: none; }
.am-then { margin-top: 10px; }
.am-name { margin-top: 8px; padding: 0; align-items: flex-end; }
.am-more { margin-top: 8px; font-size: 12.5px; }
.am-more > summary { cursor: pointer; color: var(--sky); }
.am-sha { overflow-wrap: anywhere; }
.am-ok { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; font-size: 13.5px; }
.am-ok svg { width: 18px; height: 18px; color: var(--ok); }
.am-next { list-style: none; margin: 6px 0 0; padding: 0; }
.am-next > li { padding: 6px 0; font-size: 13px; }
.am-next > li + li { border-top: 1px solid var(--line); }
.am-next b { font-weight: 600; color: var(--text); }
.am-not { margin-top: 12px; font-size: 13.5px; }
.am-not p { margin: 0 0 6px; }
.am-foot { margin-top: 10px; }
.am .mf-wait { margin: 6px 0 0; }
@media (max-width: 640px) {
  .am-name { flex-direction: column; align-items: stretch; }
  .am-name input { min-width: 0; }
  .am-needs { flex-direction: column; }
}
