/* "Hire me as a workflow": n8n-style canvas on /services. Theme vars only. */
.hf { max-width: 1060px; margin: 0 auto; }
.hf-canvas {
  position: relative; border-radius: 22px; padding: 1.4rem 1rem 1.2rem; border: 1px solid var(--border-soft, #dde5ec);
  background-color: var(--card-bg);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--text-muted) 28%, transparent) 1px, transparent 1.2px);
  background-size: 18px 18px; box-shadow: var(--shadow-soft);
}
@media (min-width: 900px) { .hf-canvas { padding: 2.2rem 1.6rem 1.6rem; } }
.hf-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.hf-file { font-size: 0.82rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.45rem; }
.hf-file b { color: var(--text-main); font-weight: 600; }
.hf-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.hf-run {
  border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.86rem; padding: 0.55rem 1.05rem; border-radius: 10px;
  background: #d2412b; color: #fff; display: inline-flex; align-items: center; gap: 0.45rem; box-shadow: 0 6px 16px rgba(255,109,90,.25);
}
.hf-run:disabled { opacity: 0.6; cursor: default; }
.hf-run svg { width: 13px; height: 13px; }

.hf-nodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hf-nodes { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.4rem; } }
.hf-node { position: relative; display: flex; align-items: center; gap: 0.8rem; }
@media (min-width: 900px) { .hf-node { flex-direction: column; text-align: center; gap: 0.55rem; } }

/* connectors */
.hf-node:not(:last-child)::after {
  content: ''; position: absolute; background: var(--border-soft, #dde5ec); transition: background 0.3s;
  left: 32px; top: 64px; width: 2px; height: calc(1.4rem + 2px);
}
@media (min-width: 900px) {
  .hf-node:not(:last-child)::after { left: calc(50% + 34px); top: 31px; width: calc(100% - 68px + 1.4rem); height: 2px; }
}
.hf-node.is-done:not(:last-child)::after { background: #22c55e; }

.hf-box {
  position: relative; flex: none; width: 64px; height: 64px; border-radius: 16px; cursor: pointer; font: inherit;
  display: grid; place-items: center; font-size: 1.55rem; background: var(--card-bg); color: var(--text-main);
  border: 2px solid var(--border-soft, #dde5ec); box-shadow: 0 6px 16px rgba(15,124,130,.08);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.hf-node:first-child .hf-box { border-radius: 30px 16px 16px 30px; }
.hf-node:last-child .hf-box { border-radius: 16px 30px 30px 16px; }
.hf-box:hover { transform: translateY(-2px); border-color: var(--accent); }
.hf-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hf-node.is-active .hf-box { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,124,130,.15); }
.hf-node.is-running .hf-box { border-color: #ff6d5a; box-shadow: 0 0 0 4px rgba(255,109,90,.18); }
.hf-node.is-done .hf-box { border-color: #22c55e; }
.hf-node.is-done .hf-box::after {
  content: '✓'; position: absolute; right: -7px; bottom: -7px; width: 20px; height: 20px; border-radius: 50%;
  background: #22c55e; color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center;
}
.hf-label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--text-main); line-height: 1.25; }
.hf-sub { display: block; font-size: 0.74rem; color: var(--text-muted); margin-top: 0.1rem; }
.hf-items { display: none; font-size: 0.68rem; color: #16a34a; font-weight: 600; margin-top: 0.15rem; }
.hf-node.is-done .hf-items { display: block; }

.hf-panel {
  margin-top: 1.5rem; border-radius: 16px; border: 1px solid var(--border-soft, #dde5ec); background: var(--card-bg);
  padding: 1rem 1.15rem; display: grid; gap: 0.6rem 1.4rem; grid-template-columns: 1fr;
}
@media (min-width: 760px) { .hf-panel { grid-template-columns: 1.6fr 1fr; } }
.hf-panel h3 { margin: 0 0 0.3rem; font-size: 1.02rem; color: var(--text-main); }
.hf-panel p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.hf-out { border-left: 3px solid var(--accent); padding-left: 0.9rem; align-self: start; }
.hf-out span { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; margin-bottom: 0.2rem; }
.hf-out b { font-weight: 600; color: var(--text-main); font-size: 0.92rem; }
.hf-cta { display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.2rem; }
.hf-btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.92rem; padding: 0.7rem 1.3rem; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none; display: inline-flex; align-items: center; }
html[data-theme="dark"] .hf-btn { color: #062022; }
@media (prefers-reduced-motion: reduce) { .hf-box, .hf-node::after { transition: none; } }
