/* n8n workflow catalog. Loaded after ../styles.css; uses its tokens only. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero */
.wf-hero { grid-template-columns: 1fr; min-height: 0; padding-bottom: clamp(56px, 6vw, 88px); }
.wf-hero .hero-copy { max-width: 980px; }
.wf-hero .display { font-size: clamp(42px, 5.4vw, 78px); }

/* Stats strip */
.wf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hair); border-top: 1px solid var(--hair); }
.wf-stats > div { background: var(--bg); padding: 26px var(--pad) 28px; display: grid; gap: 6px; }
.wf-stats .num { font-size: clamp(40px, 4vw, 58px); }

#how .stamp { font-size: 22px; color: var(--ember); }

/* Filter bar */
.wf-catalog { padding-bottom: clamp(56px, 7vw, 96px); }
.wf-bar {
  position: sticky; top: 64px; z-index: 40;
  display: grid; grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 210px)); gap: 10px;
  padding: 14px 0 12px; margin: 0 0 18px;
  background: rgba(15,10,7,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
.wf-field { position: relative; display: block; min-width: 0; }
.wf-field input, .wf-field select {
  width: 100%; height: 44px; font-family: var(--mono); font-weight: 300; font-size: 13px; letter-spacing: .02em;
  color: var(--text); background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
  padding: 0 14px; outline: none; transition: border-color .15s;
  -webkit-appearance: none; appearance: none;
}
.wf-field select {
  padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--stone-2) 50%), linear-gradient(135deg, var(--stone-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat;
}
.wf-field select option, .wf-field select optgroup { background: var(--panel); color: var(--text); }
.wf-field input:focus, .wf-field select:focus { border-color: var(--ember); }
.wf-search svg { position: absolute; left: 13px; top: 13px; width: 18px; height: 18px; color: var(--stone-2); pointer-events: none; }
.wf-search input { padding-left: 40px; font-size: 14px; }
.wf-search input::placeholder { color: var(--stone-2); }
.wf-bar-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 22px; }
.wf-clear { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ember); }
.wf-clear:hover { color: var(--bone); }

/* Grid of cards */
.wf-grid { grid-template-columns: repeat(3, 1fr); }
.wf-grid:empty { display: none; }
.wf-card { gap: 12px; padding: 24px 24px 22px; min-height: 280px; transition: background .15s; }
.wf-card:hover { background: var(--panel); }
.wf-icons { display: flex; align-items: center; gap: 6px; min-height: 30px; flex-wrap: wrap; }
.wf-ico, .wf-chip {
  width: 30px; height: 30px; border-radius: 7px; flex: none;
  background: #f4f1ee; border: 1px solid var(--rule);
}
.wf-ico { object-fit: contain; padding: 5px; }
.wf-chip {
  display: inline-grid; place-items: center; background: var(--panel-2); color: var(--stone);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
}
.wf-more { font-family: var(--mono); font-size: 12px; color: var(--stone-2); margin-left: 2px; }
.wf-icons .tag { margin-left: auto; }
.wf-name { font-family: var(--serif); font-weight: 200; font-variation-settings: "opsz" 60; font-size: clamp(21px, 1.7vw, 24px); line-height: 1.18; letter-spacing: -.015em; color: var(--bone); }
.wf-name a { text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wf-name a:hover { color: var(--ember); }
.wf-ex {
  color: var(--stone) !important; font-size: 14.5px; line-height: 1.5; min-height: 4.5em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.wf-ex:empty {
  border-radius: 4px; min-height: 4.5em;
  background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 40%, var(--panel) 80%) 0 0 / 300% 100%;
  animation: wf-shimmer 1.4s linear infinite;
}
@keyframes wf-shimmer { to { background-position: -300% 0; } }
.wf-meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; color: var(--stone-2); }
.wf-meta span + span::before { content: "·"; margin: 0 8px; color: var(--dim); }
.wf-meta .v { color: var(--moss); }
.wf-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wf-foot .btn { padding: 9px 14px; font-size: 12px; }
.wf-paid { color: var(--sap); }

#sentinel { height: 1px; }
.wf-more-row { display: flex; justify-content: center; padding-top: 28px; }
.wf-more-row .btn[hidden] { display: none; }
.wf-empty { padding: 48px 0; text-align: center; color: var(--stone); font-size: 18px; border: 1px solid var(--hair); }
.wf-legal { margin-top: 28px; }

/* Detail panel */
.wf-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.62); opacity: 0; transition: opacity .25s; }
.wf-scrim.open { opacity: 1; }
.wf-scrim[hidden], .wf-panel[hidden] { display: none; }
.wf-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(700px, 100%);
  display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--rule); box-shadow: -30px 0 80px -20px rgba(0,0,0,.7);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.wf-panel.open { transform: none; }
.wf-panel-head { display: flex; align-items: center; gap: 18px; padding: 14px 22px; border-bottom: 1px solid var(--hair); }
.wf-panel-head .label { flex: 1; }
.wf-close { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--rule); background: transparent; cursor: pointer; font-size: 22px; line-height: 1; color: var(--bone); }
.wf-close:hover { border-color: var(--bone); }
.wf-panel-body { flex: 1; overflow-y: auto; padding: 28px clamp(20px, 3.4vw, 36px) 36px; display: grid; gap: 26px; align-content: start; overscroll-behavior: contain; }
.wf-panel-foot { border-top: 1px solid var(--hair); padding: 16px clamp(20px, 3.4vw, 36px); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--panel); }
.wf-panel-foot .btn { flex: 1 1 auto; }
.wf-panel-foot .fine { flex-basis: 100%; border: 0; padding: 0; font-size: 11.5px; }

.wf-p-title { font-family: var(--serif); font-weight: 200; font-variation-settings: "opsz" 60; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.06; letter-spacing: -.025em; color: var(--bone); }
.wf-p-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 14px; color: var(--stone); }
.wf-creator { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.wf-creator:hover { color: var(--ember); }
.wf-creator img, .wf-creator .wf-chip { width: 30px; height: 30px; border-radius: 50%; padding: 0; object-fit: cover; }
.wf-p-meta .mono { font-family: var(--mono); font-size: 12px; color: var(--stone-2); }
.wf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-tags span { font-family: var(--mono); font-size: 11.5px; padding: 4px 9px; border: 1px solid var(--rule); border-radius: 4px; color: var(--stone); }

.wf-block { display: grid; gap: 12px; }
.wf-block > .label { color: var(--stone-2); }
.wf-how { border: 1px solid rgba(250,135,60,.35); background: rgba(250,135,60,.05); border-radius: 10px; padding: 18px 20px; }
.wf-how .label { color: var(--ember); }
.wf-how ul { margin: 0; }
.wf-how .ticks { font-family: var(--sans); font-size: 15px; color: var(--text); }

.wf-nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-node { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--rule); border-radius: 8px; font-size: 13.5px; color: var(--text); }
.wf-node .wf-ico, .wf-node .wf-chip { width: 26px; height: 26px; border-radius: 6px; padding: 4px; }
.wf-node .wf-chip { padding: 0; font-size: 9.5px; }
.wf-showall { background: none; border: 1px dashed var(--rule); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--stone); }
.wf-showall:hover { color: var(--bone); border-color: var(--bone); }

.wf-md { color: var(--stone); font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.wf-md > * + * { margin-top: 12px; }
.wf-md h3, .wf-md h4 { font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 60; color: var(--bone); letter-spacing: -.01em; margin-top: 22px; }
.wf-md h3 { font-size: 24px; } .wf-md h4 { font-size: 20px; }
.wf-md strong { color: var(--text); font-weight: 500; }
.wf-md ul, .wf-md ol { padding-left: 22px; margin-bottom: 0; }
.wf-md li + li { margin-top: 4px; }
.wf-md a { color: var(--ember); text-underline-offset: 3px; }
.wf-md code { font-family: var(--mono); font-size: .86em; background: var(--bg); border: 1px solid var(--hair); border-radius: 4px; padding: 1px 5px; color: var(--text); }
.wf-md pre { background: var(--bg); border: 1px solid var(--hair); border-radius: 8px; padding: 14px; overflow-x: auto; }
.wf-md pre code { border: 0; padding: 0; background: none; white-space: pre; }
.wf-md blockquote { margin: 0; padding-left: 14px; border-left: 2px solid var(--ember); }
.wf-md p { margin: 0; }

.wf-note { border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; color: var(--stone); font-size: 15px; }
.wf-note b { color: var(--bone); font-weight: 500; }
.wf-skel { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--panel-2) 0%, #26201b 40%, var(--panel-2) 80%) 0 0 / 300% 100%; animation: wf-shimmer 1.4s linear infinite; }
.wf-skel + .wf-skel { margin-top: 10px; }
.wf-skel.short { width: 60%; }

body.wf-lock { overflow: hidden; }

/* Responsive */
@media (max-width: 1100px) {
  .wf-grid { grid-template-columns: repeat(2, 1fr); }
  .wf-bar { grid-template-columns: 1fr 1fr 1fr; }
  .wf-search { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .wf-stats { grid-template-columns: 1fr 1fr; }
  .wf-grid { grid-template-columns: 1fr; }
  .wf-card { min-height: 0; }
  .wf-bar { grid-template-columns: 1fr 1fr; top: 64px; padding-top: 10px; }
  .wf-bar .wf-field:last-of-type { grid-column: 1 / -1; }
  .wf-panel { width: 100%; border-left: 0; }
  .wf-panel-foot .btn { flex-basis: 100%; }
  .giant { font-size: clamp(22px, 6.4vw, 104px); }
}
