/* Automations, one at a time (console/automations.js, docs/AUTOMATIONS.md §11): the diagram of an automation — Trigger →
   Limits → Target, each node carrying its runs — and the branches where runs left the line. Flat: hairlines and a rule
   on the left, no boxes, no shadows; theme tokens only. Wide, the line runs left to right; on a phone, top to bottom. */
.au-sum { display: inline-block; margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.au-bad { color: var(--bad-2); font-weight: 600; }
.au-open { color: inherit; text-decoration: none; }
.au-open:hover b, .au-open:focus-visible b { text-decoration: underline; }
.au-bnote { margin: -4px 0 8px; }
.au-form { padding: 4px 0 16px; border-bottom: var(--hair); margin-bottom: 8px; }
.au-days { margin: 4px 0 16px; }

.au-flow { display: flex; align-items: stretch; gap: 0; padding: 4px 0 8px; }
.au-node { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; background: transparent; color: var(--text);
  border: 0; border-left: 2px solid var(--line-2); padding: 6px 12px 8px; font: inherit; cursor: pointer; border-radius: 0; }
.au-node:hover { border-left-color: var(--control); }
.au-node.on { border-left-color: var(--canopy); }
.au-node:focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: 2px; }
.au-nk { font-size: 11.5px; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); }
.au-nt { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.au-nl { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.au-last { font-size: 12.5px; }
.au-bar { display: block; height: 3px; background: var(--line); margin-top: 2px; max-width: 220px; }
.au-bar i { display: block; height: 100%; background: var(--ok); }
.au-edge { flex: 0 0 28px; align-self: center; height: 1px; background: var(--line-2); position: relative; }
.au-edge::after { content: ""; position: absolute; right: 0; top: -3px; border: 3.5px solid transparent; border-left-color: var(--line-2); border-right: 0; }

.au-branches { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 0 2px; }
.au-br { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.au-bl { display: inline-block; width: 14px; height: 10px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-top: -8px; }
.au-br.warn { color: var(--warn); } .au-br.bad { color: var(--bad-2); }
.au-empty { margin: 4px 0 0 14px; }
.au-empty-flow .au-nl { color: var(--text-3); }
.au-runs td { vertical-align: top; }
.au-runs .au-note { overflow-wrap: anywhere; color: var(--text-2); margin-top: 4px; font-size: 13px; }
.au-runs td.au-at { width: 9em; white-space: nowrap; }

@media (max-width: 760px) {
  .au-flow { flex-direction: column; }
  .au-edge { flex: 0 0 18px; width: 1px; height: auto; margin-left: 12px; align-self: flex-start; }
  .au-edge::after { right: auto; left: -3px; top: auto; bottom: 0; border: 3.5px solid transparent; border-top-color: var(--line-2); border-bottom: 0; }
}

/* Step 7: an automation's call waiting in Needs you — which automation, exactly what will be sent, and what triggered
   it, quoted as data. Full width under the row, hairlines only. */
.au-ask { flex-basis: 100%; order: 5; min-width: 0; border-left: 2px solid var(--line-2); padding: 2px 0 2px 12px; }
.au-ask-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: 13px; color: var(--text-2); }
.au-ask-dl { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13px; }
.au-ask-dl dt { color: var(--text-3); font-size: 12px; padding-top: 1px; }
.au-ask-dl dd { margin: 0; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.au-ask-dl .mono, .au-args .mono { font-family: var(--mono); font-size: 12.5px; }
.au-args { border-collapse: collapse; }
.au-args th, .au-args td { text-align: left; vertical-align: top; padding: 2px 12px 2px 0; border-bottom: var(--hair); font-weight: 400; overflow-wrap: anywhere; }
.au-args th { color: var(--text-2); white-space: nowrap; }
.au-data { margin: 4px 0; padding: 6px 0 6px 10px; border-left: 1px solid var(--line-2); white-space: pre-wrap; overflow-wrap: anywhere; font: 12px var(--mono); color: var(--text-2); max-height: 16em; overflow: auto; }
.au-appr { color: var(--text-2); }
@media (max-width: 760px) {
  .au-ask-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .au-ask-dl dd { margin-bottom: 6px; }
  .au-args th { white-space: normal; }
}
