@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,200..700,0..1,-50..200');
/* Kudo AI Docs Styles (RTL) */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --muted: #64748b;
  --text: #0f172a;
  --primary: #2f5dff;
  --primary-600: #253cd8;
  --primary-700: #1b2ab3;
  --accent-purple: #7a2de2;
  --accent-pink: #c424ff;
  --green: #16a34a;
  --yellow: #f7b731;
  --red: #f05252;
  --border: #e5e7eb;
  --grad-1: linear-gradient(125deg, #2f5dff 0%, #7a2de2 48%, #c424ff 100%);
  --grad-2: linear-gradient(140deg, #0fb1ff 0%, #4b4bff 45%, #c424ff 100%);
  --bg-grad-1: radial-gradient(850px 520px at 100% -10%, rgba(47,93,255,0.12), transparent 60%);
  --bg-grad-2: radial-gradient(920px 640px at -10% 120%, rgba(122,45,226,0.10), transparent 60%);
}
* { box-sizing: border-box }
html { scroll-behavior: smooth }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 'Readex Pro', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}
body {
  display: grid;
  grid-template-columns: 280px 1fr;
  direction: rtl;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--bg-grad-1), var(--bg-grad-2);
  pointer-events: none;
}
a { color: var(--primary); text-decoration: none }
a:hover { color: var(--primary-600) }
code, pre, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}
pre { padding: 14px; overflow: auto }
code { padding: 2px 6px; border-radius: 6px }
kbd {
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.06);
}
/* Layout */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: var(--panel);
  border-inline-end: 1px solid var(--border);
  overflow-y: auto;
  backdrop-filter: saturate(1.2);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.brand .title {
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 18px;
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand .logo {
  max-width: 165px;
  height: auto;
  display: block;
  object-fit: contain;
}
.brand .logo {
  max-width: 160px;
  height: auto;
  display: block;
  object-fit: contain;
}
.brand .badge {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #f8fafc;
}
.search {
  position: relative;
  margin: 10px 0 16px;
}
.search input {
  width: 100%;
  padding: 10px 12px;
  background: #f8fafc;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search input:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}
/* Search Results */
.search-results {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  margin-top: 4px;
}
.search-results.active {
  display: block;
}
.search-item {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
  transition: background 0.2s;
  text-align: right;
}
.search-item:last-child {
  border-bottom: none;
}
.search-item:hover, .search-item:focus {
  background: #f8fafc;
  color: var(--primary);
}
.search-item-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--primary-700);
}
.search-item-snippet {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.toc {
  display: grid;
  gap: 10px;
}
.toc .section {
  margin-top: 8px;
}
.toc .section .heading {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 10px 6px;
}
.toc a {
  display: block;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #334155;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.toc a:hover { border-color: var(--border); color: var(--text); background: #f8fafc }
.toc a.active {
  background: #f1f5ff;
  border-color: #c7d2fe;
}
.content {
  min-height: 100vh;
  padding: 32px 36px 80px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.breadcrumbs {
  color: #475569;
  font-size: 13px;
}
.breadcrumbs a { color: var(--primary) }
.doc h1 {
  font-size: 28px;
  margin: 8px 0 6px;
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.doc h2 {
  font-size: 22px;
  margin: 26px 0 10px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 6px;
  position: relative;
}
.doc h2::after {
  content: '';
  position: absolute;
  inset-inline-end: 0;
  bottom: -1px;
  width: 140px;
  height: 2px;
  background: var(--grad-1);
  border-radius: 2px;
  opacity: .4;
}
.doc h3 { font-size: 18px; margin: 18px 0 8px }
.doc p { margin: 10px 0; color: #0f172a }
.doc ul { margin: 8px 0 12px; padding: 0 20px }
.doc li { margin: 6px 0; }
.note, .warn, .tip {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
  margin: 12px 0;
  position: relative;
  overflow: hidden;
}
.note { border-color: rgba(47,93,255,0.35) }
.warn { border-color: rgba(247,183,49,0.55) }
.tip  { border-color: rgba(34,197,94,0.4) }
.note::before, .warn::before, .tip::before {
  content: '';
  position: absolute;
  inset-inline-start: -1px;
  top: -1px;
  width: 6px;
  height: calc(100% + 2px);
  background: var(--grad-1);
  opacity: .4;
}
.callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  background: #f8fafc;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(180deg, rgba(47,93,255,0.28), rgba(122,45,226,0.22), rgba(196,36,255,0.18));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: .5;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(99,102,241,0.35);
  box-shadow: 0 12px 30px rgba(37,99,235,0.08), 0 6px 18px rgba(124,58,237,0.06);
}
.footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 13px;
}
/* Google Material Symbols */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  display: inline-flex;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
  	'GRAD' 0,
  	'opsz' 20;
}
.toc a .material-symbols-rounded { margin-inline-start: 6px; font-size: 18px; opacity: .85; }
.doc h2 .material-symbols-rounded { margin-inline-start: 6px; font-size: 20px; vertical-align: -3px; }
.callout .material-symbols-rounded { font-size: 20px; margin-inline-end: 2px; }
.breadcrumbs .material-symbols-rounded { font-size: 18px; vertical-align: -3px; margin-inline: 4px 6px; color: var(--muted); }
.card h3 .material-symbols-rounded { font-size: 22px; margin-inline-start: 6px; }
.header .pill .material-symbols-rounded { font-size: 18px; margin-inline-start: 6px; }
/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: var(--grad-1);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(37,99,235,0.25);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(37,99,235,0.28);
}
/* Preview hero */
.preview-hero {
  margin: 18px 0 28px;
}
.preview-card {
  position: relative;
  width: 100%;
  max-width: 980px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 16px 40px rgba(2,6,23,0.08);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.preview-card:hover {
  box-shadow: 0 22px 44px rgba(37,99,235,0.14);
  border-color: rgba(99,102,241,0.28);
}
.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}
.preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.00), rgba(2,6,23,0.35) 55%, rgba(2,6,23,0.65));
  pointer-events: none;
}
.preview-btn {
  position: absolute;
  bottom: 18px;
  inset-inline-start: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: var(--grad-1);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
  pointer-events: auto;
}
.preview-card:hover .preview-btn {
  opacity: 1;
  transform: translateY(0);
}
.preview-btn:hover {
  box-shadow: 0 10px 24px rgba(37,99,235,0.25);
}
.arrow-indicator {
  position: absolute;
  bottom: 24px;
  inset-inline-end: 22px;
  color: #fff;
  opacity: .9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  animation: arrow-float 1.2s ease-in-out infinite;
}
@keyframes arrow-float {
  0% { transform: translateX(0) translateY(0); opacity: .7 }
  50% { transform: translateX(-6px) translateY(-2px); opacity: 1 }
  100% { transform: translateX(0) translateY(0); opacity: .7 }
}
/* Mobile */
@media (max-width: 980px) {
  body { grid-template-columns: 1fr }
  .sidebar {
    position: fixed;
    inset: 0 0 auto 0;
    height: auto;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
  }
  .content { padding: 100px 18px 60px }
}
