/* docs.css — Lyren API docs + reference (Bootstrap 5.3.6 + homepage theme) */

/* ===========================
   THEME TOKENS (same as home)
=========================== */
:root{
  --c900:#663d29;
  --c700:#9a674d;
  --c600:#b97c5d;
  --c500:#da926e;
  --c300:#b59d55;
  --c200:#e3c56b;

  --bg0:#06070a;
  --bg1:#0a0d12;
  --bg2:#0d121a;

  --ink:#f6f2ea;
  --muted: rgba(246,242,234,.74);
  --muted2: rgba(246,242,234,.58);

  --line: rgba(227,197,107,.16);
  --line2: rgba(227,197,107,.10);

  --glass: rgba(255,255,255,.06);
  --glass2: rgba(255,255,255,.08);

  --shadow: 0 22px 80px rgba(0,0,0,.58);
  --shadow2: 0 12px 34px rgba(0,0,0,.45);

  --radius: 20px;
  --radius2: 16px;


  --topbar-h: 68px;
}

*{ box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 15% -10%, rgba(227,197,107,.22), transparent 58%),
    radial-gradient(860px 520px at 92% -10%, rgba(218,146,110,.16), transparent 60%),
    radial-gradient(920px 520px at 50% 118%, rgba(181,157,85,.12), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 35%, var(--bg2));
}

/* Ambient grid + noise */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .55;
  background:
    radial-gradient(circle at 18% 20%, rgba(227,197,107,.10), transparent 46%),
    radial-gradient(circle at 86% 24%, rgba(218,146,110,.08), transparent 46%),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
}
body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 0;
  opacity:.10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* keep content above background */
.topbar, .doc-wrap{ position: relative; z-index: 1; }

a{ color: rgba(227,197,107,.92); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* ===========================
   TOPBAR
=========================== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 0;
  border-bottom: 1px solid var(--line2);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 980;
  letter-spacing: -.4px;
  color: rgba(255,255,255,.96);
  text-decoration: none;
}
.brand:hover{ text-decoration: none; }
.brand-name{ font-size: 1.06rem; }

.topbar-nav{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.navlink{
  display:inline-flex;
  align-items:center;
  padding: .45rem .74rem;
  border-radius: 999px;
  border: 1px solid rgba(227,197,107,.14);
  background: rgba(255,255,255,.06);
  color: rgba(246,242,234,.82);
  font-weight: 900;
  font-size: .92rem;
  text-decoration: none;
}
.navlink:hover{
  background: rgba(255,255,255,.08);
  text-decoration: none;
  transform: translateY(-1px);
}
.navlink.active{
  color: rgba(12,10,9,.98);
  border-color: rgba(227,197,107,.38);
  background: linear-gradient(135deg, rgba(227,197,107,.98), rgba(218,146,110,.88));
}

/* Override Bootstrap .btn safely */
.btn{
  border-radius: 999px !important;
  font-weight: 950 !important;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.btn-ghost{
  border: 1px solid rgba(227,197,107,.24) !important;
  background: rgba(255,255,255,.06) !important;
  color: rgba(246,242,234,.88) !important;
}
.btn-ghost:hover{
  background: rgba(255,255,255,.08) !important;
  transform: translateY(-1px);
}
.btn-ghost:active{ transform: translateY(0); }

/* ===========================
   SIDEBAR + CONTENT (Bootstrap grid)
=========================== */
.sidebar{
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - (var(--topbar-h) + 32px));
  overflow: auto;

  border: 1px solid rgba(227,197,107,.14);
  border-radius: 26px;
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow2);
}
.sidebar::-webkit-scrollbar{ width: 10px; }
.sidebar::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.10);
  border-radius: 999px;
}

.sidebar-head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(227,197,107,.10);
  background: rgba(255,255,255,.04);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
}
.sidebar-title{
  font-weight: 980;
  letter-spacing: -.4px;
  color: rgba(255,255,255,.94);
}

.search{
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(227,197,107,.14);
  background: rgba(0,0,0,.18);
  color: rgba(246,242,234,.88);
  outline: none;
}
.search::placeholder{ color: rgba(246,242,234,.50); }
.search:focus{ border-color: rgba(227,197,107,.30); }

.sidenav{
  display:flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
}
.sideitem{
  display:flex;
  padding: .55rem .68rem;
  border-radius: 14px;
  color: rgba(246,242,234,.78);
  font-weight: 850;
  text-decoration: none;
  border: 1px solid transparent;
}
.sideitem:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(227,197,107,.10);
  text-decoration: none;
}
.sideitem.active{
  background: rgba(227,197,107,.10);
  border-color: rgba(227,197,107,.18);
  color: rgba(255,255,255,.92);
}

/* main content glass */
.content-inner{
  border: 1px solid rgba(227,197,107,.14);
  border-radius: 26px;
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  padding: 22px;
}
.content-inner::before{
  content:"";
  position:absolute; inset:-1px;
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(227,197,107,.14), transparent 62%),
    radial-gradient(850px 520px at 92% 12%, rgba(218,146,110,.10), transparent 60%),
    radial-gradient(700px 440px at 55% 112%, rgba(181,157,85,.08), transparent 62%);
  pointer-events:none;
}
#docRootInner{ position: relative; }

/* Typography */
h1{
  margin: 0 0 10px;
  font-weight: 980;
  letter-spacing: -1.0px;
  color: rgba(255,255,255,.96);
  font-size: clamp(1.9rem, 1.8vw + 1.2rem, 2.6rem);
  line-height: 1.06;
}
h2{
  margin: 0 0 8px;
  font-weight: 980;
  letter-spacing: -.6px;
  color: rgba(255,255,255,.95);
  font-size: 1.45rem;
}
h3{
  margin: 14px 0 8px;
  font-weight: 980;
  letter-spacing: -.35px;
  color: rgba(255,255,255,.92);
  font-size: 1.05rem;
}
p{ margin: 10px 0; color: rgba(246,242,234,.74); font-weight: 650; line-height: 1.65; }
.lead{ font-size: 1.06rem !important; color: rgba(246,242,234,.74) !important; font-weight: 650; }

.tiny{ font-size: .92rem; color: rgba(246,242,234,.62); font-weight: 650; }
.mono{ font-family: var(--mono); }

/* separators */
.sep{
  border: none;
  height: 1px;
  background: rgba(227,197,107,.12);
  margin: 18px 0;
  opacity: 1;
}

/* Sections */
.doc-section{ padding: 2px 0; scroll-margin-top: calc(var(--topbar-h) + 20px); }

/* Pills */
.pill{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  font-weight: 950;
  font-size: .82rem;
  color: rgba(246,242,234,.78);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(227,197,107,.14);
  padding: .28rem .62rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* code blocks */
code{
  font-family: var(--mono);
  font-weight: 900;
  color: rgba(227,197,107,.92);
  background: rgba(227,197,107,.10);
  border: 1px solid rgba(227,197,107,.16);
  padding: .12rem .38rem;
  border-radius: 10px;
}
pre code{
  background: transparent;
  border: none;
  padding: 0;
  color: rgba(246,242,234,.80);
  font-weight: 650;
  font-size: .92rem;
}

.codeblock{
  margin-top: 10px;
  border: 1px solid rgba(227,197,107,.12);
  background: rgba(0,0,0,.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.40);
  position: relative;
}
.codeblock::before{
  content:"";
  position:absolute; inset:-2px;
  background: radial-gradient(circle at 12% 18%, rgba(227,197,107,.10), transparent 62%);
  pointer-events:none;
}
.codebar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(227,197,107,.10);
  background: rgba(255,255,255,.04);
  position: relative;
}
.codetag{
  font-family: var(--mono);
  font-weight: 950;
  font-size: .82rem;
  color: rgba(246,242,234,.70);
}
.copyBtn{
  font: inherit;
  font-weight: 950;
  font-size: .86rem;
  color: rgba(246,242,234,.86);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(227,197,107,.14);
  padding: .36rem .7rem;
  border-radius: 999px;
  cursor: pointer;
}
.copyBtn:hover{ background: rgba(255,255,255,.08); transform: translateY(-1px); }
.copyBtn:active{ transform: translateY(0); }
pre{
  margin: 0;
  padding: 12px;
  overflow: auto;
  position: relative;
}

/* callouts */
.callout{
  margin-top: 12px;
  border: 1px solid rgba(227,197,107,.14);
  background: rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 12px 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
.callout-title{
  font-weight: 980;
  letter-spacing: -.2px;
  color: rgba(255,255,255,.92);
  margin-bottom: 4px;
}
.callout.warn{
  border-color: rgba(218,146,110,.22);
  background: linear-gradient(135deg, rgba(218,146,110,.10), rgba(255,255,255,.05));
}
.callout.warn .callout-title{ color: rgba(255,255,255,.95); }

/* footer */
.footer{
  margin-top: 18px;
  padding: 16px 0 2px;
  border-top: 1px solid rgba(227,197,107,.10);
  color: rgba(246,242,234,.62);
  font-weight: 750;
}

/* RESPONSIVE */
@media (max-width: 991.98px){
  .sidebar{
    position: relative;
    top: auto;
    max-height: none;
  }
}





@media (prefers-reduced-motion: reduce){
  .navlink, .btn, .copyBtn{ transition: none !important; transform: none !important; }
  html{ scroll-behavior: auto; }
}