/* ============================================================
   clearception.ai Help Center — Stylesheet
   ============================================================ */

:root {
  --brand-dark:    #0e1c3a;
  --brand-mid:     #1a3060;
  --accent:        #3d7fff;
  --accent-hover:  #2563eb;
  --text:          #1e2840;
  --text-muted:    #5a6580;
  --bg:            #f4f7ff;
  --surface:       #ffffff;
  --border:        #dde3f0;
  --table-head:    #eef2fc;
  --code-bg:       #f0f3fb;
  --sidebar-w:     260px;
  --header-h:      60px;
  --radius:        8px;
  --shadow:        0 2px 12px rgba(14, 28, 58, 0.08);
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
}

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.site-name {
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.site-name span { color: var(--accent); }
.header-badge {
  margin-left: 10px;
  background: rgba(61,127,255,0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
header nav.header-links {
  margin-left: auto;
  display: flex;
  gap: 20px;
}
header nav.header-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s;
}
header nav.header-links a:hover { color: var(--brand-dark); }

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

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: #f8faff;
  border-right: 1.5px solid var(--border);
  padding: 28px 0 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.nav-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 20px 8px;
  margin-top: 8px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.sidebar nav a:hover {
  color: var(--brand-dark);
  background: rgba(61,127,255,0.06);
}
.sidebar nav a.active {
  color: var(--accent);
  background: rgba(61,127,255,0.08);
  border-left-color: var(--accent);
  font-weight: 600;
}
.nav-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ---------- Main content ---------- */
.content {
  flex: 1;
  min-width: 0;
  padding: 44px 56px 80px;
  max-width: 860px;
}

/* ---------- Typography ---------- */
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--brand-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}
h1 + p, h1 + .lead { margin-top: 10px; }
.lead {
  font-size: 16.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.65;
}
h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border);
}
h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}
p { margin-bottom: 16px; }
hr { border: none; border-top: 1.5px solid var(--border); margin: 36px 0; }

/* ---------- Links ---------- */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
.content a { border-bottom: 1px solid transparent; }
.content a:hover { border-bottom-color: var(--accent-hover); text-decoration: none; }

/* ---------- Lists ---------- */
ul, ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
li { margin-bottom: 6px; }
li p { margin-bottom: 4px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
thead tr { background: var(--table-head); }
th {
  text-align: left;
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
}
td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tbody tr { background: var(--surface); transition: background 0.1s; }
tbody tr:hover { background: #f8faff; }

/* ---------- Code ---------- */
code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--code-bg);
  color: #3550b0;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #dde5f8;
}
pre {
  background: var(--code-bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  box-shadow: var(--shadow);
}
pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* ---------- Blockquote / callouts ---------- */
blockquote {
  background: #eef4ff;
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 20px;
  color: var(--text);
}
blockquote p { margin-bottom: 0; }

.callout {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14.5px;
  line-height: 1.6;
}
.callout-info { background: #eef4ff; border: 1px solid #c5d8ff; }
.callout-note { background: #fff8e6; border: 1px solid #fde68a; }
.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.callout p { margin: 0; }

/* ---------- Command pills ---------- */
.cmd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--code-bg);
  color: var(--accent);
  border: 1px solid #c5d8ff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* ---------- Page nav (prev/next) ---------- */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1.5px solid var(--border);
}
.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  max-width: 48%;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
.page-nav a:hover { border-color: var(--accent); box-shadow: 0 2px 16px rgba(61,127,255,0.12); }
.page-nav .nav-dir { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
.page-nav .nav-title { font-weight: 600; color: var(--accent); }
.page-nav .next { text-align: right; margin-left: auto; }

/* ---------- Hero (index page) ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
  border-radius: 14px;
  padding: 40px 44px;
  margin-bottom: 36px;
  color: #fff;
}
.hero h1 { color: #fff; font-size: 32px; margin-bottom: 10px; }
.hero p { color: rgba(255,255,255,0.75); font-size: 16px; margin: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(61,127,255,0.14);
  transform: translateY(-2px);
  text-decoration: none;
}
.card-icon { font-size: 24px; }
.card-title { font-weight: 700; font-size: 15px; color: var(--brand-dark); }
.card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ---------- Search box (decorative) ---------- */
.search-bar {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
}
.search-bar svg { flex-shrink: 0; color: var(--text-muted); }

/* ---------- Footer ---------- */
footer {
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  padding: 20px 24px;
  font-size: 13px;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .content { padding: 28px 20px 60px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 28px 24px; }
  .hero h1 { font-size: 24px; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .page-nav { flex-direction: column; }
  .page-nav a { max-width: 100%; }
}
