/* dscli site styles */
:root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --bg-hover: #1c2333;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --border: #30363d;
    --border-light: #21262d;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

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

html {
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font-sans);
    line-height: 1.7;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Header */
header {
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 24px;
}

.logo {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text) !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.logo:hover { color: var(--accent) !important; }

nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

nav a {
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.9em;
    transition: background 0.15s, color 0.15s;
}

nav a:hover {
    background: var(--bg-hover);
    color: var(--text);
    text-decoration: none;
}

nav a.active {
    color: var(--text);
    background: var(--bg-hover);
    font-weight: 500;
}

.locale-switcher { margin-left: auto; }

.locale-link {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8em;
    color: var(--text-muted) !important;
    transition: border-color 0.15s, color 0.15s;
}

.locale-link:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    text-decoration: none;
}

/* Main content */
main { flex: 1; }

.hero {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 720px;
    margin: 0 auto;
}
.hero-logo {
    width: 140px;
    height: auto;
    margin-bottom: 24px;
}
.hero h1 {
    font-size: 2.8em;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.tagline {
    font-size: 1.2em;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    transition: background 0.15s, transform 0.1s;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

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

.btn-primary:hover { background: var(--accent-hover); }

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

.btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-muted); }

/* Content pages */
.content-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.content-page h1 {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* Content (MD rendered) */
.content h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 32px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.content h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin: 24px 0 8px;
}

.content p { margin-bottom: 16px; }

.content ul, .content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content li { margin-bottom: 4px; }

.content code {
    font-family: var(--font-mono);
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #f0c674;
}

.content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.85em;
    line-height: 1.5;
    color: var(--text);
}

.content blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 16px;
    margin: 16px 0;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 0 6px 6px 0;
}

.content strong { color: #fff; font-weight: 600; }

.content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}

/* Docs list */
.docs-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.doc-card {
    display: block;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    transition: border-color 0.15s, transform 0.1s;
    color: var(--text) !important;
}

.doc-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    text-decoration: none;
}

.doc-card h3 {
    font-size: 1.1em;
    margin-bottom: 4px;
    color: var(--accent);
}

.doc-card p {
    font-size: 0.9em;
    color: var(--text-muted);
    margin: 0;
}

/* Blog list */
.blog-list { margin-top: 24px; }

.blog-post {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.blog-post:first-of-type { padding-top: 0; }

.blog-post h2 { font-size: 1.3em; margin-bottom: 6px; }
.blog-post h2 a { color: var(--text) !important; }
.blog-post h2 a:hover { color: var(--accent) !important; }

.post-meta {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 8px !important;
}

.read-more {
    font-size: 0.9em;
    font-weight: 500;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    padding: 20px 0;
    margin-top: auto;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: var(--text-muted);
}

.version-info code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Install section */
.install-section {
    padding: 0 20px 80px;
}
.install-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.install-heading {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
}
.install-codeblock {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 24px;
    display: inline-block;
}
.install-codeblock pre {
    margin: 0;
}
.install-codeblock code {
    font-family: var(--font-mono);
    font-size: 0.95em;
    color: #f0c674;
}

/* Index page feature cards (pure markdown h3 + p) */
.index-content .content h3 {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px 10px 0 0;
    padding: 20px 24px 0;
    margin: 24px 0 0;
    font-size: 1.1em;
    border-bottom: none;
    color: var(--accent);
}
.index-content .content h3:first-of-type {
    margin-top: 0;
}
.index-content .content h3 + p {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 8px 24px 20px;
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.6;
}
.index-content .content h3 + p:hover {
    border-color: var(--accent);
}
.index-content .content h3:hover {
    border-color: var(--accent);
}

/* Index page CTA links (after hr separator) */
.index-content .content hr + p {
    text-align: center;
    padding: 16px 0;
}
.index-content .content hr + p a {
    display: inline-block;
    margin: 0 6px 12px;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent) !important;
    transition: border-color 0.15s, transform 0.1s;
}
.index-content .content hr + p a:hover {
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    text-decoration: none;
}
/* Last CTA link as primary */
.index-content .content hr + p a:last-child {
    background: var(--accent);
    color: #fff !important;
    border-color: var(--accent);
}
.index-content .content hr + p a:last-child:hover {
    background: var(--accent-hover);
}

/* Install code block after CTA */
.index-content .content hr + p + pre {
    margin-top: 8px;
}

/* Subtle hr in index content */
.index-content .content hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 40px 0 24px;
}

/* Index page tables */
.index-content .content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9em;
}
.index-content .content th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
}
.index-content .content td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
}
.index-content .content td:first-child {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: #f0c674;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 640px) {
    .hero { padding: 40px 16px 32px; }
    .hero-logo { width: 100px; }
    .hero h1 { font-size: 2em; }
    .header-inner { gap: 12px; }
    nav { gap: 0; }
    nav a { font-size: 0.8em; padding: 4px 8px; }
    .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
    .install-codeblock {
        padding: 12px 16px;
        display: block;
    }
    .install-codeblock code {
        font-size: 0.85em;
        word-break: break-all;
    }
    .index-content .content td:first-child {
        white-space: normal;
        word-break: break-all;
    }
}

/* dscli hero ASCII logo */
.hero-logo {
    font-family: var(--font-mono);
    font-size: 0.8em;
    color: var(--accent);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 28px;
    display: inline-block;
    text-align: left;
    line-height: 1.35;
    margin: 0 auto 24px;
    letter-spacing: 0.02em;
}

/* Blog post nav */
.post-nav {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.post-nav a {
    font-weight: 500;
}

/* Footer link */
.footer-link {
    color: var(--text-muted);
    font-weight: 500;
}

.footer-link:hover {
    color: var(--accent);
}

/* Responsive tweaks for ASCII hero */
@media (max-width: 640px) {
    .hero-logo {
        font-size: 0.62em;
        padding: 12px 16px;
    }
}
