/* Workflows manager — the saved-chain list, its buttons and the how-to panel.
   Measured off their live /workflows: a centred head with a small BETA, an
   800px card (1px #dadce0-ish border, 8px radius, faint shadow) whose header
   row carries outline-green Create New / Export / Import over a hairline, and
   rows of name, pencil + bin, the "flatten > compress" chain and a pale-green
   Launch. */

/* Their head: no tool icon, a 36px title with BETA, and a 26px grey lead.
   The full shell/dedicated scope is needed — app.css sizes the dedicated
   tool-head with a three-class rule that a bare header.wf-head cannot
   outrank. */
.wf-head { text-align: center; align-items: center; }
.wf-head .tool-head-ico { display: none; }
.tool-shell .tool-page-dedicated .tool-head.wf-head h1 { font-size: 2.25rem; }
.tool-shell .tool-page-dedicated .tool-head.wf-head .lead { font-size: 1.6rem; color: #9aa5aa; }
.wf-beta {
  font-size: .44em; font-weight: 400; letter-spacing: .05em;
  vertical-align: super; margin-left: 8px; color: var(--ink);
}

.wf-panel {
  width: 100%; max-width: 800px; margin: 26px auto 30px;
  border: 1px solid var(--line-strong, #ced5d7);
  border-radius: 8px;
  background: var(--white, #fff);
  padding: 30px 40px 40px;
  box-shadow: 0 4px 7px rgba(50, 50, 93, .06), 0 1px 3px rgba(0, 0, 0, .04);
}

.wf-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line, #e6e9ea);
  padding-bottom: 24px;
}

.wf-panel-head h2 {
  margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em;
}

.wf-panel-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Their three buttons: white, 1px green outline, green text, 3px radius. */
.wf-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 35px; padding: 0 14px; cursor: pointer;
  border: 1px solid var(--accent); border-radius: 3px;
  background: var(--white); color: var(--accent);
  font: inherit; font-size: .9rem;
}
.wf-btn i { font-size: .95rem; }
.wf-btn:hover { background: var(--accent-soft); }

.wf-list { list-style: none; margin: 0; padding: 50px 0 0; }

/* Their rows are 90px tall with the name centred — the crop of air above
   and below is what "they have space" means. */
.wf-row {
  display: flex; align-items: center; gap: 14px;
  min-height: 90px; padding: 0;
}

.wf-row.editing .wf-name { color: var(--accent-dark); }

.wf-name {
  flex: 1 1 auto; min-width: 0;
  font-weight: 500; font-size: 1.02rem; color: var(--ink, #1b2430);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Their row: pencil, bin, then the chain in their grey, then Launch. */
.wf-row-actions {
  display: flex; align-items: center; gap: 2px; flex: 0 0 auto;
}
.wf-icon {
  border: 0; background: transparent; cursor: pointer;
  width: 32px; height: 32px; border-radius: 4px;
  color: var(--accent); font-size: 17px; line-height: 1;
}
.wf-icon:hover { background: var(--accent-soft); color: var(--accent-dark); }

.wf-chain {
  flex: 0 1 auto; min-width: 0; max-width: 300px;
  color: #9aa5aa; font-size: .88rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.wf-launch {
  border: 1px solid transparent; cursor: pointer;
  background: rgba(31, 122, 109, .07); color: var(--accent);
  font-weight: 400; font-size: 1.125rem;
  height: 40px; padding: 0 20px; border-radius: 4px;
  margin-left: 40px;
}
.wf-launch:hover { background: var(--accent-soft); }

.wf-empty { margin: 16px 0 4px; color: var(--muted); font-size: 14px; }

.wf-how-link {
  border: 0; background: none; cursor: pointer; padding: 0;
  color: var(--accent); font-size: 14px; margin-left: 6px;
  text-decoration: none;
}

/* ------------------------------------------------------------- how-to panel */
/* Measured off their modal: an 850px square-cornered panel near the top of
   the window, a 17px title bar, three columns with green 17px numbers and
   grey descriptions, and a right-aligned green-text Close. */
.wf-modal {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(16, 24, 32, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 30px 20px;
  overflow: auto;
}
.wf-modal[hidden] { display: none; }

.wf-modal-card {
  position: relative;
  background: #fff; border-radius: 0;
  width: min(850px, 100%);
  max-height: none;
  padding: 0 0 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
}

.wf-modal-card h2 {
  margin: 0; padding: 20px 22px 14px;
  font-size: 1.06rem; font-weight: 400;
  border-bottom: 1px solid var(--line, #e6e9ea);
}

.wf-modal-x {
  position: absolute; top: 14px; right: 16px;
  border: 0; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: #9aa5b1; padding: 4px 6px;
}
.wf-modal-x:hover { color: #55606c; }

/* Three columns across, numbered, like their panel. */
.wf-how {
  list-style: none; margin: 0; padding: 34px 50px 30px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.wf-how-n {
  display: block;
  color: var(--accent);
  font-size: 1.3rem; font-weight: 600; margin-bottom: 24px;
}

.wf-how h3 { margin: 0 0 8px; font-size: 1.06rem; font-weight: 400; color: var(--ink); }
.wf-how p { margin: 0; color: #9aa5aa; font-size: 1.06rem; line-height: 1.55; }
.wf-how code {
  background: #f3f5f8; border-radius: 4px; padding: 1px 5px;
  font-size: .8rem; color: #34404d;
}

.wf-modal-foot {
  margin: 0; padding: 16px 22px 20px;
  background: none; border-top: 0;
  display: flex; justify-content: flex-end; gap: 10px;
}

/* Their Close: quiet, green text. */
.wf-close {
  border: 0; background: none; cursor: pointer;
  color: var(--accent); font: inherit; font-size: .9rem;
  padding: 8px 16px; border-radius: 4px;
}
.wf-close:hover { background: var(--accent-soft); }

/* ---- their workflow run screen (?id=…): breadcrumb head + upload band ---
   Their band is FULL-BLEED: a flat plate whose top and bottom edges are drawn
   by two full-width SVG curves (their x-curve-up separator above, plus a
   curve pinned to the band's foot). The plate here is a touch darker than
   our page grey so the curves read the way their #f5f5f5-on-#fbfbfb does. */
.wf-run {
  --wf-band: #eff1f1;
  width: 100vw; margin-left: calc(50% - 50vw);
  margin-top: 28px;
}
.wf-curve-up {
  display: block; width: 100%; height: 100px;
  margin-top: -20px; margin-bottom: -5px;
}
.wf-curve-up path:nth-child(1) { fill: var(--bg); }
.wf-curve-up path:nth-child(2) { fill: var(--wf-band); }
.wf-run-band {
  position: relative;
  background: var(--wf-band);
  padding: 30px 20px 46px;
  text-align: center;
}
.wf-run-band.dragover { box-shadow: inset 0 0 0 2px var(--accent); }
.wf-curve-down {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: auto;
  margin-bottom: -10px;
}
.wf-curve-down path { fill: var(--bg); }
.wf-split-holder { position: relative; display: inline-block; }
.wf-split { display: inline-flex; }
/* Their button: 51px tall, 22px/700, 6px radius on the outer corners. */
.wf-run-band .wf-pick {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 6px 0 0 6px;
  font-size: 1.375rem; font-weight: 700; line-height: 1.2;
  padding: 12px 18px;
}
.wf-run-band .wf-pick i { font-size: 1.3rem; }
.wf-run-band .wf-caret {
  border-radius: 0 6px 6px 0;
  border-left: 1px solid rgba(255, 255, 255, .32);
  padding: 12px 10px; font-size: 1.05rem; line-height: 1.2;
}
.wf-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
  min-width: 230px; padding: 6px 0; text-align: left;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 12px 34px rgba(20, 30, 35, .16);
}
.wf-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 16px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .95rem; color: var(--ink);
}
.wf-menu-item i { width: 18px; font-size: 1.05rem; color: var(--muted); }
.wf-menu-item:hover { background: var(--accent-soft); color: var(--accent-dark); }
.wf-run-note { color: #888; font-size: 1.0625rem; line-height: 1.45; margin: 0; }
.wf-run-note:first-of-type { margin-top: 44px; }
.wf-run-dot { border-bottom: 1px dotted #b9bfc4; }
.wf-run-terms { margin: 14px 0 0; font-size: 1.0625rem; color: #888; }
/* Real destinations now that the legal pages exist — the spans that read
   "Terms of Use and Privacy Policy" became links, so drop cursor:default and
   give a hover cue like every other link on the site. */
.wf-run-link { color: #555; text-decoration: none; }
.wf-run-link:hover { color: var(--accent-dark); }

/* Their run-screen head: grey non-underlined "Workflows", a grey chevron,
   then the name in ink — all at the 36px/700 of the landing title. */
.wf-crumb {
  border: 0; background: none; cursor: pointer; padding: 0;
  color: #9aa5aa; font: inherit; font-weight: 700; text-decoration: none;
}
.wf-crumb:hover { color: #7b8890; text-decoration: none; }
.wf-run-sep { color: #9aa5aa; font-size: .85em; margin: 0 10px; font-style: normal; vertical-align: .04em; }
.wf-run-name { color: var(--ink); }

/* The chain under it: tokens with the same grey chevrons between them. */
.wf-chain-head { font-weight: 500; }
.wf-chain-sep { color: #9aa5aa; font-size: .78em; margin: 0 10px; font-style: normal; vertical-align: .04em; }

@media (max-width: 720px) {
  .wf-how { grid-template-columns: 1fr; gap: 20px; }
  .wf-panel { padding: 20px 16px; }
  .wf-list { padding-top: 18px; }
  /* The chain and the wide margins give way first on a phone. */
  .wf-row { min-height: 64px; }
  .wf-chain { display: none; }
  .wf-launch { margin-left: 0; padding: 0 14px; font-size: 1rem; }
  .wf-name { font-size: .98rem; }
}
