/* StackPilot Tools - lightweight CSS for a fast PHP SaaS starter */
:root {
    --bg: #0b1220;
    --bg-soft: #111827;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --text: #0f172a;
    --text-soft: #475569;
    --line: #dbe4ee;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #166534;
    --success-bg: #dcfce7;
    --danger: #991b1b;
    --danger-bg: #fee2e2;
    --shadow: 0 20px 50px rgba(15, 23, 42, .08);
    --radius: 22px;
    --radius-sm: 16px;
    --container: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(219, 228, 238, .8);
}

.header-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}
.brand strong { display: block; font-size: 1rem; }
.brand small { color: var(--text-soft); display: block; }
.brand-mark {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    color: #fff;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.primary-nav a {
    color: var(--text-soft);
    font-weight: 600;
}
.primary-nav a.is-active,
.primary-nav a:hover { color: var(--text); }

.header-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.nav-toggle { display: none; }

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border-radius: 999px;
    padding: .85rem 1.2rem;
    font-weight: 700;
    transition: .2s ease;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}
.primary-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.ghost-btn {
    border: 1px solid var(--line);
    color: var(--text);
    background: #fff;
}
.ghost-btn:hover { border-color: var(--primary); color: var(--primary); }

.text-link {
    padding: 0;
    color: var(--primary);
}

.hero,
.page-hero {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 32%),
        radial-gradient(circle at top right, rgba(6, 182, 212, .12), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.hero { padding: 4.5rem 0 2.5rem; }
.page-hero { padding: 3rem 0 1rem; }
.page-hero.compact { padding: 2.5rem 0 1.25rem; }

.hero-grid,
.two-col,
.tool-hero-grid,
.tool-layout,
.footer-grid,
.docs-grid,
.blog-grid,
.pricing-grid,
.cards-grid,
.stats-grid {
    display: grid;
    gap: 1.25rem;
}

.hero-grid { grid-template-columns: 1.35fr .95fr; align-items: center; }
.tool-hero-grid { grid-template-columns: 1.25fr .85fr; }
.two-col, .tool-layout { grid-template-columns: 1.2fr .8fr; align-items: start; }
.footer-grid { grid-template-columns: 1.2fr .8fr .8fr .8fr; }
.docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.hero h1,
.page-hero h1,
.section h2 {
    margin: 0 0 .75rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 999px;
    padding: .35rem .7rem;
    background: rgba(37, 99, 235, .08);
    color: var(--primary);
    font-size: .875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.lead {
    max-width: 62ch;
    color: var(--text-soft);
    font-size: 1.08rem;
}
.hero-actions, .split-actions, .trust-row, .tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.trust-row { margin-top: 1.15rem; color: var(--text-soft); font-weight: 600; }
.trust-row span {
    border: 1px dashed var(--line);
    border-radius: 999px;
    padding: .45rem .7rem;
}

.hero-panel,
.tool-io-card,
.tool-form-card,
.info-card,
.blog-card,
.tool-card,
.pricing-card,
.stat-card,
.ad-box,
.code-wrap,
.table-wrap,
.auth-shell form,
.article-shell {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-panel,
.tool-io-card,
.tool-form-card,
.info-card,
.pricing-card,
.auth-shell form { padding: 1.4rem; }

.hero-panel h2,
.tool-io-card h2,
.tool-form-card h2,
.info-card h2 { margin-top: 0; }

.check-list,
.feature-list,
.footer-links,
.ordered-list {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
}
.feature-list li,
.check-list li,
.ordered-list li,
.footer-links li { margin: .5rem 0; }

.section { padding: 2.25rem 0; }
.muted-section { background: var(--panel-soft); }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.tool-card {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.tool-card h3 { margin: 0; font-size: 1.1rem; }
.tool-card p { margin: 0; color: var(--text-soft); }
.tool-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tool-icon {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .65rem;
    border-radius: 12px;
    background: #eef4ff;
    font-weight: 800;
}
.tool-meta {
    font-size: .93rem;
    color: var(--text-soft);
    display: grid;
    gap: .35rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    padding: .28rem .65rem;
    font-size: .78rem;
    font-weight: 700;
}

.pricing-card { position: relative; }
.pricing-card.popular {
    border-color: rgba(37, 99, 235, .35);
    transform: translateY(-6px);
}
.pricing-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: var(--primary);
    color: #fff;
    font-size: .78rem;
    padding: .3rem .6rem;
    border-radius: 999px;
    font-weight: 700;
}
.price {
    font-size: 2.3rem;
    font-weight: 800;
    margin: .4rem 0;
}
.price small {
    font-size: 1rem;
    color: var(--text-soft);
    font-weight: 600;
}

.blog-card { padding: 1.25rem; }
.blog-card h2, .blog-card h3 { margin: .8rem 0 .65rem; }
.blog-meta,
.pricing-meta {
    display: grid;
    gap: .45rem;
    color: var(--text-soft);
    font-size: .95rem;
}

.stack-form {
    display: grid;
    gap: 1rem;
}
.form-field { display: grid; gap: .4rem; }
.form-field label {
    font-weight: 700;
    font-size: .95rem;
}
.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .9rem 1rem;
    background: #fff;
    color: var(--text);
    font: inherit;
    resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: 3px solid rgba(37, 99, 235, .14);
    border-color: var(--primary);
}

.alert {
    border-radius: 14px;
    padding: .9rem 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.alert.success {
    background: var(--success-bg);
    color: var(--success);
}
.alert.error {
    background: var(--danger-bg);
    color: var(--danger);
}

.ad-box {
    padding: 1.25rem;
    background:
        linear-gradient(180deg, rgba(37, 99, 235, .04), rgba(6, 182, 212, .04)),
        #fff;
}
.code-wrap,
.table-wrap,
.article-shell {
    padding: 1.25rem;
}
pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: .85rem .75rem;
}
th {
    background: #f8fafc;
    font-size: .94rem;
}

.tool-sidebar {
    display: grid;
    gap: 1rem;
}

.faq-list details {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem 1rem;
    box-shadow: var(--shadow);
}
.faq-list details + details { margin-top: .8rem; }
.faq-list summary {
    cursor: pointer;
    font-weight: 700;
}

.site-footer {
    background: var(--bg);
    color: #e2e8f0;
    margin-top: 2rem;
    padding-top: 2rem;
}
.site-footer h3,
.site-footer h4 { margin-top: 0; color: #fff; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding-left: 0; }
.footer-bottom {
    padding: 1.1rem 0 1.4rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 1rem;
    color: #94a3b8;
}
.muted { color: #94a3b8; }

.auth-shell {
    width: min(620px, 100%);
    margin-inline: auto;
}

.article-shell {
    width: min(820px, 100%);
}
.article-shell p { font-size: 1.05rem; color: var(--text); }

@media (max-width: 1100px) {
    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pricing-grid,
    .blog-grid,
    .footer-grid,
    .hero-grid,
    .two-col,
    .tool-hero-grid,
    .tool-layout,
    .docs-grid,
    .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
        border: 1px solid var(--line);
        background: #fff;
        border-radius: 999px;
        padding: .7rem 1rem;
        font-weight: 700;
    }
    .primary-nav,
    .header-actions {
        display: none;
    }
    .primary-nav.is-open,
    .header-actions.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        background: #fff;
        padding-top: 1rem;
    }
    .header-shell {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .cards-grid,
    .blog-grid,
    .pricing-grid,
    .stats-grid { grid-template-columns: 1fr; }
    .container { width: min(var(--container), calc(100% - 1rem)); }
    .hero { padding-top: 3rem; }
    .footer-bottom { flex-direction: column; }
}
/* 2026 launch-ready additions */
.card-cover,
.article-cover {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #eef2ff;
}
.card-cover {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 1rem;
}
.featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.featured-card h2,
.blog-card h2 {
    margin: .55rem 0 .55rem;
}
.breadcrumb-wrap {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: .94rem;
    padding-top: 1rem;
}
.article-hero-shell {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 1.25rem;
    align-items: start;
}
.article-panel { position: sticky; top: 6.5rem; }
.article-meta-large { margin-top: 1rem; }
.wide-article-shell {
    width: min(960px, 100%);
}
.article-section + .article-section { margin-top: 2rem; }
.article-section h2 {
    margin: 0 0 .8rem;
    line-height: 1.2;
}
.takeaway-box {
    background: linear-gradient(180deg, rgba(37, 99, 235, .05), rgba(6, 182, 212, .04));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.15rem;
    margin: 1.25rem 0 2rem;
}
.compact-list { margin: 0; }
.blog-meta.article-meta-large span {
    border: 1px solid var(--line);
    background: #fff;
    padding: .42rem .7rem;
    border-radius: 999px;
}
.author-box { margin-top: 2rem; }
.footer-grid {
    grid-template-columns: 1.1fr .8fr .8fr .8fr;
}
@media (max-width: 1100px) {
    .article-hero-shell,
    .featured-grid { grid-template-columns: 1fr; }
    .article-panel { position: static; }
}


.tool-keywords-mini {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.keyword-pill {
    background: #f1f5f9;
    color: #0f172a;
}

.lead.narrow {
    max-width: 72ch;
}

.tool-article-shell {
    padding: 1.5rem;
}

.keyword-block {
    margin: 1.2rem 0 1.6rem;
}

.keyword-block h3,
.article-section-block h3,
.faq-card h3 {
    margin-top: 0;
}

.article-content {
    display: grid;
    gap: 1.1rem;
}

.article-section-block {
    padding-top: .25rem;
    border-top: 1px solid var(--line);
}

.article-section-block:first-child {
    border-top: 0;
    padding-top: 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.faq-card {
    padding: 1.25rem;
}

@media (max-width: 900px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}
