/* apps.make.com-inspired layout for the detailed docs page */
:root {
  --brand: #008EF6;
  --brand-dark: #006fc4;
  --brand-50: #e6f3ff;
  --ink: #0e1116;
  --ink-2: #4a5061;
  --ink-3: #6f7787;
  --line: #e5e8ee;
  --line-2: #eef0f4;
  --bg: #ffffff;
  --bg-2: #f8f9fb;
  --code-bg: #f3f5f8;
  --max-content: 760px;
  --sidebar-w: 280px;
  --toc-w: 220px;
  --header-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
    "Open Sans Hebrew", "Heebo", "Assistant", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { font-family: "Open Sans Hebrew", "Heebo", "Assistant",
  -apple-system, system-ui, sans-serif; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
pre {
  background: var(--code-bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 16px; overflow-x: auto;
  font-size: 13.5px; line-height: 1.55;
}
pre code { background: none; padding: 0; }

/* Header */
.docs-header {
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  display: flex; align-items: center;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.docs-header .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--ink);
}
.docs-header .brand img { width: 26px; height: 26px; border-radius: 4px; }
.docs-header nav {
  margin-inline-start: auto;
  display: flex; gap: 22px; align-items: center;
  font-size: 14px;
}
.docs-header nav a { color: var(--ink-2); }
.docs-header nav a.cta {
  background: var(--brand); color: #fff;
  padding: 7px 14px; border-radius: 6px;
}
.docs-header nav a.cta:hover { background: var(--brand-dark); text-decoration: none; }

/* Layout shell */
.docs-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
  gap: 0;
  align-items: start;
}
[dir="rtl"] .docs-shell { grid-template-columns: var(--toc-w) 1fr var(--sidebar-w); }
@media (max-width: 1080px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar, .docs-toc { display: none; }
}

/* Sidebar */
.docs-sidebar {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  padding: 24px 18px;
  overflow-y: auto;
  font-size: 14px;
}
[dir="rtl"] .docs-sidebar { border-right: 0; border-left: 1px solid var(--line); }
.docs-sidebar h4 {
  margin: 16px 0 6px;
  text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 11px; color: var(--ink-3); font-weight: 700;
}
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; padding: 0; margin: 0; }
.docs-sidebar li {
  padding: 5px 10px; border-radius: 5px; color: var(--ink-2); cursor: default;
}
.docs-sidebar li.cat { color: var(--ink); font-weight: 500; }
.docs-sidebar li.cat:hover { background: rgba(0, 142, 246, 0.06); cursor: pointer; }
.docs-sidebar li.cat.current {
  background: var(--brand-50); color: var(--brand-dark); font-weight: 600;
}
.docs-sidebar li.cat .pin { color: var(--ink-3); font-size: 12px; }
.docs-sidebar .cat-children {
  margin: 4px 0 6px 12px; padding-inline-start: 12px;
  border-inline-start: 2px solid var(--line);
}
.docs-sidebar .cat-children li.app {
  padding: 4px 10px; color: var(--ink-2); font-size: 13.5px;
}
.docs-sidebar .cat-children li.app.current {
  background: var(--brand); color: #fff; font-weight: 600;
}

/* Main content */
.docs-content {
  padding: 36px 56px 80px;
  max-width: calc(var(--max-content) + 56px * 2);
  margin: 0 auto;
}
.docs-content .breadcrumbs {
  font-size: 13px; color: var(--ink-3); margin-bottom: 12px;
}
.docs-content .breadcrumbs a { color: var(--ink-3); }
.docs-content h1 {
  font-size: 36px; line-height: 1.15; letter-spacing: -0.015em;
  margin: 0 0 8px; display: flex; align-items: center; gap: 14px;
}
.docs-content h1 img { width: 44px; height: 44px; border-radius: 8px; }
.docs-content .meta {
  color: var(--ink-3); font-size: 13.5px; margin-bottom: 28px;
  display: flex; gap: 18px; flex-wrap: wrap;
}
.docs-content .meta .dot { color: var(--line); }
.docs-content > p:first-of-type { font-size: 17px; color: var(--ink-2); }

.docs-content h2 {
  margin: 40px 0 12px; font-size: 24px; letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--header-h) + 14px);
}
.docs-content h3 { margin: 28px 0 8px; font-size: 17px; }

.callout {
  background: var(--brand-50); border-inline-start: 3px solid var(--brand);
  padding: 12px 16px; border-radius: 6px; margin: 18px 0;
  font-size: 14.5px;
}
.callout strong { color: var(--brand-dark); }

.steps-list { padding-inline-start: 0; list-style: none; counter-reset: step; }
.steps-list > li {
  counter-increment: step; position: relative;
  padding-inline-start: 42px; margin-bottom: 18px;
}
.steps-list > li::before {
  content: counter(step); position: absolute;
  inset-inline-start: 0; top: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}

table.modules {
  width: 100%; border-collapse: collapse; margin: 14px 0;
  font-size: 14px;
}
table.modules th, table.modules td {
  padding: 8px 10px; border-bottom: 1px solid var(--line-2);
  text-align: start;
}
table.modules th {
  background: var(--bg-2); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600;
}
table.modules td.kind {
  font-family: ui-monospace, monospace; font-size: 12px;
  color: var(--brand-dark); width: 60px;
}
table.modules td.name { font-weight: 500; }

.group-toggle {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; margin: 10px 0;
}
.group-toggle summary {
  padding: 12px 16px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  list-style: none;
}
.group-toggle summary::-webkit-details-marker { display: none; }
.group-toggle summary::before {
  content: "▸"; color: var(--ink-3); font-size: 12px; transition: transform 0.15s;
}
.group-toggle[open] summary::before { transform: rotate(90deg); }
.group-toggle .count {
  background: var(--brand-50); color: var(--brand-dark);
  border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700;
  margin-inline-start: auto;
}
.group-toggle .body { padding: 0 16px 12px; }

.next-prev {
  margin-top: 60px; padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.next-prev a {
  flex: 1 1 240px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 18px; color: var(--ink); display: block;
  transition: border-color 0.15s, transform 0.15s;
}
.next-prev a:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.next-prev a small { color: var(--ink-3); display: block; font-size: 12px; }
.next-prev a strong { color: var(--brand-dark); }

/* Right table-of-contents */
.docs-toc {
  position: sticky; top: calc(var(--header-h) + 28px);
  height: calc(100vh - var(--header-h) - 28px);
  padding: 24px 18px; font-size: 13.5px;
  overflow-y: auto;
  border-inline-start: 1px solid var(--line);
}
[dir="rtl"] .docs-toc { border-inline-start: 0; border-inline-end: 1px solid var(--line); }
.docs-toc h5 {
  margin: 0 0 10px; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-3); font-weight: 700;
}
.docs-toc ul { list-style: none; padding: 0; margin: 0; }
.docs-toc li { margin: 4px 0; }
.docs-toc a {
  color: var(--ink-2); display: block;
  border-inline-start: 2px solid transparent;
  padding: 2px 10px; line-height: 1.45;
}
[dir="rtl"] .docs-toc a { border-inline-start: 0; border-inline-end: 2px solid transparent; }
.docs-toc a:hover { color: var(--ink); border-inline-start-color: var(--brand); text-decoration: none; }
[dir="rtl"] .docs-toc a:hover { border-inline-end-color: var(--brand); }

footer.docs-footer {
  border-top: 1px solid var(--line);
  padding: 24px 56px;
  font-size: 13px; color: var(--ink-3);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  background: var(--bg-2);
}
footer.docs-footer a { color: var(--ink-2); }
