/* ai.rs — Blog Styles */

/* ── Base ── */
html { overflow-x: clip; }
body { overflow-x: clip; max-width: 100vw; }

/* ── Nav Glass ── */
.nav-glass {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

/* ── Hero Gradient ── */
.hero-gradient {
    background:
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
}

/* ── Text Gradient ── */
.text-gradient {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Featured Cards ── */
.featured-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}
.featured-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.06);
    transform: translateY(-2px);
}

/* ── Article Cards ── */
.article-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}
.article-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.06);
    transform: translateY(-2px);
}

/* ── Category Badges ── */
.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
    text-transform: capitalize;
}

.category-badge-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    border: 1px solid;
    text-transform: capitalize;
}

/* ── Tag Chips ── */
.tag-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.tag-scroll::-webkit-scrollbar { display: none; }

.tag-chip {
    flex-shrink: 0;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid rgba(71, 85, 105, 0.4);
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}
.tag-chip:hover {
    color: #e2e8f0;
    border-color: rgba(71, 85, 105, 0.7);
}
.tag-chip.active {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

/* ── Line Clamp ── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Table of Contents ── */
.toc-nav .toc-link {
    display: block;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    color: #64748b;
    border-left: 2px solid transparent;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.4;
}
.toc-nav .toc-link:hover {
    color: #e2e8f0;
}
.toc-nav .toc-link.active {
    color: #38bdf8;
    border-left-color: #38bdf8;
}

/* ── Prose (Markdown Content) ── */
.prose-custom {
    line-height: 1.8;
    font-size: 1.0625rem;
    color: #cbd5e1;
}

.prose-custom h2 {
    font-size: 1.625rem;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.prose-custom h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-custom h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.prose-custom p {
    margin-bottom: 1.25rem;
}

.prose-custom a {
    color: #38bdf8;
    text-decoration: underline;
    text-decoration-color: rgba(56, 189, 248, 0.3);
    text-underline-offset: 3px;
    transition: all 0.15s;
}
.prose-custom a:hover {
    text-decoration-color: #38bdf8;
}

.prose-custom strong {
    color: #f8fafc;
    font-weight: 600;
}

.prose-custom ul, .prose-custom ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.prose-custom ul { list-style-type: disc; }
.prose-custom ol { list-style-type: decimal; }
.prose-custom li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose-custom blockquote {
    border-left: 3px solid #38bdf8;
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    background: rgba(56, 189, 248, 0.05);
    border-radius: 0 0.5rem 0.5rem 0;
    color: #94a3b8;
    font-style: italic;
}
.prose-custom blockquote p:last-child {
    margin-bottom: 0;
}

.prose-custom code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
    background: rgba(30, 41, 59, 0.8);
    color: #7dd3fc;
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.prose-custom pre {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #0d1117;
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 0.75rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.5) transparent;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(71, 85, 105, 0.4);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 0.375rem;
    color: #94a3b8;
    font-size: 0.6875rem;
    font-family: inherit;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
    z-index: 1;
}
.prose-custom pre:hover .code-copy-btn { opacity: 1; }
.code-copy-btn:hover {
    background: rgba(71, 85, 105, 0.6);
    color: #e2e8f0;
}
.code-copy-btn.copied {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
    color: #4ade80;
}
.prose-custom pre::-webkit-scrollbar { height: 6px; }
.prose-custom pre::-webkit-scrollbar-track { background: transparent; }
.prose-custom pre::-webkit-scrollbar-thumb { background: rgba(71, 85, 105, 0.5); border-radius: 3px; }

.prose-custom pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e6edf3;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.prose-custom table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.prose-custom thead th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    font-weight: 600;
    border-bottom: 2px solid rgba(71, 85, 105, 0.4);
    font-size: 0.875rem;
    white-space: nowrap;
}
.prose-custom tbody td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.2);
    vertical-align: top;
}
.prose-custom tbody tr:hover {
    background: rgba(30, 41, 59, 0.4);
}

.prose-custom hr {
    border: none;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    margin: 2rem 0;
}

.prose-custom img {
    max-width: 100%;
    border-radius: 0.75rem;
}

/* ── Responsive Table Wrapper ── */
@media (max-width: 640px) {
    .prose-custom table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .prose-custom thead th,
    .prose-custom tbody td {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
    }
}

/* ── SVG Animation Container ── */
.hero-svg-container {
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ── Scroll-triggered animations ── */
.svg-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.svg-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Fade-in ── */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Reading Progress Bar ── */
.reading-progress {
    position: fixed;
    top: 64px; /* below navbar */
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    z-index: 60;
    transition: width 50ms linear;
}

/* ── Article Card Thumbnail ── */
.card-thumb {
    width: 100%;
    height: 140px;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-thumb object {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ── Sidebar Scrollbar ── */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.3) transparent;
}
.scrollbar-thin::-webkit-scrollbar { width: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(71, 85, 105, 0.3); border-radius: 2px; }

/* ── Mobile ToC Panel ── */
#tocMobilePanel {
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.5) transparent;
}
#tocMobilePanel::-webkit-scrollbar { width: 4px; }
#tocMobilePanel::-webkit-scrollbar-track { background: transparent; }
#tocMobilePanel::-webkit-scrollbar-thumb { background: rgba(71, 85, 105, 0.5); border-radius: 2px; }

/* ── Newsletter Sticky Footer Bar ── */
.newsletter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.newsletter-bar-hidden {
    transform: translateY(100%);
}
.newsletter-bar-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.newsletter-bar-close {
    color: #64748b;
    font-size: 1.5rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0.25rem;
    transition: color 0.15s;
}
.newsletter-bar-close:hover { color: #e2e8f0; }
.newsletter-bar-text {
    flex: 1;
    font-size: 0.875rem;
    color: #94a3b8;
    min-width: 180px;
}
.newsletter-bar-form {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.newsletter-bar-input {
    padding: 0.5rem 0.875rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.625rem;
    color: #f8fafc;
    font-size: 0.8125rem;
    outline: none;
    width: 200px;
    transition: border-color 0.15s;
}
.newsletter-bar-input::placeholder { color: #475569; }
.newsletter-bar-input:focus { border-color: rgba(56, 189, 248, 0.5); }
.newsletter-bar-btn {
    padding: 0.5rem 1.25rem;
    background: #38bdf8;
    color: #0f172a;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.newsletter-bar-btn:hover { background: #0ea5e9; }

@media (max-width: 640px) {
    .newsletter-bar-inner { padding: 0.75rem 1rem; gap: 0.625rem; }
    .newsletter-bar-text { font-size: 0.8125rem; min-width: 0; flex-basis: 100%; order: 1; }
    .newsletter-bar-close { order: 0; }
    .newsletter-bar-form { order: 2; width: 100%; }
    .newsletter-bar-input { flex: 1; width: auto; }
}

/* ── Inline Article CTA ── */
.newsletter-cta-inner {
    padding: 2rem;
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-left: 3px solid #38bdf8;
    border-radius: 1rem;
    text-align: center;
}
.newsletter-cta-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #4ade80;
}
.newsletter-cta-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: #38bdf8;
}
.newsletter-cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}
.newsletter-cta-desc {
    font-size: 0.9375rem;
    color: #94a3b8;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.newsletter-cta-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.newsletter-cta-input {
    padding: 0.625rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.625rem;
    color: #f8fafc;
    font-size: 0.875rem;
    outline: none;
    width: 240px;
    transition: border-color 0.15s;
}
.newsletter-cta-input::placeholder { color: #475569; }
.newsletter-cta-input:focus { border-color: rgba(56, 189, 248, 0.5); }
.newsletter-cta-btn {
    padding: 0.625rem 1.5rem;
    background: #38bdf8;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.newsletter-cta-btn:hover { background: #0ea5e9; }
.newsletter-cta-note {
    font-size: 0.75rem;
    color: #64748b;
}

@media (max-width: 640px) {
    .newsletter-cta-inner { padding: 1.5rem 1rem; }
    .newsletter-cta-input { width: 100%; }
    .newsletter-cta-form { flex-direction: column; }
    .newsletter-cta-btn { width: 100%; }
}

/* ── Content Upgrade Box ── */
.content-upgrade-inner {
    padding: 1.5rem;
    background: rgba(56, 189, 248, 0.04);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 1rem;
}
.content-upgrade-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 1rem;
}
.content-upgrade-title svg { color: #38bdf8; flex-shrink: 0; }
.content-upgrade-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.content-upgrade-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(71, 85, 105, 0.3);
    text-decoration: none;
    transition: all 0.15s;
    text-align: left;
    font-size: 0.875rem;
    width: 100%;
    cursor: pointer;
}
.content-upgrade-item svg { flex-shrink: 0; margin-top: 0.125rem; }
.content-upgrade-item strong {
    display: block;
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 0.125rem;
}
.content-upgrade-desc {
    display: block;
    font-size: 0.8125rem;
    color: #64748b;
}
.content-upgrade-link {
    color: #38bdf8;
}
.content-upgrade-link:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.06);
}
.content-upgrade-gated {
    color: #94a3b8;
    font-family: inherit;
}
.content-upgrade-gated:hover {
    border-color: rgba(71, 85, 105, 0.6);
    background: rgba(30, 41, 59, 0.6);
}
.content-upgrade-gate {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}
.content-upgrade-gate-text {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-bottom: 0.625rem;
}
.content-upgrade-gate-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .content-upgrade-gate-form { flex-direction: column; }
    .content-upgrade-gate-form .newsletter-cta-input { width: 100%; }
    .content-upgrade-gate-form .newsletter-cta-btn { width: 100%; }
}

/* ── GitHub Sign-in Button ── */
.github-signin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}
.github-signin-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}
.github-signin-btn svg {
    flex-shrink: 0;
}
.newsletter-email-fallback,
.upgrade-email-fallback {
    color: #64748b;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.newsletter-email-fallback:hover,
.upgrade-email-fallback:hover {
    color: #94a3b8;
}

/* ── Article Blur Gate (dev articles, non-authed) ── */
.article-blur-wrap {
    filter: blur(5px);
    -webkit-filter: blur(5px);
    user-select: none;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 50%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 50%);
    max-height: 300px;
    overflow: hidden;
}
.article-blur-gate {
    position: relative;
    margin-top: -2rem;
    padding: 1rem 1.5rem 2.5rem;
    text-align: center;
}
.article-blur-gate-inner {
    max-width: 28rem;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.article-blur-gate-inner > svg {
    color: #38bdf8;
}
.article-blur-gate-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
}
.article-blur-gate-desc {
    font-size: 0.9375rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}
.article-blur-gate-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}
.article-blur-email-fallback {
    color: #64748b;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.article-blur-email-fallback:hover {
    color: #94a3b8;
}
.article-blur-email-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

@media (max-width: 640px) {
    .article-blur-gate-inner { padding: 2rem 1.25rem; }
    .article-blur-email-form { flex-direction: column; }
    .article-blur-email-form .newsletter-cta-input { width: 100%; }
    .article-blur-email-form .newsletter-cta-btn { width: 100%; }
}

/* ── AI Readiness Assessment ── */

/* Progress bar */
.assess-progress {
    position: fixed;
    top: 64px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #a78bfa);
    z-index: 60;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0 2px 2px 0;
}

/* Step container */
.assess-step {
    display: none;
    animation: assessSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.assess-step.active {
    display: block;
}
@keyframes assessSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Selectable cards */
.assess-card {
    padding: 0.75rem 1rem;
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: left;
    width: 100%;
}
.assess-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.06);
    transform: translateY(-2px);
}
.assess-card.selected {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3), 0 4px 20px rgba(56, 189, 248, 0.1);
}
.assess-card.selected::after {
    content: '';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #38bdf8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 24 24' stroke='%230f172a' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}
.assess-card.faded {
    opacity: 0.5;
}

/* Multi-select card */
.assess-card.multi-selected {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3), 0 4px 20px rgba(56, 189, 248, 0.1);
}
.assess-card.multi-selected::after {
    content: '';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #38bdf8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 24 24' stroke='%230f172a' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

/* Insight bubble */
.assess-insight {
    padding: 1rem 1.25rem;
    background: rgba(30, 41, 59, 0.6);
    border-left: 3px solid #38bdf8;
    border-radius: 0 0.75rem 0.75rem 0;
    color: #94a3b8;
    font-size: 0.9375rem;
    font-style: italic;
    line-height: 1.6;
    animation: fadeIn 0.4s ease-out;
}

/* Thinking dots */
.assess-dots {
    display: inline-flex;
    gap: 4px;
    padding: 0.75rem 1.25rem;
}
.assess-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    animation: assessDotBounce 1.2s ease-in-out infinite;
}
.assess-dots span:nth-child(2) { animation-delay: 0.15s; }
.assess-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes assessDotBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Autocomplete */
.assess-autocomplete {
    position: relative;
    width: 100%;
    max-width: 400px;
}
.assess-autocomplete input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.75rem;
    color: #f8fafc;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.15s;
}
.assess-autocomplete input::placeholder { color: #475569; }
.assess-autocomplete input:focus { border-color: rgba(56, 189, 248, 0.5); }
.assess-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.75rem;
    max-height: 220px;
    overflow-y: auto;
    z-index: 20;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.5) transparent;
    display: none;
}
.assess-dropdown.open { display: block; }
.assess-dropdown-item {
    padding: 0.625rem 1rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.1s;
}
.assess-dropdown-item:first-child { border-radius: 0.75rem 0.75rem 0 0; }
.assess-dropdown-item:last-child { border-radius: 0 0 0.75rem 0.75rem; }
.assess-dropdown-item:hover,
.assess-dropdown-item.active {
    background: rgba(56, 189, 248, 0.1);
    color: #f8fafc;
}
.assess-dropdown-item.other-item {
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    color: #64748b;
    font-style: italic;
}
.assess-other-input {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.625rem;
    color: #f8fafc;
    font-size: 0.875rem;
    outline: none;
    animation: fadeIn 0.3s ease-out;
}
.assess-other-input::placeholder { color: #475569; }
.assess-other-input:focus { border-color: rgba(56, 189, 248, 0.5); }

/* Score display */
.assess-score {
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}
.assess-score-number {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.assess-score-label {
    font-size: 1.5rem;
    color: #64748b;
    font-weight: 600;
}
.assess-score-bar {
    width: 100%;
    max-width: 320px;
    height: 12px;
    background: rgba(71, 85, 105, 0.3);
    border-radius: 6px;
    margin: 1.5rem auto;
    overflow: hidden;
}
.assess-score-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #a78bfa);
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Result card */
.assess-result {
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 1rem;
    padding: 1.5rem;
    animation: fadeIn 0.4s ease-out;
}
.assess-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
}
.assess-result-item + .assess-result-item {
    border-top: 1px solid rgba(71, 85, 105, 0.2);
}

/* Lead form (email gate) */
.lead-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 440px;
    margin: 0 auto;
}
.lead-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.75rem;
    color: #f8fafc;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.15s;
}
.lead-form input::placeholder { color: #475569; }
.lead-form input:focus { border-color: rgba(56, 189, 248, 0.5); }
.lead-form button {
    padding: 0.75rem 1.75rem;
    background: #38bdf8;
    color: #0f172a;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.lead-form button:hover { background: #0ea5e9; }

/* Mobile */
@media (max-width: 640px) {
    .assess-autocomplete { max-width: 100%; }
    .lead-form { flex-direction: column; }
    .lead-form input { min-width: 0; width: 100%; }
    .lead-form button { width: 100%; }
    .assess-score-number { font-size: 4rem; }
}
