/* Kealu Docs Theme — Counslr SOS */

@import "fonts.css";

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary-color);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 2rem;
}

.logo img {
    height: 28px;
    width: auto;
}

.main-nav a {
    color: #c0c0c0;
    text-decoration: none;
    margin-right: 1.5rem;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.main-nav a:hover,
.main-nav a.active { color: #fff; }

.search-container {
    margin-left: auto;
    max-width: 300px;
}

.search-container .pagefind-ui {
    --pagefind-ui-scale: 0.8;
    --pagefind-ui-primary: var(--primary-color);
}

/* Layout */
.layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height) - 60px);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 1.5rem;
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.docs-nav h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.docs-nav ul { list-style: none; }

.nav-category {
    margin-bottom: 1rem;
}

.nav-category strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.nav-category li { margin-bottom: 0.15rem; }

.nav-category a {
    display: block;
    padding: 0.25rem 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.nav-category a:hover { background: var(--bg-secondary); }
.nav-category a.active {
    background: #f3ebfa;
    color: var(--primary-color);
    font-weight: 500;
}

/* Content */
.content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 900px;
}

.doc-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.doc-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.doc-content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
}

.doc-content p { margin-bottom: 1rem; }

.doc-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.doc-content a:hover { text-decoration: underline; }

.doc-content ul, .doc-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.doc-content li { margin-bottom: 0.25rem; }

.doc-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-secondary);
    padding: 0.15em 0.35em;
    border-radius: 3px;
}

.doc-content pre {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #282a36;
    border-radius: 6px;
    overflow-x: auto;
}

.doc-content pre code {
    background: none;
    padding: 0;
    color: #f8f8f2;
    font-size: 0.85rem;
    line-height: 1.5;
}

.doc-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.doc-content th, .doc-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.doc-content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.doc-content blockquote {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--primary-color);
    background: #f3ebfa;
    color: var(--secondary-color);
}

/* Landing page */
.landing .hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #eee;
    text-decoration: none;
}

/* Page list (section index pages) */
.page-list { list-style: none; padding-left: 0; }

.page-list li {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.15s;
}

.page-list li:hover { border-color: var(--primary-color); }

.page-list a {
    font-weight: 500;
    font-size: 1.05rem;
}

.page-list p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.version-info {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #999;
}

/* Mermaid diagrams */
.mermaid {
    margin: 1rem 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .content { padding: 1.5rem; }
    .header-inner { padding: 0 1rem; }
    .search-container { max-width: 200px; }
}
