/* engribet n8n project showcase */

:root {
  --bg:        #ffffff;
  --surface:   #f6f7f9;
  --surface-2: #eceef1;
  --text:      #14171a;
  --muted:     #5b6570;
  --border:    #e3e6ea;
  --accent:    #2563eb;
  --accent-dk: #1d4ed8;
  --code-bg:   #f2f4f6;
  --ok:        #1a7f47;
  --shadow:    0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0d1117;
    --surface:   #161b22;
    --surface-2: #1c232c;
    --text:      #e6edf3;
    --muted:     #8b949e;
    --border:    #30363d;
    --accent:    #60a5fa;
    --accent-dk: #93c5fd;
    --code-bg:   #161b22;
    --ok:        #3fb950;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 20px; padding-bottom: 20px;
}
.brand {
  font-weight: 700; font-size: 15px; letter-spacing: -.01em;
  color: var(--text); text-decoration: none;
}
.brand span { color: var(--accent); }
nav.site a {
  color: var(--muted); text-decoration: none; font-size: 14px; margin-left: 20px;
}
nav.site a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; }
.hero h1 {
  margin: 0 0 14px; font-size: 40px; line-height: 1.15;
  letter-spacing: -.03em; font-weight: 800;
}
.hero p.lede { margin: 0; font-size: 18px; color: var(--muted); max-width: 60ch; }

/* ---------- project cards ---------- */
.projects { display: grid; gap: 18px; padding: 8px 0 72px; }

.card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); padding: 26px 26px 22px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 8px; font-size: 21px; letter-spacing: -.02em; font-weight: 700;
}
.card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}

.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ok); margin-bottom: 10px;
}
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); flex: none;
}

/* ---------- article ---------- */
article { padding: 44px 0 80px; }
article h1 {
  margin: 0 0 10px; font-size: 36px; line-height: 1.2;
  letter-spacing: -.03em; font-weight: 800;
}
article .subtitle { margin: 0 0 30px; font-size: 17px; color: var(--muted); }
article h2 {
  margin: 46px 0 14px; font-size: 22px; letter-spacing: -.02em;
  font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
article h3 { margin: 28px 0 8px; font-size: 16px; font-weight: 700; }
article p  { margin: 0 0 16px; }
article ul { margin: 0 0 16px; padding-left: 22px; }
article li { margin-bottom: 6px; }

a { color: var(--accent); }
a:hover { color: var(--accent-dk); }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .89em; background: var(--code-bg);
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border);
}
pre {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; overflow-x: auto; margin: 0 0 18px;
}
pre code { background: none; border: none; padding: 0; font-size: 13px; line-height: 1.6; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; margin: 0 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 13px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted); font-size: 12.5px;
     text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td code { font-size: 12.5px; }

/* ---------- diagram ---------- */
figure { margin: 0 0 22px; }
figure svg { width: 100%; height: auto; display: block; }
figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 10px; }

/* ---------- callout ---------- */
.note {
  border-left: 3px solid var(--accent); background: var(--surface);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 0 0 20px;
  font-size: 15px;
}
.note strong { color: var(--text); }

/* ---------- meta strip ---------- */
.meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  padding: 18px 0 4px; margin-bottom: 8px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.meta div { display: flex; flex-direction: column; gap: 1px; }
.meta dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.meta dd { margin: 0; font-weight: 600; }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--border); padding: 26px 0 40px;
  color: var(--muted); font-size: 14px;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); }

.back { display: inline-block; margin-bottom: 26px; font-size: 14px; text-decoration: none; }
.back:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .hero { padding: 44px 0 30px; }
  .hero h1 { font-size: 31px; }
  article h1 { font-size: 28px; }
  .wrap { padding: 0 18px; }
  nav.site a { margin-left: 14px; }
}

/* ---------- project status badges ---------- */
:root {
  --ok-bg:      #e7f5ec;  --ok-bd:      #b7e0c6;
  --demo-bg:    #e8f0fe;  --demo-bd:    #c2d7fb;
  --nodemo-bg:  #f0f2f4;  --nodemo-bd:  #dfe3e8;  --nodemo-fg: #6a7480;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ok-bg:      #12261a;  --ok-bd:      #235033;
    --demo-bg:    #11203a;  --demo-bd:    #23406b;
    --nodemo-bg:  #1a2027;  --nodemo-bd:  #2d353e;  --nodemo-fg: #8b949e;
  }
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}

.badge-live   { color: var(--ok);        background: var(--ok-bg);     border-color: var(--ok-bd); }
.badge-demo   { color: var(--accent);    background: var(--demo-bg);   border-color: var(--demo-bd); }
.badge-nodemo { color: var(--nodemo-fg); background: var(--nodemo-bg); border-color: var(--nodemo-bd); }
.badge-nodemo::before { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }

.badge-why {
  font-size: 13px; color: var(--muted); margin: 0 0 14px;
  padding-left: 2px;
}

/* ---------- badge legend ---------- */
.legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 13px; color: var(--muted);
  padding: 14px 0 0; margin: 18px 0 0; border-top: 1px solid var(--border);
}
.legend .pair { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- pending state ---------- */
:root { --wip: #9a6700; --wip-bg: #fff8e5; --wip-bd: #f0d999; }
@media (prefers-color-scheme: dark) {
  :root { --wip: #d29922; --wip-bg: #2b2213; --wip-bd: #54411c; }
}
.badge-wip { color: var(--wip); background: var(--wip-bg); border-color: var(--wip-bd); }

/* ---------- live demo ---------- */
.demo {
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); padding: 22px; margin: 0 0 22px;
}
.demo-grid { display: grid; gap: 14px; }
.demo-field { display: flex; flex-direction: column; gap: 5px; }
.demo-field label { font-size: 12.5px; font-weight: 600; color: var(--muted);
                    text-transform: uppercase; letter-spacing: .04em; }
.demo-field input, .demo-field textarea {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 11px; width: 100%;
}
.demo-field textarea { resize: vertical; min-height: 62px; }
.demo-field input:focus, .demo-field textarea:focus {
  outline: none; border-color: var(--accent);
}
.demo-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.demo-btn {
  font: inherit; font-size: 14px; font-weight: 600;
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; padding: 10px 20px; cursor: pointer;
}
.demo-btn:hover:not(:disabled) { background: var(--accent-dk); }
.demo-btn:disabled { opacity: .55; cursor: not-allowed; }
.demo-hint { font-size: 13px; color: var(--muted); }

.demo-out { margin-top: 18px; }
.demo-out[hidden] { display: none; }
.demo-msg { font-size: 14px; padding: 11px 14px; border-radius: 9px; margin-bottom: 12px; }
.demo-msg.ok   { color: var(--ok);  background: var(--ok-bg);   border: 1px solid var(--ok-bd); }
.demo-msg.err  { color: var(--wip); background: var(--wip-bg);  border: 1px solid var(--wip-bd); }
.demo-msg code { background: none; border: none; padding: 0; }

@media (min-width: 620px) {
  .demo-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
}

/* ---------- screenshots ---------- */
figure.shot { margin: 0 0 24px; }
figure.shot img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2);
}
figure.shot figcaption {
  font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center;
}
