/* Who may use a machine, and where your Steward answers (machine-access.js, docs/MACHINE-ACCESS.md). Flat: hairlines,
   no boxes; the tokens carry light, dark and high contrast. */

/* The Steward page: where it answers. One line, a hairline under it. */
.ma-line { border-bottom: 1px solid var(--line); padding: 8px 0 10px; margin: 6px 16px 0; min-width: 0; }
@media (max-width: 600px) { .ma-line { margin-left: 14px; margin-right: 14px; } }
.ma-line[hidden] { display: none; }
.ma-place { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; }
.ma-where { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.ma-where b { color: var(--text); font-weight: 600; }
.ma-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); }
.ma-dot.on { background: var(--ok); }
.ma-dot.off { background: var(--warn); }
.ma-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.ma-pick select, .ma-role select { font: inherit; font-size: 13px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line-2); padding: 4px 2px; max-width: 220px; }
.ma-pick select:focus-visible, .ma-role select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Turns waiting for a machine: rows with a hairline, the action at the end. */
.ma-waits { list-style: none; margin: 8px 0 0; padding: 0; }
.ma-wait { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ma-wt { font-weight: 600; color: var(--warn); font-size: 12px; }
.ma-wp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ma-wn { grid-column: 2; font-size: 12px; min-width: 0; overflow-wrap: anywhere; }
.ma-wait .btn { grid-column: 3; grid-row: 1 / span 2; }
@media (max-width: 560px) {
  .ma-wait { grid-template-columns: auto 1fr; }
  .ma-wait .btn { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .ma-pick { width: 100%; justify-content: space-between; }
}

/* A machine's "Who may use it". */
.ma-form { display: grid; gap: 12px; padding: 10px 0 4px; border-top: 1px solid var(--line); }
.ma-use { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.ma-use legend { font-size: 13px; font-weight: 600; color: var(--text); padding: 0; margin-bottom: 6px; }
.ma-seg { display: inline-flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); }
.ma-seg label { position: relative; cursor: pointer; }
.ma-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ma-seg span { display: block; padding: 6px 12px 7px; font-size: 13px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ma-seg input:checked + span { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.ma-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.ma-people { display: grid; gap: 0; max-height: 240px; overflow: auto; }
.ma-people[hidden], .ma-role[hidden] { display: none; }
.ma-key { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; min-width: 0; }
.ma-key:first-child { border-top: 0; }
.ma-key span:nth-of-type(1) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ma-key .mono { font-size: 11.5px; }
.ma-role { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.ma-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ma-acts .dim { font-size: 12px; }
.ma-log { list-style: none; margin: 6px 0 0; padding: 0; }
.ma-log li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ma-log li:first-child { border-top: 0; }
.ma-frame { margin-top: 6px; }

/* "<machine> is offline": the one choice, nothing sent until it's made. */
.ma-dialog { border: 0; border-top: 1px solid var(--line-2); border-radius: 0; padding: 20px 20px 16px; max-width: min(440px, calc(100vw - 32px)); width: 100%; background: var(--ink-2); color: var(--text); }
.ma-dialog::backdrop { background: color-mix(in srgb, var(--ink-0) 55%, transparent); }
.ma-dialog h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.ma-dialog p { margin: 0 0 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.ma-dialog .ma-acts { justify-content: flex-end; }

/* Add a machine's last step, Who may use it (machine-flows.js): flat, hairlines between the parts, no boxes. */
.ma-first { display: grid; gap: 10px; margin-top: 4px; min-width: 0; }
.ma-first .mf-small { margin: 0; }
.ma-first .ma-kind { justify-self: start; }
.ma-first .ma-use { padding-top: 10px; border-top: 1px solid var(--line); }
.ma-first .ma-use legend { float: left; width: 100%; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.ma-first .ma-seg { max-width: 100%; }
.ma-first .check { border-bottom: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
.ma-first .check[hidden] { display: none; }
.ma-first .ma-acts { padding-top: 2px; }
.ma-done { margin: 6px 0 0; font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.ma-done .dim { font-size: 12.5px; }
@media (max-width: 600px) {
  .ma-first .ma-seg span { padding: 8px 10px 9px; }
  .ma-first .ma-acts .btn { flex: 1 1 auto; justify-content: center; }
}
