/* ============================================================
   workflows-hub.css
   Styles unique to the Workflows hub page and shared with
   the new individual workflow page (Workflow v2).
   Relies on tokens defined in styles.css.
   ============================================================ */


/* ---------- HERO ------------------------------------------- */
.wfh-hero {
  padding: 64px var(--pad-x) 56px;
  border-bottom: 1px solid var(--tap-line);
}
.wfh-hero-inner {
  max-width: calc(var(--maxw) - 2 * var(--pad-x));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: start;
}
.wfh-hero-copy { max-width: 720px; }
.wfh-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tap-orange);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.wfh-hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tap-orange);
}
.wfh-hero h1 {
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
.wfh-hero h1 .accent {
  font-style: italic;
  font-weight: 700;
  color: var(--tap-orange);
}
.wfh-hero-deck {
  margin-top: 24px;
  font-size: 19px;
  font-weight: 350;
  color: var(--tap-ink-2);
  line-height: 1.5;
  max-width: 58ch;
}
.wfh-hero-deck strong {
  color: var(--tap-orange-deep);
  font-weight: 700;
}


/* ---------- WHAT A WORKFLOW IS ----------------------------- */
.wfh-anatomy {
  padding: var(--pad-y) 28px;
  background: var(--tap-bg-warm);
  border-bottom: 1px solid var(--tap-line);
}
.wfh-anatomy-inner {
  max-width: calc(var(--maxw) - 2 * var(--pad-x));
  margin: 0 auto;
}
.wfh-anatomy-head {
  max-width: 880px;
  margin-bottom: 56px;
}
.wfh-anatomy-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tap-ink-3);
  margin-bottom: 18px;
}
.wfh-anatomy h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
.wfh-anatomy-deck {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--tap-ink-2);
  max-width: 70ch;
}
.wfh-anatomy-deck p { margin: 0 0 12px; }
.wfh-anatomy-deck p:last-child { margin-bottom: 0; }
.wfh-anatomy-stages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: var(--tap-card);
  border: 1px solid var(--tap-line);
  border-radius: 14px;
  overflow: hidden;
}
.wfh-stage {
  padding: 24px 22px 28px;
  border-right: 1px solid var(--tap-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.wfh-stage:last-child { border-right: none; }
.wfh-stage-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--tap-ink-3);
  font-variant-numeric: tabular-nums;
}
.wfh-stage-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tap-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.wfh-stage-name::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tap-orange);
}
.wfh-stage:nth-child(2) .wfh-stage-name::before { background: #F8954A; }
.wfh-stage:nth-child(3) .wfh-stage-name::before { background: #FFB371; }
.wfh-stage:nth-child(4) .wfh-stage-name::before { background: #C8B59E; }
.wfh-stage:nth-child(5) .wfh-stage-name::before { background: #6B6B6B; }
.wfh-stage-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--tap-ink-2);
  margin: 0;
}


/* ---------- LIBRARY ---------------------------------------- */
.wfh-library {
  padding: 56px var(--pad-x) 64px;
}
.wfh-library-inner {
  max-width: calc(var(--maxw) - 2 * var(--pad-x));
  margin: 0 auto;
}
/* Single-column library head */
.wfh-library-head {
  max-width: 760px;
  margin-bottom: 40px;
}
.wfh-library-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tap-ink-3);
  margin-bottom: 18px;
}
.wfh-library h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
.wfh-library-deck {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--tap-ink-2);
  max-width: 68ch;
}

/* Compact filter widget (sits next to hero copy) */
.wfh-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 22px 22px 16px;
  background: var(--tap-card);
  border: 1px solid var(--tap-line);
  border-radius: 14px;
  box-shadow: var(--tap-shadow-md);
  max-width: 380px;
  width: 100%;
  justify-self: start;
  /* Drop the widget down so its top edge sits with the h1, not the eyebrow */
  margin-top: 44px;
}
.wfh-filters-head {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tap-ink-3);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tap-line);
  margin-bottom: 4px;
}
.wfh-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.wfh-filter-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tap-ink-3);
}
.wfh-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.wfh-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--tap-ink);
  padding: 10px 32px 10px 12px;
  background: var(--tap-bg);
  border: 1px solid var(--tap-line-strong);
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.2;
  transition: border-color 120ms ease, background 120ms ease;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.wfh-select:hover { background: var(--tap-bg-warm); border-color: var(--tap-ink-3); }
.wfh-select:focus { outline: none; border-color: var(--tap-orange); background: #fff; }
.wfh-select-caret {
  position: absolute;
  right: 12px;
  width: 12px;
  height: 12px;
  pointer-events: none;
  color: var(--tap-ink-2);
}

.wfh-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--tap-line);
  margin-top: 4px;
}
.wfh-filters-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tap-ink);
  transition: color 120ms ease;
}
.wfh-filters-jump:hover { color: var(--tap-orange); }
.wfh-filters-jump strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.wfh-filters-jump svg { width: 11px; height: 11px; }
.wfh-clear {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tap-ink-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.wfh-clear:hover { color: var(--tap-orange); }
.wfh-clear[hidden] { display: none; }

/* Grid + cards */
.wfh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.wfh-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  background: var(--tap-card);
  border: 1px solid var(--tap-line);
  border-radius: 14px;
  box-shadow: var(--tap-shadow-sm);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  position: relative;
  color: inherit;
  min-height: 230px;
}
.wfh-card:hover {
  border-color: var(--tap-line-strong);
  box-shadow: var(--tap-shadow-md);
  transform: translateY(-2px);
}
.wfh-card[hidden] { display: none; }
.wfh-card-cat {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tap-ink-3);
}
.wfh-card-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 2px 0 0;
  text-wrap: balance;
}
.wfh-card-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--tap-ink-2);
  margin: 0;
  flex: 1;
}
.wfh-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--tap-line);
}
.wfh-card-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wfh-role-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--tap-orange-deep);
  background: var(--tap-orange-light);
  border: 1px solid #F7D6BA;
  border-radius: 6px;
  padding: 4px 9px;
}
.wfh-eir-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tap-orange-deep);
  background: var(--tap-orange-light);
  border: 1px solid #F7D6BA;
  padding: 4px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.wfh-eir-badge .conf-num { font-weight: 800; }

.wfh-empty {
  grid-column: 1 / -1;
  padding: 60px 28px;
  text-align: center;
  border: 1px dashed var(--tap-line-strong);
  border-radius: 14px;
  background: var(--tap-card);
}
.wfh-empty[hidden] { display: none; }
.wfh-empty h4 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--tap-ink);
}
.wfh-empty p {
  font-size: 14px;
  color: var(--tap-ink-2);
  margin: 0;
}


/* ---------- VALUE MODEL (methodology trust) ---------------- */
.wfh-value {
  padding: 56px var(--pad-x) 64px;
  background: var(--tap-bg-warm);
  border-top: 1px solid var(--tap-line);
  border-bottom: 1px solid var(--tap-line);
}
.wfh-value-inner {
  max-width: calc(var(--maxw) - 2 * var(--pad-x));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 80px;
  align-items: start;
}
.wfh-value-left .eyebrow { margin-bottom: 18px; color: var(--tap-ink-3); }
.wfh-value-left h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
.wfh-value-right p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--tap-ink-2);
  margin: 0 0 18px;
}
.wfh-value-right p:last-child { margin-bottom: 0; }
.wfh-value-right .wfh-pilot {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--tap-line-strong);
  font-style: italic;
  font-size: 15.5px;
  color: var(--tap-ink-2);
}


/* ---------- BREADCRUMB (used on both hub + individual) ----- */
.wf-crumbs {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--pad-x) 0;
  font-size: 13px;
  color: var(--tap-ink-3);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.wf-crumbs a {
  color: var(--tap-ink-3);
  transition: color 120ms ease;
}
.wf-crumbs a:hover { color: var(--tap-orange); }
.wf-crumbs svg {
  width: 11px;
  height: 11px;
  color: var(--tap-ink-3);
  opacity: 0.6;
}
.wf-crumbs .wf-crumb-current {
  color: var(--tap-ink-2);
  font-weight: 500;
}


/* ---------- RESPONSIVE ------------------------------------- */
@media (max-width: 1100px) {
  .wfh-hero-inner { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .wfh-filters { justify-self: stretch; max-width: 520px; margin-top: 0; }
  .wfh-grid { grid-template-columns: repeat(2, 1fr); }
  .wfh-value-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .wfh-hero { padding-top: 56px; padding-bottom: 56px; }
  .wfh-library { padding-top: 56px; padding-bottom: 64px; }
  .wfh-value { padding-top: 56px; padding-bottom: 64px; }
  .wfh-grid { grid-template-columns: 1fr; }
  .wfh-filters { max-width: none; }
}
