/* SEO Pages — minimal document vocabulary.
 *
 * Design rule: pages express content using only standard HTML +
 * three named classes (.note, .toc, .kicker). Everything else is
 * <h*>, <p>, <ul>, <ol>, <code>, <pre>, <table>.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;   /* 1152 is the TOTAL width, matching the landing's border-box max-w-6xl */
    margin: 0 auto;
    padding: 0 24px 48px;
    line-height: 1.6;
    max-width: 1152px;   /* == the landing's max-w-6xl, so both families share one width */
    color: #374151;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Header: light-chrome sibling of the dark partials/header.html ──────────
   Same 64px full-width sticky bar + favicon mark + wordmark, so moving between
   the light (docs/SEO) and dark (product/landing) families reads as one site.
   The light palette is the only deliberate difference. */

.header {
    /* full-bleed out of the centered body column to span the viewport, like the dark bar */
    margin: 0 calc(50% - 50vw) 2.5rem;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    box-sizing: border-box;          /* 1152 total, == the landing header (border-box) */
    max-width: 1152px;               /* == the landing header's max-w-6xl */
    margin: 0 auto;
    padding: 0 24px;                 /* == the landing header's px-6 */
    height: 64px;                    /* == the landing header's h-16 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.header-container { display: none; }
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.header-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;                   /* == the landing header's gap-2.5 */
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;                /* == the landing wordmark weight */
    font-size: 1rem;
    white-space: nowrap;
}
.header-logo:hover { color: #1f2937; text-decoration: none; }
.header-logo-mark {
    box-sizing: border-box;          /* total footprint 28px incl. border, == the landing mark */
    width: 28px;                     /* == the landing header's w-7 h-7 (28px) */
    height: 28px;
    border-radius: 4px;              /* == the landing header's `rounded` */
    border: 1px solid #e5e7eb;
    display: block;
    flex-shrink: 0;
}
.header-tagline {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 400;
    padding-left: 0.75rem;
    border-left: 1px solid #e5e7eb;
    white-space: nowrap;
}

/* ─── Typography ──────────────────────────────────────────────────────────── */

h1 {
    color: #111827;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}
h2 {
    color: #1f2937;
    font-size: 1.875rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}
h4 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}
p {
    margin-bottom: 1rem;
    color: #4b5563;
    /* Matches site.css: stops a sentence's last short word from being stranded on its own line. */
    text-wrap: pretty;
}
p strong, li strong { color: #111827; }

/* Kicker — tagline immediately below h1.
 * !important to win cascade against per-page <style> overrides that
 * use small-caps / letter-spacing / bold weight. */
.kicker {
    color: #6b7280 !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    font-variant: normal !important;
    letter-spacing: normal !important;
    margin: 0.5rem 0 1.5rem !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ─── Lists ──────────────────────────────────────────────────────────────── */

ul, ol { margin: 1rem 0; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; color: #4b5563; }

/* ─── Links ──────────────────────────────────────────────────────────────── */

a {
    color: #1f2937;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: #d1d5db;
}
a:hover { text-decoration-color: #1f2937; }

/* ─── Code ───────────────────────────────────────────────────────────────── */

code {
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    color: #1f2937;
}
pre, .example {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px 18px;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre;   /* every .example is a <div>, which collapses newlines; `pre` (not pre-wrap)
                           keeps the real <pre> blocks on their UA default and honours overflow-x */
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.55;
    margin: 16px 0;
}
pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */

table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.92rem;
}
th, td {
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
    color: #374151;
    vertical-align: top;
    line-height: 1.5;
}
th {
    background: transparent;
    font-weight: 600;
    color: #111827;
    border-bottom: 2px solid #111827;
    white-space: nowrap;
}
td code { white-space: nowrap; }
td:nth-child(2) { white-space: nowrap; }

/* ─── .note — the single aside / callout / quirk / caveat element ────────── */

.note {
    background: transparent;
    border: 0;
    border-left: 2px solid #d1d5db;
    border-radius: 0;
    padding: 4px 0 4px 16px;
    margin: 16px 0;
    color: #4b5563;
    font-size: 0.95rem;
    box-shadow: none;
    font-weight: normal;
}
.note strong { color: #111827; }

/* ─── .toc — the "On this page" sidebar block ────────────────────────────── */
/* !important on accent color + link color to win cascade against per-page
 * <style> blocks that still define indigo border-left-color and dark-blue link colors. */

.toc {
    background: #f8f9fa !important;
    border-left: 4px solid #020617 !important;
    padding: 1rem 1.25rem !important;
    margin: 1.5rem 0 !important;
    font-size: 0.92rem !important;
}
.toc strong {
    color: #111827 !important;
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.78rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-weight: 600 !important;
}
.toc ul { padding-left: 1.25rem; margin: 0.25rem 0 0; }
.toc li { margin: 4px 0; }
.toc a { color: #020617 !important; text-decoration: none !important; }
.toc a:hover { color: #1f2937 !important; text-decoration: underline !important; text-decoration-color: #d1d5db !important; }

/* ─── Footer (linked from partials/seo_footer.html) ──────────────────────── */

.seo-footer {
    border-top: 1px solid #e5e7eb;
    margin-top: 4rem;
    padding-top: 1.5rem;
    color: #6b7280;
    font-size: 0.85rem;
}
.seo-footer p { margin: 0.25rem 0; color: inherit; }
.seo-footer a { color: #6b7280; text-decoration-color: #d1d5db; }
.seo-footer a:hover { color: #1f2937; text-decoration-color: #1f2937; }
.seo-footer-meta { color: #9ca3af; margin-bottom: 0.5rem; }

/* ─── Temporary holdover for content-level patterns (Step 4 will rewrite) ── */

/* .stat-card grids and .contacts-banner — pages still have these as
 * structural HTML. Render minimally until we rewrite them as inline prose. */
.stat-card {
    background: transparent;
    color: #111827;
    border: 1px solid #e5e7eb;
    padding: 16px 20px;
    text-align: left;
}
.stat-number { font-size: 1.75rem; font-weight: 700; color: #111827; }
.stat-label { font-size: 0.85rem; color: #6b7280; margin-top: 4px; }
.stat-grid { gap: 12px; }

.contacts-banner {
    background: transparent;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin: 24px 0;
    color: #1f2937;
}
.contacts-banner h3 { color: #111827; }
.contacts-banner .banner-btn {
    display: inline-block;
    background: #111827;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    body { margin: 0 auto; padding: 0 20px 32px; font-size: 0.9rem; }
    .header-inner { padding: 0 20px; }
    .header-tagline { display: none; }   /* keep the mobile bar to logo + nav */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    pre, .example { font-size: 0.8rem; padding: 12px 14px; }
    table { font-size: 0.875rem; }
    th, td { padding: 8px; }
}

/* ─── Site nav (slim) — used alongside existing .header on SEO doc pages.
   Pushed to the right via margin-left:auto so it sits opposite the logo+tagline. */

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.site-nav a {
    color: #475569;
    text-decoration: none;
    transition: color 0.15s;
}
.site-nav a:hover {
    color: #0f172a;
    text-decoration: none;
}
@media (max-width: 600px) {
    .site-nav {
        margin-left: 0;
        flex-basis: 100%;
        gap: 1.125rem;
        font-size: 0.8125rem;
        padding-top: 0.5rem;
    }
}

/* ─── Site footer v2 — light-chrome mirror of partials/footer.html ────────── */

.site-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    margin: 4rem -40px 0;
    padding: 3.5rem 40px 2rem;
    font-size: 0.875rem;
}
.site-footer-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    max-width: 1120px;
    margin: 0 auto;
}
.site-footer-col h4.site-footer-heading {
    color: #111827;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}
.site-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer-col li {
    margin: 0 0 0.625rem;
    color: #6b7280;
}
.site-footer-col li:last-child { margin-bottom: 0; }
.site-footer-col a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s;
}
.site-footer-col a:hover {
    color: #111827;
    text-decoration: none;
}
.site-footer-ext {
    font-size: 0.75rem;
    opacity: 0.7;
}
.site-footer-bottom {
    max-width: 1120px;
    margin: 3rem auto 0;
    padding: 1.5rem 0 0;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.site-footer-bottom a {
    color: #9ca3af;
    text-decoration: none;
}
.site-footer-bottom a:hover {
    color: #1f2937;
    text-decoration: none;
}
@media (min-width: 768px) {
    .site-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
@media (max-width: 768px) {
    .site-footer-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.25rem;
    }
}
@media (max-width: 640px) {
    .site-footer {
        margin: 3rem -20px 0;
        padding: 2.5rem 20px 1.5rem;
    }
}
