/* How it works — DocuMind palette (#1f2937 sidebar, #2563eb primary) + terminal accents */

.how-page {
    margin: 0;
    min-height: 100vh;
    background: #f1f5f9;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
}

.how-nav {
    background: #1f2937;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.how-nav-brand {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.how-nav a {
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
}

.how-nav a:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

a.how-nav-brand-link {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

a.how-nav-brand-link:hover {
    color: #bfdbfe;
}

.how-nav-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: center;
    margin-left: auto;
    min-width: 0;
}

/* Mobile: same row as desktop — brand left, compact text links on the right */
@media (max-width: 640px) {
    .how-nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 10px 12px;
    }

    .how-nav-links {
        margin-left: auto;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
        gap: 4px 8px;
        width: auto;
        min-width: 0;
    }

    .how-nav-links a {
        font-size: 0.6875rem;
        font-weight: 500;
        padding: 4px 2px;
        line-height: 1.2;
        white-space: nowrap;
    }

    a.how-nav-brand-link {
        font-size: 1rem;
        flex-shrink: 0;
        min-width: 0;
    }
}

.how-related-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #334155;
    line-height: 1.7;
}

.how-related-list a {
    color: #2563eb;
    font-weight: 500;
}

.how-related-list a:hover {
    text-decoration: underline;
}

.how-card--related {
    border-color: #c7d2fe;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.08);
}

.contact-dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 24px;
    align-items: baseline;
}

.contact-dl dt {
    margin: 0;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #64748b;
}

.contact-dl dd {
    margin: 0;
    font-size: 0.9375rem;
    color: #0f172a;
}

.contact-dl a {
    color: #2563eb;
    font-weight: 500;
}

.contact-dl a:hover {
    text-decoration: underline;
}

.contact-hint {
    margin: 14px 0 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.45;
}

/* Blog hub + articles (shared layout with how-it-works) */
.blog-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.blog-index-card {
    margin: 0;
}

.blog-index-card-link {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-index-card-link:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.blog-index-card-title {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
    margin-bottom: 6px;
}

.blog-index-card-desc {
    display: block;
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.45;
}

.blog-article h2 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.15rem;
    color: #1e293b;
}

.blog-article p {
    margin: 0 0 1rem;
    color: #334155;
}

.blog-article-kicker {
    margin: 0 0 8px;
    font-size: 0.875rem;
}

.blog-article-kicker a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.blog-article-kicker a:hover {
    text-decoration: underline;
}

.blog-article-meta {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: #64748b;
}

.blog-article-ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    color: #334155;
    line-height: 1.65;
}

.blog-article-ol li {
    margin-bottom: 0.5rem;
}

.blog-article a {
    color: #2563eb;
    font-weight: 500;
}

.blog-article a:hover {
    text-decoration: underline;
}

.blog-article-outro {
    margin-top: 1.75rem !important;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9375rem !important;
    color: #475569 !important;
}

.how-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.how-page h1 {
    margin: 0 0 8px;
    font-size: 1.75rem;
    color: #0f172a;
}

.how-lead {
    margin: 0 0 28px;
    color: #475569;
    font-size: 1rem;
}

.how-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 22px 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.how-card h2 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    color: #1e293b;
}

.how-card h3 {
    margin: 18px 0 8px;
    font-size: 1rem;
    color: #334155;
}

.how-card p,
.how-card ul {
    margin: 0 0 12px;
    color: #475569;
    font-size: 0.9375rem;
}

.how-card ul {
    padding-left: 1.25rem;
}

.how-card li {
    margin-bottom: 6px;
}

.how-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 6px;
    vertical-align: middle;
}

.how-tag--blue {
    background: rgba(37, 99, 235, 0.15);
    color: #1d4ed8;
}

.how-tag--slate {
    background: #e2e8f0;
    color: #475569;
}

/* Terminal / code panel (inspired by dev tool UIs, colors aligned with DocuMind + teal/coral accents) */
.how-terminal {
    margin-top: 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1e293b;
    background: #0f172a;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}

.how-terminal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    flex-wrap: wrap;
}

.how-terminal-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.how-terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.how-dot-red {
    background: #f87171;
}
.how-dot-yellow {
    background: #fbbf24;
}
.how-dot-green {
    background: #34d399;
}

.how-terminal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.how-tab {
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #94a3b8;
    transition: background 0.15s, color 0.15s;
}

.how-tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.how-tab--active {
    background: #2dd4bf !important;
    color: #0f172a !important;
}

.how-tab--accent {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #2dd4bf;
}

.how-tab--accent.how-tab--active {
    background: #f87171 !important;
    color: #0f172a !important;
    border-color: #f87171;
}

.how-terminal-sub {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: #0c1222;
    border-bottom: 1px solid #334155;
    flex-wrap: wrap;
}

.how-terminal-body {
    position: relative;
    padding: 14px 16px 16px;
}

.how-snippet {
    display: none;
    margin: 0;
    padding: 0;
    font-family: ui-monospace, "Cascadia Code", "Fira Code", "SF Mono", Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
}

.how-snippet.how-snippet--active {
    display: block;
}

.how-snippet .how-cmt {
    color: #64748b;
    font-style: italic;
}

.how-snippet .how-prompt {
    color: #f87171;
    font-weight: 700;
}

.how-copy-wrap {
    position: absolute;
    top: 10px;
    right: 10px;
}

.how-copy-btn {
    border: 1px solid #475569;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.how-copy-btn:hover {
    background: rgba(37, 99, 235, 0.25);
    border-color: #3b82f6;
    color: #fff;
}

.how-copy-btn.copied {
    border-color: #34d399;
    color: #6ee7b7;
}

.how-note {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    font-size: 0.875rem;
    color: #475569;
}

@media (max-width: 640px) {
    .how-wrap {
        padding: 20px 14px 40px;
    }

    .how-terminal-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .how-copy-wrap {
        position: static;
        margin-bottom: 8px;
        text-align: right;
    }
}
