/* Critical layout: stable header offset and icon boxes (before/without JS) */

:root {
    --site-header-offset: 87px;
}

@media (max-width: 767px) {
    :root {
        /* top-3 (12px) + island bar row (~56px) + gap (12px) */
        --site-header-offset: 80px;
    }
}

@media (min-width: 768px) {
    :root {
        /* pt-[15px] + min nav row + pb-2 + gap */
        --site-header-offset: 87px;
    }

    header.header-bar > div.hidden.md\:block {
        display: block !important;
    }
}

/* Reserve space for Lucide placeholders until SVG is injected */
i[data-lucide] {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
    box-sizing: content-box;
}

i[data-lucide].w-3\.5,
i[data-lucide].w-3\.5.h-3\.5 {
    width: 0.875rem;
    height: 0.875rem;
}

i[data-lucide].w-4,
i[data-lucide].w-4.h-4 {
    width: 1rem;
    height: 1rem;
}

i[data-lucide].w-5,
i[data-lucide].w-5.h-5 {
    width: 1.25rem;
    height: 1.25rem;
}

i[data-lucide].w-6,
i[data-lucide].w-6.h-6 {
    width: 1.5rem;
    height: 1.5rem;
}

i[data-lucide].w-12,
i[data-lucide].w-12.h-12 {
    width: 3rem;
    height: 3rem;
}

svg.lucide {
    flex-shrink: 0;
}

/* Typography for first paint (before output.css) */
.text-twitter-text {
    color: #0f1419;
}

html[data-theme="dark"] .text-twitter-text {
    color: #e7e9ea;
}

.text-twitter-text-secondary {
    color: #536471;
}

html[data-theme="dark"] .text-twitter-text-secondary {
    color: #71767b;
}

.font-semibold {
    font-weight: 600;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.min-h-screen {
    min-height: 100vh;
}

.flex-1 {
    flex: 1 1 0%;
}

body:has(header.header-bar) main,
main.flex-1 {
    padding-top: var(--site-header-offset, 87px) !important;
}

@media (max-width: 767px) {
    body:has(header.header-bar) main,
    main.flex-1 {
        padding-top: var(--site-header-offset, 80px) !important;
    }
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-sans {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

/* Page shell (before output.css) */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-7xl {
    max-width: 80rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.bg-white {
    background-color: #fff;
}

html[data-theme="dark"] .bg-white {
    background-color: #000;
}

.border {
    border-width: 1px;
    border-style: solid;
}

.border-twitter-border {
    border-color: #cfd9de;
}

html[data-theme="dark"] .border-twitter-border {
    border-color: #2f3336;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

.overflow-hidden {
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.m-0 {
    margin: 0;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.inline-block {
    display: inline-block;
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:col-span-3 {
        grid-column: span 3 / span 3;
    }

    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
}

/* Reserve sidebar height on mobile (no content-visibility — avoids CLS when revealed) */
@media (max-width: 1023px) {
    .ups-deferred-sidebar {
        min-height: 280px;
    }
}

/* Upload card LCP (index, service2, service4) — paint before output.css */
h2.text-base.font-semibold.text-twitter-text {
    display: flex;
    align-items: center;
    margin: 0 0 0.125rem;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
    color: #0f1419;
}

html[data-theme="dark"] h2.text-base.font-semibold.text-twitter-text {
    color: #e7e9ea;
}

.gap-1\.5 {
    gap: 0.375rem;
}

.font-medium {
    font-weight: 500;
}

.text-center {
    text-align: center;
}

.justify-center {
    justify-content: center;
}

.text-twitter-blue {
    color: #1da1f2;
}

html[data-theme="dark"] .text-twitter-blue {
    color: #38bdf8;
}

.bg-twitter-bg {
    background-color: rgb(245 248 250);
}

html[data-theme="dark"] .bg-twitter-bg {
    background-color: rgb(30 41 59);
}

.p-6 {
    padding: 1.5rem;
}

.mb-0\.5 {
    margin-bottom: 0.125rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

i[data-lucide].w-8,
i[data-lucide].w-8.h-8 {
    width: 2rem;
    height: 2rem;
}

#uploadArea {
    border: 2px dashed #d1d5db;
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    background-color: rgb(245 248 250);
    box-sizing: border-box;
}

html[data-theme="dark"] #uploadArea {
    background-color: rgb(30 41 59);
    border-color: #4b5563;
}

/* PDF preview below fold: do not compete with upload LCP */
.service4-pdf-preview {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}
