/* SawStream Docs — shared styles across /docs, /docs/salesforce, /docs/airtable, /docs/hubspot */

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

:root {
  --nav-h: 52px;
  --sb-w: 230px;
  --purple: #6d28d9;
  --purple-light: #ede9fe;
  --text: #09090b;
  --text-2: #52525b;
  --text-3: #a1a1aa;
  --border: #e4e4e7;
  --bg: #f9f9fb;
  --card: #ffffff;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Top nav ── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.nav-logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to bottom right, #5900b1 0%, #4f46e5 30%, #7c3aed 55%, #a855f7 80%, #ff43ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.nav-platform-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-platform-tab {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.1s, color 0.1s;
}
.nav-platform-tab:hover { background: var(--purple-light); color: var(--purple); }
.nav-platform-tab.active {
  background: var(--purple-light);
  color: var(--purple);
  font-weight: 600;
}
.nav-back {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.1s, color 0.1s;
}
.nav-back:hover { background: var(--purple-light); color: var(--purple); border-color: #c4b5fd; }

/* ── Layout ── */
.page-wrap {
  display: flex;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── Left sidebar TOC ── */
.toc-sidebar {
  width: var(--sb-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 32px 0 32px 24px;
  border-right: 1px solid var(--border);
  background: var(--card);
}
.toc-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  padding-left: 6px;
}
.toc-link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 5px 6px;
  border-radius: 6px;
  margin-bottom: 1px;
  transition: background 0.1s, color 0.1s;
  border-left: 2px solid transparent;
}
.toc-link:hover { background: var(--purple-light); color: var(--purple); }
.toc-link.active { background: var(--purple-light); color: var(--purple); border-left-color: var(--purple); font-weight: 600; }

/* ── Main content ── */
.doc-main {
  flex: 1;
  max-width: 780px;
  padding: 48px 52px 80px;
}

/* ── Section ── */
.doc-section { margin-bottom: 64px; }
.doc-section:last-child { margin-bottom: 0; }
.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--purple-light);
}
.doc-section p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 14px;
}
.doc-section p:last-child { margin-bottom: 0; }

/* ── Steps ── */
.steps { list-style: none; counter-reset: step-counter; margin: 18px 0; padding: 0; }
.steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 38px;
  margin-bottom: 14px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.7;
}
.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  background: var(--purple);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Bullets ── */
.doc-ul { list-style: none; margin: 14px 0; padding: 0; }
.doc-ul li {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
  margin-bottom: 9px;
}
.doc-ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  background: var(--purple);
  border-radius: 50%;
}

/* ── Callout boxes ── */
.callout {
  background: var(--purple-light);
  border: 1px solid #c4b5fd;
  border-left: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 13.5px;
  color: #3b1fa8;
  line-height: 1.6;
  margin: 18px 0;
}
.callout.warn {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
  color: #78350f;
}

/* ── Code / kbd ── */
code {
  font-family: 'SF Mono', 'Fira Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 12.5px;
  background: #f4f4f5;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: #3f3f46;
}
pre {
  background: #1c1917;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 18px 0;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e7e5e4;
  font-size: 13px;
  line-height: 1.65;
}

/* ── Sub-heading ── */
.doc-h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
  margin: 32px 0 10px;
}
.doc-h3:first-child { margin-top: 0; }

/* ── Layout cards grid ── */
.layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.layout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.layout-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.layout-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

/* ── Hub page ── */
.docs-hub-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.docs-hub-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.docs-hub-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}
.docs-hub-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 14px;
}
.docs-hub-sub {
  font-size: 17px;
  color: var(--text-2);
  margin-bottom: 36px;
  max-width: 620px;
  line-height: 1.55;
}
.docs-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}
.docs-platform-card {
  display: block;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
.docs-platform-card:hover {
  border-color: var(--purple);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(109,40,217,0.10), 0 0 0 1px rgba(109,40,217,0.18);
}
.docs-platform-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.docs-platform-name-arrow {
  color: var(--text-3);
  transition: color 0.15s, transform 0.15s;
}
.docs-platform-card:hover .docs-platform-name-arrow {
  color: var(--purple);
  transform: translateX(2px);
}
.docs-platform-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.docs-shared-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}
.docs-shared-block h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.docs-shared-block p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}
.docs-shared-block a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
}
.docs-shared-block a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .toc-sidebar { display: none; }
  .doc-main { padding: 32px 24px 60px; }
  .nav-platform-tabs { display: none; }
}
