/* Cloudairy Docs — layout layer on top of the cloudairy.com site shell.
   Matches the site: DM Sans + brand #6762fe. Light theme (site is light). */
:root{
  --brand:#6762fe; --brand-ink:#574fce; --fg:#18181b; --muted:#657488;
  --line:#e6eaef; --soft:#f7f8fc; --accent:#eeecff;
  --note:#3b82f6; --tip:#10b981; --warn:#f59e0b; --imp:#ef4444;
  --code-bg:#f4f5fb; --radius:14px; --shadow:0 1px 2px rgba(20,25,40,.05),0 10px 30px rgba(20,25,40,.06);
}

.docs-wrap{
  max-width:1240px; margin:0 auto; display:flex; gap:34px; align-items:flex-start;
  padding:20px 24px 96px; font-family:"DM Sans",sans-serif; color:var(--fg);
}
.docs-wrap *{box-sizing:border-box}

/* Sidebar */
.docs-nav-toggle{display:none}
.docs-sidebar{position:sticky; top:96px; width:266px; flex:0 0 266px; max-height:calc(100vh - 116px); overflow-y:auto; padding-right:6px}
.docs-search{position:relative; margin-bottom:14px}
.docs-search input{
  width:100%; padding:10px 13px; border:1px solid var(--line); border-radius:10px;
  background:var(--soft); color:var(--fg); font:15px "DM Sans",sans-serif;
}
.docs-search input:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(103,98,254,.14)}
.docs-results{position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:40; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:6px; max-height:60vh; overflow-y:auto}
.docs-results .r-item{display:block; padding:8px 11px; border-radius:8px; text-decoration:none; color:var(--fg)}
.docs-results .r-item:hover{background:var(--soft)}
.docs-results .r-title{display:block; font-weight:600; font-size:14px}
.docs-results .r-sub{display:block; color:var(--muted); font-size:12.5px; margin-top:1px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.docs-results .no-res{padding:11px; color:var(--muted); font-size:14px}

.docs-nav{display:flex; flex-direction:column; gap:1px}
.docs-nav a{display:block; padding:8px 12px; border-radius:9px; color:var(--muted); text-decoration:none; font-size:14.5px; line-height:1.35}
.docs-nav a:hover{background:var(--soft); color:var(--fg)}
.docs-nav a.active{background:var(--accent); color:var(--brand-ink); font-weight:600}

/* Article */
.docs-main{flex:1 1 auto; min-width:0}
.docs-article{max-width:824px; font-size:16px; line-height:1.7}
/* site main.css centers headings; docs are left-aligned */
.docs-article :is(h1,h2,h3,h4,p,li),.docs-card h3,.docs-card p{text-align:left}
.docs-article h1{font-size:2.2rem; line-height:1.15; margin:.1em 0 .5em; letter-spacing:-.02em; font-weight:800}
.docs-article h2{font-size:1.5rem; margin:2em 0 .6em; padding-top:.5em; border-top:1px solid var(--line); font-weight:700; letter-spacing:-.01em}
.docs-article h3{font-size:1.16rem; margin:1.6em 0 .4em; font-weight:700}
.docs-article h4{font-size:.8rem; margin:1.4em 0 .4em; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; font-weight:700}
.docs-article :is(h1,h2,h3,h4){scroll-margin-top:104px}
.docs-article p{margin:.7em 0}
.docs-article a{color:var(--brand-ink); text-decoration:none; border-bottom:1px solid rgba(103,98,254,.35)}
.docs-article a:hover{border-bottom-color:var(--brand)}
.docs-article ul,.docs-article ol{margin:.6em 0 .9em; padding-left:1.35em}
.docs-article li{margin:.3em 0}
.docs-article hr{border:0; border-top:1px solid var(--line); margin:2em 0}
.docs-article code{background:var(--code-bg); padding:.12em .4em; border-radius:6px; font:.86em ui-monospace,SFMono-Regular,Menlo,monospace}
.docs-article pre.code{background:var(--code-bg); border:1px solid var(--line); border-radius:12px; padding:14px 16px; overflow:auto; margin:1em 0}
.docs-article pre.code code{background:none; padding:0; font-size:.85em; line-height:1.55}

/* Tables */
.docs-article .table-wrap{overflow-x:auto; margin:1.1em 0; border:1px solid var(--line); border-radius:var(--radius)}
.docs-article table{border-collapse:collapse; width:100%; font-size:14.5px}
.docs-article thead th{background:var(--soft); text-align:left; font-weight:700}
.docs-article th,.docs-article td{padding:11px 14px; border-bottom:1px solid var(--line); vertical-align:top}
.docs-article tbody tr:last-child td{border-bottom:0}
.docs-article tbody tr:hover{background:rgba(247,248,252,.7)}

/* Callouts */
.docs-article blockquote.callout{margin:1.1em 0; padding:12px 16px; border-radius:12px; background:var(--soft); border-left:4px solid var(--muted)}
.docs-article blockquote.callout p:first-child{margin-top:0}
.docs-article blockquote.callout p:last-child{margin-bottom:0}
.docs-article blockquote.callout.note{border-color:var(--note); background:rgba(59,130,246,.07)}
.docs-article blockquote.callout.tip{border-color:var(--tip); background:rgba(16,185,129,.08)}
.docs-article blockquote.callout.warning{border-color:var(--warn); background:rgba(245,158,11,.09)}
.docs-article blockquote.callout.important{border-color:var(--imp); background:rgba(239,68,68,.07)}

/* Homepage cards */
.docs-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; margin:1.4em 0}
.docs-card{display:block; padding:17px 18px; border:1px solid var(--line); border-radius:var(--radius); background:var(--soft); text-decoration:none; color:var(--fg); transition:border-color .15s, transform .15s, box-shadow .15s}
.docs-card:hover{border-color:var(--brand); transform:translateY(-2px); box-shadow:var(--shadow)}
.docs-card h3{margin:0 0 6px; font-size:1rem; color:var(--brand-ink); font-weight:700}
.docs-card p{margin:0; color:var(--muted); font-size:13.5px; line-height:1.5}

/* Screenshots + placeholder frames */
.docs-article figure.shot{margin:1.5em 0}
.docs-article figure.shot img{max-width:100%; width:auto; height:auto; margin:0 auto; border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); display:block}
.docs-article figure.shot figcaption{margin-top:.55em; color:var(--muted); font-size:13.5px; text-align:center}
.docs-article figure.shot.missing .shot-ph{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:230px;
  border:2px dashed rgba(103,98,254,.4); border-radius:var(--radius); color:var(--muted); text-align:center; padding:24px;
  background:repeating-linear-gradient(45deg,var(--soft),var(--soft) 10px,#fff 10px,#fff 20px);
}
.docs-article figure.shot.missing .cam{font-size:30px}
.docs-article figure.shot.missing .cap{font-weight:700; color:var(--fg)}
.docs-article figure.shot.missing code{background:rgba(255,255,255,.7); font-size:12px}

/* Responsive */
@media (max-width:900px){
  .docs-wrap{flex-direction:column; gap:0}
  .docs-nav-toggle{
    display:inline-flex; align-items:center; gap:8px; margin-bottom:14px; padding:10px 16px;
    border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--fg); font:600 14px "DM Sans",sans-serif; cursor:pointer;
  }
  .docs-sidebar{position:static; width:100%; flex-basis:auto; max-height:none; display:none; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--line)}
  .docs-sidebar.open{display:block}
  .docs-article h1{font-size:1.8rem}
}
