/* GracePL Docs — style.css */
:root {
  --sidebar-bg:   #0f0f1a;
  --sidebar-w:    260px;
  --accent:       #7c3aed;
  --accent-light: #a78bfa;
  --accent-hover: #6d28d9;
  --content-bg:   #ffffff;
  --text:         #1e1b4b;
  --text-muted:   #6b7280;
  --border:       #e5e7eb;
  --code-bg:      #1e1e2e;
  --code-text:    #cdd6f4;
  --code-string:  #a6e3a1;
  --code-keyword: #cba6f7;
  --code-comment: #6c7086;
  --code-number:  #fab387;
  --code-func:    #89dceb;
  --radius:       8px;
  --shadow:       0 2px 16px rgba(0,0,0,.08);
  --header-h:     56px;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--content-bg); color: var(--text); min-height: 100vh; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* HEADER */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--sidebar-bg);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.site-header .logo { display: flex; align-items: center; gap: .6rem; }
.site-header .logo-icon { width: 30px; height: 30px; }
.site-header .logo-text {
  font-size: 1.2rem; font-weight: 700; color: #fff;
  letter-spacing: -.3px;
}
.site-header .logo-text span { color: var(--accent-light); }
.header-right { display: flex; align-items: center; gap: 1rem; }
.header-badge {
  background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 600; padding: .2rem .55rem;
  border-radius: 999px;
}
.header-link { color: #a1a1aa; font-size: .88rem; }
.header-link:hover { color: #fff; text-decoration: none; }
.hamburger { display: none; cursor: pointer; background: none; border: none; color: #fff; font-size: 1.4rem; }

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

/* SIDEBAR */
.sidebar {
  position: fixed; top: var(--header-h); left: 0;
  width: var(--sidebar-w); bottom: 0;
  background: var(--sidebar-bg);
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 1rem 0 2rem;
  transition: transform .25s ease;
}

.search-wrap { padding: .5rem 1rem 1rem; }
#doc-search {
  width: 100%; padding: .45rem .8rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); color: #fff; font-size: .85rem;
  outline: none;
  transition: border-color .2s;
}
#doc-search::placeholder { color: #52525b; }
#doc-search:focus { border-color: var(--accent-light); }

.nav-group { margin-bottom: .25rem; }
.nav-group-title {
  padding: .35rem 1.1rem;
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #52525b;
}
.nav-group a {
  display: block; padding: .38rem 1.1rem .38rem 1.4rem;
  color: #a1a1aa; font-size: .84rem;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.nav-group a:hover { color: #e5e7eb; background: rgba(255,255,255,.04); text-decoration: none; }
.nav-group a.active { color: var(--accent-light); border-left-color: var(--accent); background: rgba(124,58,237,.1); }

/* MAIN CONTENT */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  max-width: 860px;
  padding: 2.5rem 3rem;
}

/* HERO */
.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: #fff; font-size: .72rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: 999px;
  letter-spacing: .05em; margin-bottom: .8rem;
}
.hero h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.15; color: #0f172a; }
.hero h1 span { color: var(--accent); }
.hero p { max-width: 560px; color: var(--text-muted); margin-top: .8rem; line-height: 1.7; font-size: 1.05rem; }
.hero-cta { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.2rem; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-secondary:hover { background: rgba(124,58,237,.06); text-decoration: none; }

/* SECTION */
.doc-section { padding-top: 3.5rem; margin-bottom: 1rem; }
.doc-section h2 {
  font-size: 1.55rem; font-weight: 800; color: #0f172a;
  padding-bottom: .6rem; border-bottom: 2px solid var(--border);
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .5rem;
}
.doc-section h2 .section-num {
  font-size: .8rem; background: var(--accent); color: #fff;
  border-radius: 999px; padding: .1rem .45rem; font-weight: 700;
}
.doc-section h3 {
  font-size: 1.1rem; font-weight: 700; color: #1e1b4b;
  margin: 1.6rem 0 .7rem;
}
.doc-section p { color: #374151; line-height: 1.75; margin-bottom: .8rem; }
.doc-section ul, .doc-section ol {
  padding-left: 1.5rem; margin-bottom: .9rem; line-height: 1.8; color: #374151;
}

/* TABLE */
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .9rem; }
th { background: #f3f4f6; font-weight: 700; color: #374151; text-align: left; padding: .55rem .8rem; border: 1px solid var(--border); }
td { padding: .5rem .8rem; border: 1px solid var(--border); color: #374151; vertical-align: top; }
tr:nth-child(even) td { background: #f9fafb; }
code { font-family: "Fira Code","Cascadia Code","Consolas",monospace; }
td code { background: #f0e6ff; color: var(--accent); padding: .1rem .35rem; border-radius: 4px; font-size: .82rem; }

/* INLINE CODE */
p code, li code, h3 code {
  background: #f0e6ff; color: var(--accent);
  padding: .12rem .4rem; border-radius: 4px;
  font-size: .87em; font-family: "Fira Code","Cascadia Code","Consolas",monospace;
}

/* CODE BLOCK */
.code-block {
  position: relative; margin: 1rem 0 1.5rem;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.code-block-header {
  display: flex; justify-content: space-between; align-items: center;
  background: #181825; padding: .5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.code-lang { font-size: .72rem; font-weight: 600; color: var(--accent-light); text-transform: uppercase; letter-spacing: .06em; }
.copy-btn {
  background: none; border: 1px solid rgba(255,255,255,.2);
  color: #a1a1aa; font-size: .72rem; padding: .18rem .55rem;
  border-radius: 4px; cursor: pointer; transition: all .15s;
}
.copy-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.copy-btn.copied { color: var(--code-string); border-color: var(--code-string); }
pre {
  background: var(--code-bg); padding: 1.1rem 1.3rem;
  overflow-x: auto; font-size: .87rem; line-height: 1.7;
  font-family: "Fira Code","Cascadia Code","Consolas",monospace;
}
pre code { background: none; color: var(--code-text); padding: 0; font-size: inherit; }

/* CALLOUT */
.callout {
  border-left: 4px solid; border-radius: 0 var(--radius) var(--radius) 0;
  padding: .75rem 1rem; margin: 1rem 0 1.5rem;
  font-size: .9rem; line-height: 1.65;
}
.callout-info    { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; }
.callout-warning { border-color: #f59e0b; background: #fffbeb; color: #92400e; }
.callout-tip     { border-color: #10b981; background: #ecfdf5; color: #065f46; }
.callout b { font-weight: 700; }

/* FEATURE GRID */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin: 1.2rem 0 1.5rem; }
.feature-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; transition: box-shadow .15s, border-color .15s;
}
.feature-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.feature-card .icon { font-size: 1.6rem; margin-bottom: .4rem; }
.feature-card h4 { font-size: .9rem; font-weight: 700; color: #1e1b4b; margin-bottom: .3rem; }
.feature-card p { font-size: .82rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* TABS */
.tabs { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 1rem 0 1.5rem; }
.tab-header { display: flex; background: #f9fafb; border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: .55rem 1.1rem; font-size: .85rem; font-weight: 600;
  color: var(--text-muted); background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .15s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: #fff; }
.tab-pane { display: none; padding: 0; }
.tab-pane.active { display: block; }

/* INSTALL BAR */
.install-bar {
  display: flex; align-items: center; gap: .6rem;
  background: var(--code-bg); border-radius: var(--radius);
  padding: .6rem 1rem; margin: .8rem 0 1.2rem;
  font-family: "Fira Code","Cascadia Code","Consolas",monospace;
  font-size: .9rem; color: var(--code-text);
}
.install-bar .prompt { color: var(--accent-light); user-select: none; }
.install-bar code { flex: 1; background: none; padding: 0; color: var(--code-text); }

/* FOOTER */
.site-footer {
  margin-left: var(--sidebar-w);
  border-top: 1px solid var(--border);
  padding: 1.5rem 3rem;
  color: var(--text-muted); font-size: .85rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem;
}

/* HIGHLIGHT.JS custom overrides */
.hljs-keyword, .hljs-built_in { color: var(--code-keyword); }
.hljs-string  { color: var(--code-string); }
.hljs-comment { color: var(--code-comment); font-style: italic; }
.hljs-number  { color: var(--code-number); }
.hljs-title   { color: var(--code-func); }
.hljs-variable.language_ { color: #f38ba8; }

/* SCROLLBAR */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }

/* RESPONSIVE */
@media (max-width: 880px) {
  .main { padding: 1.5rem 1.2rem; }
}
@media (max-width: 700px) {
  .sidebar { transform: translateX(-100%); z-index: 90; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 1.2rem 1rem; }
  .site-footer { margin-left: 0; }
  .hamburger { display: block; }
  .hero h1 { font-size: 2rem; }
}
