/* Automations: the flow list, settings and the flow builder
   (src/routes/automations.ts, public/static/app/automations.js).
   Tokens come from site.css, so light and dark both follow the theme;
   nothing here sets a color of its own except mixes of those tokens. */

.af-page {
  display: grid;
  /* minmax(0, 1fr): a wide child (the name field) never widens the page. */
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.af-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
}

.af-back svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

.af-back:hover {
  color: var(--text);
}

/* ---------- the list ---------- */

.af-flows,
.af-starters,
.af-rules {
  list-style: none;
  margin: 0;
  padding: 0;
}

.af-flows {
  display: grid;
  gap: 10px;
}

.af-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-raised);
}

.af-flow-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.af-flow-main:hover .af-flow-name {
  color: var(--accent);
}

.af-flow-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.af-flow-trigger {
  font-size: 13.5px;
  color: var(--text-dim);
}

.af-flow-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.af-flow-stats {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.af-flow-stats div {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.af-flow-stats dt {
  font: 500 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.af-flow-stats dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.af-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 12px;
  text-align: center;
  color: var(--text-dim);
}

.af-list-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.af-list-actions svg,
.af-head-actions svg {
  width: 16px;
  height: 16px;
}

.af-starters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.af-starter {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-panel);
}

.af-starter-title {
  margin: 0;
  font-size: 15px;
}

.af-starter-line {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.af-caps {
  margin: 0;
  font-size: 13.5px;
}

.af-rules {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
}

.af-rules li {
  padding-left: 16px;
  position: relative;
}

.af-rules li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
}

.af-sender {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-tint);
}

.af-sender p {
  margin: 0;
}

.af-dev summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.af-dev summary::-webkit-details-marker {
  display: none;
}

.af-dev summary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.af-dev[open] summary svg {
  transform: rotate(180deg);
}

.af-dev .code {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.af-delete {
  justify-self: start;
}

/* ---------- the builder ---------- */

.af-app {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.af-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
}

.af-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex: 1 1 280px;
}

.af-name {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 420px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.af-name:hover {
  border-color: var(--line);
}

.af-name:focus {
  border-color: var(--accent);
  background: var(--bg-input);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.af-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.af-saved {
  font-size: 13px;
  color: var(--text-faint);
  min-width: 52px;
}

.af-problems {
  margin: 0;
  padding-left: 18px;
}

.af-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-raised);
}

.af-stat {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  /* Hairlines between tiles that wrap cleanly at any column count. */
  box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line);
}

.af-stat-label {
  font: 500 10.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.af-stat-value {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.af-stat-sub {
  font-size: 12px;
  color: var(--text-faint);
}

.af-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.af-canvas {
  position: relative;
  min-width: 0;
  padding: 26px 16px 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  /* A faint dot grid, like a canvas, from the theme's hairline color. */
  background-color: var(--bg-panel);
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1.2px);
  background-size: 18px 18px;
  overflow-x: auto;
}

.af-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.af-node {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  width: min(100%, 360px);
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-raised);
  box-shadow: var(--shadow-card);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.af-node:hover {
  border-color: var(--text-faint);
}

.af-node:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-card);
  border-color: var(--accent);
}

.af-node.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-card);
}

.af-node.is-dragging {
  opacity: 0.45;
}

.af-node.is-drop {
  transform: translateY(4px);
  box-shadow: 0 -3px 0 var(--accent), var(--shadow-card);
}

.af-node-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-tint);
  color: var(--text-dim);
}

.af-node-icon svg {
  width: 19px;
  height: 19px;
}

.af-node[data-type='trigger'] .af-node-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.af-node[data-type='email'] .af-node-icon,
.af-node[data-type='sms'] .af-node-icon,
.af-node[data-type='notify'] .af-node-icon {
  background: var(--chip-ok-bg);
  color: var(--chip-ok-fg);
}

.af-node[data-type='branch'] .af-node-icon {
  background: var(--chip-warn-bg);
  color: var(--chip-warn-fg);
}

.af-node-kind {
  font: 500 10.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.af-node-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.af-node-sum {
  font-size: 14.5px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.af-node-stat {
  grid-column: 2 / -1;
  font-size: 12px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.af-node-warn {
  grid-column: 2 / -1;
  font-size: 12px;
  color: var(--chip-warn-fg);
}

.af-grip {
  display: grid;
  place-items: center;
  width: 22px;
  height: 30px;
  color: var(--text-faint);
  cursor: grab;
}

.af-grip svg {
  width: 14px;
  height: 14px;
}

/* The line between steps, with the add button in the middle. */
.af-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 2px;
  height: 46px;
  background: var(--line-strong);
}

.af-link.is-drop {
  background: var(--accent);
}

.af-add {
  position: absolute;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

/* A bigger tap area than the dot itself (44px). */
.af-add::after {
  content: '';
  position: absolute;
  inset: -8px;
}

.af-add:hover,
.af-add:focus-visible,
.af-add[aria-expanded='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  outline: none;
}

.af-add svg {
  width: 15px;
  height: 15px;
}

.af-end {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: var(--bg-raised);
  font: 500 10.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.af-branch {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px;
  width: 100%;
  padding-top: 10px;
}

.af-arm {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 12px 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-raised) 55%, transparent);
}

.af-arm-label {
  padding: 3px 10px;
  border-radius: 999px;
  font: 600 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.af-arm[data-arm='yes'] .af-arm-label {
  background: var(--chip-ok-bg);
  color: var(--chip-ok-fg);
}

.af-arm[data-arm='no'] .af-arm-label {
  background: var(--bg-tint);
  color: var(--text-dim);
}

/* The add menu. */
.af-menu {
  position: absolute;
  z-index: 30;
  display: grid;
  gap: 2px;
  width: 260px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  box-shadow: var(--shadow-menu);
}

.af-menu button {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
}

.af-menu button:hover,
.af-menu button:focus-visible {
  background: var(--bg-hover);
  outline: none;
}

.af-menu button:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}

.af-menu button svg {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}

.af-menu small {
  color: var(--text-faint);
  font-size: 12px;
}

/* The side panel; a bottom sheet on phones. */
.af-panel {
  position: sticky;
  top: 80px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 100px);
  padding: 18px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-raised);
  box-shadow: var(--shadow-panel);
}

.af-panel-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.af-panel-head h2 {
  margin: 0;
  font-size: 17px;
}

.af-panel-close {
  display: none;
}

.af-panel .field {
  margin: 0;
}

.af-panel-empty {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.af-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.af-row .field-input {
  width: auto;
  flex: 1 1 120px;
}

.af-choices {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.af-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14.5px;
}

.af-choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.af-choice input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.af-merge {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.af-merge button {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--text-dim);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
}

.af-merge button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.af-blocks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-block {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-panel);
}

.af-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.af-block-head .af-node-kind {
  flex: 1;
}

.af-icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 15px;
}

.af-icon-btn:hover {
  border-color: var(--line);
  background: var(--bg-hover);
  color: var(--text);
}

.af-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.af-icon-btn svg {
  width: 15px;
  height: 15px;
}

.af-counter {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.af-counter.is-over {
  color: var(--danger-fg);
}

.af-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-tint);
  font-size: 13.5px;
  color: var(--text-dim);
}

.af-panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Preview and test run dialogs. */
.af-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: var(--shadow-sheet, var(--shadow-panel));
}

.af-dialog::backdrop {
  background: var(--scrim);
}

.af-dialog-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.af-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.af-dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.af-preview {
  width: 100%;
  height: min(560px, 60vh);
  border: 1px solid var(--line);
  border-radius: 12px;
  /* The email is drawn on its own light paper, as mail apps show it. */
  background: #f8f6f1;
}

.af-preview-text {
  max-height: 200px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-tint);
  font-size: 12.5px;
  white-space: pre-wrap;
}

.af-people {
  display: grid;
  gap: 4px;
  max-height: 220px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.af-people button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.af-people button[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.af-people span:last-child {
  color: var(--text-faint);
  font-size: 12.5px;
}

.af-outcomes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-outcome {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-panel);
  font-size: 14px;
}

.af-outcome b {
  font: 600 10.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--text-dim);
}

.af-outcome[data-outcome='ok'] b,
.af-outcome[data-outcome='yes'] b {
  background: var(--chip-ok-bg);
  color: var(--chip-ok-fg);
}

.af-outcome[data-outcome='skipped'] b,
.af-outcome[data-outcome='held'] b,
.af-outcome[data-outcome='failed'] b {
  background: var(--chip-warn-bg);
  color: var(--chip-warn-fg);
}

.af-outcome-step {
  font-weight: 600;
}

.af-loading {
  margin: 0;
}

@media (max-width: 1100px) {
  .af-work {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Below the canvas width the panel becomes a sheet from the bottom. */
  .af-panel {
    position: fixed;
    z-index: 70;
    inset: auto 0 0 0;
    top: auto;
    max-height: 82vh;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    transform: translateY(105%);
    transition: transform 0.25s ease;
  }

  .af-panel.is-open {
    transform: none;
    /* A scrim behind the sheet, without another element. */
    box-shadow: 0 0 0 100vmax var(--scrim), var(--shadow-panel);
  }

  .af-panel-close {
    display: grid;
  }
}

@media (max-width: 720px) {
  .af-branch {
    grid-template-columns: minmax(0, 1fr);
  }

  .af-canvas {
    padding: 20px 10px 28px;
  }

  .af-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .af-flow-meta {
    justify-self: start;
  }

  .af-head-actions {
    width: 100%;
  }

  .af-head-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af-panel,
  .af-node,
  .af-add {
    transition: none;
  }
}

/* ---------------- sending domains: records to copy (src/routes/sending.ts) ----------------
   Each record is a small stack, not a table row, so long DKIM names wrap at 390px.
   Colors are the shared tokens only, so light and dark stay matched. */

.sd-recs {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sd-rec {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.sd-rec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13.5px;
}

.sd-type {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.sd-purpose {
  min-width: 0;
  color: var(--text-dim);
}

.sd-rec-head .pill {
  margin-left: auto;
}

.sd-rec-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
}

.sd-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.sd-rec-row code,
.sd-found code {
  min-width: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.sd-rec-row .btn {
  gap: 4px;
}

.sd-rec-row .btn svg {
  width: 14px;
  height: 14px;
}

.sd-found {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.sd-more > summary {
  margin-bottom: 10px;
}

@media (max-width: 520px) {
  .sd-rec-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sd-label {
    grid-column: 1 / -1;
  }
}

/* ---------------- texting number (/app/texting) ---------------- */

.tx-page {
  max-width: 760px;
}

.tx-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tx-path {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tx-path span {
  font-size: 13.5px;
  color: var(--text-dim);
}

.tx-path:hover {
  border-color: var(--line-strong);
}

.tx-path.is-on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--accent-soft);
}

.tx-fees {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tx-fees th,
.tx-fees td {
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.tx-fees thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.tx-fees tbody th {
  font-weight: 500;
}

.tx-fees .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tx-fees td:last-child {
  color: var(--text-dim);
}

.tx-set {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tx-set legend {
  padding: 0 6px;
  font-weight: 600;
}

.tx-two,
.tx-three {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tx-three {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
}

.tx-stages {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tx-stage {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 14px;
}

.tx-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
}

.tx-stage-done .tx-dot {
  background: var(--cta);
  border-color: var(--cta);
}

.tx-stage-now .tx-dot {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tx-stage-failed .tx-dot {
  border-color: var(--danger);
  background: var(--danger);
}

.tx-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.tx-actions form {
  margin: 0;
}

.tx-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.tx-number {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
}

@media (max-width: 720px) {
  .tx-paths,
  .tx-numbers,
  .tx-two {
    grid-template-columns: minmax(0, 1fr);
  }

  .tx-three {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .tx-three > :first-child {
    grid-column: 1 / -1;
  }
}

.tx-fees .tx-date {
  white-space: nowrap;
}
