/**
 * ToggleDroid - Custom Styles
 * Modern, professional styling with smooth animations
 */

/* ===== Alpine.js Cloak ===== */
[x-cloak] {
    display: none !important;
}

/* ===== Base Styles ===== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d1d5db 0%, #e5e7eb 100%);
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9ca3af 0%, #d1d5db 100%);
}

:root.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

:root.dark ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
}

/* ===== Smooth Transitions ===== */
html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Selection ===== */
::selection {
    background-color: rgba(14, 165, 233, 0.2);
    color: inherit;
}

/* ===== Animations ===== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Card Hover Effects ===== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

/* ===== Button Styles ===== */
.btn-primary {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    box-shadow: 0 10px 30px -5px rgba(20, 184, 166, 0.4);
}

.btn-dark {
    background: linear-gradient(90deg, #0f172a, #1f2937);
    color: #ffffff;
    box-shadow: 0 10px 20px -8px rgba(15, 23, 42, 0.3);
}

.btn-dark:hover {
    background: linear-gradient(90deg, #1f2937, #334155);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--slate-200);
    color: var(--slate-600);
}

:root.dark .btn-outline {
    border-color: var(--surface-700);
    color: var(--slate-300);
}

.btn-muted {
    background: var(--slate-100);
    color: var(--slate-600);
}

:root.dark .btn-muted {
    background: var(--surface-800);
    color: var(--slate-300);
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 10px 20px -10px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-ghost {
    background: transparent;
    color: var(--slate-500);
}

.btn-ghost:hover {
    background: var(--slate-100);
    color: var(--slate-700);
}

:root.dark .btn-ghost {
    color: var(--slate-400);
}

:root.dark .btn-ghost:hover {
    background: var(--surface-800);
    color: #ffffff;
}

/* ===== Login Elements ===== */
.login-google-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
}

.spinner-lg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ===== Loading Screen ===== */
.loading-logo {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(20, 184, 166, 0.3);
}

.loading-logo-icon {
    width: 2rem;
    height: 2rem;
    color: #ffffff;
}

.loading-dots {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.loading-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: var(--primary-500);
    animation: bounce 1s infinite;
}

.delay-0 {
    animation-delay: 0ms;
}

.delay-150 {
    animation-delay: 150ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.loading-text {
    font-size: 0.875rem;
    color: var(--slate-500);
    font-weight: 500;
}

:root.dark .loading-text {
    color: var(--slate-400);
}

/* ===== Animations ===== */
@keyframes slideUp {
    0% { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-slide-up-delayed {
    animation: slideUp 0.6s ease-out 0.2s both;
}

.animate-slide-up-delayed-2 {
    animation: slideUp 0.6s ease-out 0.4s both;
}

.animate-slide-up-delayed-3 {
    animation: slideUp 0.6s ease-out 0.6s both;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-bounce-slow {
    animation: bounce 3s infinite;
}

/* ===== App Theme Variables ===== */
:root {
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;
    --primary-950: #042f2e;

    --surface-50: #f8fafc;
    --surface-100: #f1f5f9;
    --surface-200: #e2e8f0;
    --surface-800: #1f2937;
    --surface-900: #111827;
    --surface-950: #0b1220;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;

    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;

    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-200: #fecaca;
    --red-300: #fca5a5;
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-800: #991b1b;
    --red-900: #7f1d1d;

    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-300: #d8b4fe;
    --purple-500: #a855f7;
    --purple-700: #7e22ce;
    --purple-900: #581c87;
}

/* ===== Layout Helpers ===== */
.stack-lg {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stack-md {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stack-sm {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stack-xs {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.row {
    display: flex;
    align-items: center;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.row-start {
    display: flex;
    align-items: flex-start;
}

.row-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== Icon Sizes ===== */
.icon-md {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-lg {
    width: 2.5rem;
    height: 2.5rem;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-xs {
    width: 0.875rem;
    height: 0.875rem;
}

/* ===== Marketing / Docs ===== */
.marketing-body {
    min-height: 100vh;
    font-family: "Inter", "IBM Plex Sans", system-ui, sans-serif;
    background: #f8fafc;
    color: var(--slate-900);
    overflow-x: hidden;
}

:root.dark .marketing-body {
    background: #0b1220;
    color: #f1f5f9;
}

.marketing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.75rem;
}

@media (max-width: 768px) {
    .marketing-container {
        padding: 0 1.25rem;
    }
}

.marketing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    backdrop-filter: blur(18px);
}

:root.dark .marketing-nav {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(51, 65, 85, 0.6);
}

.marketing-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
    gap: 1rem;
}

@media (max-width: 640px) {
    .marketing-nav-inner {
        height: 4.1rem;
    }
}

.marketing-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.marketing-brand-mark {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9, #7c3aed);
    color: #ffffff;
    box-shadow: 0 14px 30px -12px rgba(14, 165, 233, 0.45);
}

.marketing-brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.marketing-nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .marketing-nav-links {
        display: flex;
    }
}

.marketing-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

:root.dark .marketing-nav-link {
    color: var(--slate-300);
}

.marketing-nav-link:hover {
    color: var(--slate-900);
}

:root.dark .marketing-nav-link:hover {
    color: #ffffff;
}

.marketing-nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: none;
    background: transparent;
    color: var(--slate-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    background: var(--slate-100);
    color: var(--slate-700);
}

:root.dark .theme-toggle {
    color: var(--slate-300);
}

:root.dark .theme-toggle:hover {
    background: rgba(30, 41, 59, 0.7);
    color: #ffffff;
}

.icon-dark {
    display: none;
}

:root.dark .icon-dark {
    display: inline-flex;
}

:root.dark .icon-light {
    display: none;
}

.marketing-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.35rem;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    box-shadow: 0 14px 26px -14px rgba(14, 165, 233, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marketing-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px -15px rgba(14, 165, 233, 0.7);
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 6.5rem 0 3.5rem;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 5.5rem 0 3rem;
    }
}

.hero-background {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 45%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.15), transparent 45%),
        linear-gradient(135deg, #f8fafc 0%, #eef2ff 40%, #f8fafc 100%);
    z-index: 0;
}

:root.dark .hero-background {
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 45%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.2), transparent 45%),
        linear-gradient(135deg, #0b1220 0%, #111827 45%, #0b1220 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
    z-index: 0;
}

.hero-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(60px);
    opacity: 0.7;
    z-index: 0;
}

.hero-blob--left {
    top: 10%;
    left: -12%;
    width: 20rem;
    height: 20rem;
    background: rgba(14, 165, 233, 0.3);
}

.hero-blob--right {
    bottom: 10%;
    right: -12%;
    width: 22rem;
    height: 22rem;
    background: rgba(139, 92, 246, 0.3);
}

.hero-blob--center {
    top: 45%;
    left: 50%;
    width: 28rem;
    height: 28rem;
    transform: translate(-50%, -50%);
    background: rgba(14, 165, 233, 0.08);
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-layout {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .hero-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
    }
}

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

@media (min-width: 1024px) {
    .hero-content {
        text-align: left;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.05rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 165, 233, 0.25);
    background: rgba(14, 165, 233, 0.1);
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
    .hero-badge {
        margin-bottom: 1.5rem;
    }
}

:root.dark .hero-badge {
    background: rgba(14, 165, 233, 0.15);
    color: #e2e8f0;
}

.badge-ping {
    position: relative;
    width: 0.5rem;
    height: 0.5rem;
}

.badge-ping-ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.4);
    animation: pulse 1.8s infinite;
}

.badge-ping-dot {
    position: absolute;
    inset: 0.1rem;
    border-radius: 999px;
    background: #0ea5e9;
}

.hero-badge-text {
    font-size: 0.8rem;
}

.hero-title {
    font-size: clamp(2.6rem, 4.2vw, 3.9rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--slate-600);
    max-width: 34rem;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}

:root.dark .hero-subtitle {
    color: var(--slate-300);
}

@media (min-width: 1024px) {
    .hero-subtitle {
        margin: 0 0 2rem;
    }
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.75rem;
}

@media (max-width: 640px) {
    .hero-actions {
        gap: 0.85rem;
    }
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .hero-actions {
        justify-content: flex-start;
    }
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.8rem;
    border-radius: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #ffffff;
    box-shadow: 0 18px 30px -15px rgba(14, 165, 233, 0.6);
}

.hero-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 34px -15px rgba(14, 165, 233, 0.7);
}

.hero-btn-secondary {
    background: #ffffff;
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
}

:root.dark .hero-btn-secondary {
    background: rgba(30, 41, 59, 0.9);
    color: #e2e8f0;
    border-color: rgba(51, 65, 85, 0.7);
}

/* ===== Hero Metrics ===== */
.hero-metrics {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

@media (min-width: 1024px) {
    .hero-metrics {
        justify-content: flex-start;
    }
}

:root.dark .hero-metrics {
    border-color: rgba(51, 65, 85, 0.5);
}

.hero-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

@media (min-width: 1024px) {
    .hero-metric {
        align-items: flex-start;
    }
}

.hero-metric-value {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-metric-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--slate-500);
}

.hero-metric-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(226, 232, 240, 0.6);
}

:root.dark .hero-metric-divider {
    background: rgba(51, 65, 85, 0.5);
}

/* ===== Demo Components ===== */
.hero-demo {
    position: relative;
}

.glow {
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.15);
}

.gradient-border {
    position: relative;
    padding: 1px;
    border-radius: 1.6rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.4), rgba(139, 92, 246, 0.4));
}

.demo-card {
    background: #ffffff;
    border-radius: 1.6rem;
    padding: 1.25rem;
    box-shadow: 0 30px 60px -32px rgba(15, 23, 42, 0.45);
}

:root.dark .demo-card {
    background: #0f172a;
}

.demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.demo-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.demo-meta {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.demo-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--emerald-600);
    font-weight: 600;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--emerald-400);
    animation: pulse 1.5s infinite;
}

.status-label {
    font-size: 0.75rem;
}

.demo-flags {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.demo-flag-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 0.9rem;
    border-radius: 1.05rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.7);
}

:root.dark .demo-flag-row {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.6);
}

.demo-flag-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.demo-flag-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    background: rgba(14, 165, 233, 0.15);
}

.demo-flag-icon--primary {
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.15);
}

.demo-flag-icon--accent {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.18);
}

.demo-flag-icon--rose {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.18);
}

.demo-flag-key {
    font-size: 0.86rem;
    font-weight: 600;
    font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
}

.demo-flag-desc {
    font-size: 0.78rem;
    color: var(--slate-500);
}

.demo-flag-right {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.toggle-preview,
.toggle-preview-off {
    width: 3rem;
    height: 1.5rem;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
}

.toggle-preview {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 8px 16px -10px rgba(16, 185, 129, 0.6);
}

.toggle-preview-off {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 6px 12px -8px rgba(15, 23, 42, 0.6);
    transition: transform 0.2s ease;
}

.toggle-thumb--on {
    right: 0.3rem;
}

.toggle-thumb--off {
    left: 0.3rem;
}

.demo-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    margin-top: 1.25rem;
    padding-top: 0.85rem;
}

:root.dark .demo-stats {
    border-color: rgba(51, 65, 85, 0.5);
}

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

.demo-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.demo-stat-label {
    font-size: 0.72rem;
    color: var(--slate-500);
}

.demo-float {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    color: #ffffff;
    box-shadow: 0 14px 30px -15px rgba(15, 23, 42, 0.6);
}

.demo-float--emerald {
    top: -1.5rem;
    right: -1rem;
    width: 4.25rem;
    height: 4.25rem;
    background: linear-gradient(135deg, #10b981, #059669);
    animation: float 6s ease-in-out infinite;
}

.demo-float--accent {
    bottom: -1.25rem;
    left: -1rem;
    width: 3.25rem;
    height: 3.25rem;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    animation: float 6s ease-in-out 3s infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--slate-400);
    animation: bounce 3s infinite;
}

@media (max-width: 768px) {
    .scroll-indicator {
        display: none;
    }
}

/* ===== Sections ===== */
.marketing-section {
    padding: 5rem 0;
    background: #ffffff;
}

@media (max-width: 768px) {
    .marketing-section {
        padding: 4rem 0;
    }
}

:root.dark .marketing-section {
    background: #0f172a;
}

.section-header {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 2.25rem;
}

.section-title {
    font-size: clamp(2rem, 3.2vw, 2.85rem);
    font-weight: 700;
    margin: 0 0 1rem;
}

/* ===== Features Grid ===== */
.features-grid-3col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .features-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid-3col {
        grid-template-columns: repeat(3, 1fr);
    }
}

.landing-features-section {
    padding: 6rem 0 5rem;
    background: #ffffff;
}

:root.dark .landing-features-section {
    background: #0f172a;
}

.landing-feature-card {
    padding: 1.75rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    background: #ffffff;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

:root.dark .landing-feature-card {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.6);
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 20px 40px -15px rgba(14, 165, 233, 0.15);
}

:root.dark .landing-feature-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 20px 40px -15px rgba(14, 165, 233, 0.1);
}

.landing-feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.landing-feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.landing-feature-icon--sky {
    background: rgba(14, 165, 233, 0.12);
    color: #0ea5e9;
}

.landing-feature-icon--emerald {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.landing-feature-icon--rose {
    background: rgba(244, 63, 94, 0.12);
    color: #f43f5e;
}

.landing-feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.landing-feature-text {
    font-size: 0.88rem;
    color: var(--slate-500);
    line-height: 1.65;
}

:root.dark .landing-feature-text {
    color: var(--slate-300);
}

/* ===== Steps Section ===== */
.landing-steps-section {
    padding: 6rem 0 5rem;
    background: #f8fafc;
}

:root.dark .landing-steps-section {
    background: #0b1220;
}

.steps-timeline {
    max-width: 42rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.step-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    padding: 1.75rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    background: #ffffff;
    position: relative;
}

:root.dark .step-card {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.6);
}

@media (min-width: 640px) {
    .step-card {
        grid-template-columns: auto 1fr auto;
    }
}

.step-number {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #0ea5e9, #7c3aed);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -8px rgba(14, 165, 233, 0.5);
    flex-shrink: 0;
}

.step-content {
    min-width: 0;
}

.step-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.step-text {
    font-size: 0.88rem;
    color: var(--slate-500);
    line-height: 1.65;
}

:root.dark .step-text {
    color: var(--slate-300);
}

.step-visual {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    justify-content: center;
    grid-column: 1 / -1;
    padding-top: 0.75rem;
}

@media (min-width: 640px) {
    .step-visual {
        grid-column: auto;
        padding-top: 0;
        align-items: flex-end;
    }
}

.step-visual-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: "JetBrains Mono", monospace;
}

.step-visual-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
}

.step-visual-dot--sky {
    background: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.step-visual-flag {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.7);
    font-size: 0.8rem;
    font-family: "JetBrains Mono", monospace;
}

:root.dark .step-visual-flag {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.6);
}

.step-code {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin: 0;
    line-height: 1.5;
}

.step-connector {
    width: 2px;
    height: 2rem;
    background: linear-gradient(to bottom, rgba(14, 165, 233, 0.3), rgba(139, 92, 246, 0.3));
    margin: 0 auto;
    border-radius: 999px;
}

/* ===== Code Section ===== */
.code-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .code-grid {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: start;
    }
}

@media (max-width: 768px) {
    .code-grid {
        gap: 1.5rem;
    }
}

.code-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.code-window {
    border-radius: 1.6rem;
    background: #0f172a;
    box-shadow: 0 24px 48px -30px rgba(15, 23, 42, 0.8);
    overflow: hidden;
}

.code-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.3rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.code-window-left {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.code-window-controls {
    display: inline-flex;
    gap: 0.4rem;
}

.code-control {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.4);
}

.code-control--red {
    background: rgba(248, 113, 113, 0.8);
}

.code-control--yellow {
    background: rgba(251, 191, 36, 0.8);
}

.code-control--green {
    background: rgba(34, 197, 94, 0.8);
}

.code-window-title {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
    font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
}

.code-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    border: none;
    background: transparent;
    color: rgba(226, 232, 240, 0.7);
    cursor: pointer;
}

.code-window-body {
    padding: 1.2rem;
}

.code-block {
    font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
    font-size: 0.84rem;
    color: #e2e8f0;
    line-height: 1.65;
    margin: 0;
}

.code-response {
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    padding: 1.2rem;
    background: #ffffff;
}

:root.dark .code-response {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(51, 65, 85, 0.6);
}

.code-response-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--slate-500);
    margin-bottom: 0.75rem;
}

.code-response-body {
    font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--slate-600);
    margin: 0;
}

:root.dark .code-response-body {
    color: var(--slate-300);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    background: #ffffff;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

:root.dark .feature-card {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.6);
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.4);
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-icon--primary {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

.feature-icon--accent {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.feature-icon--emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.feature-icon--amber {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.feature-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.feature-text {
    font-size: 0.86rem;
    color: var(--slate-500);
}

:root.dark .feature-text {
    color: var(--slate-300);
}

/* ===== CTA Section ===== */
.landing-cta-section {
    padding: 3rem 0 5rem;
    background: #ffffff;
}

:root.dark .landing-cta-section {
    background: #0f172a;
}

.landing-cta-card {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    padding: 4rem 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

:root.dark .landing-cta-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.landing-cta-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(14, 165, 233, 0.2), transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(139, 92, 246, 0.2), transparent 50%);
    z-index: 0;
}

.landing-cta-content {
    position: relative;
    z-index: 1;
}

.landing-cta-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.landing-cta-text {
    font-size: 1.05rem;
    color: rgba(226, 232, 240, 0.8);
    margin-bottom: 2rem;
}

.landing-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.landing-cta-actions .hero-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.landing-cta-actions .hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Footer ===== */
.marketing-footer {
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    background: #ffffff;
    padding: 2.5rem 0;
}

:root.dark .marketing-footer {
    background: #0f172a;
    border-color: rgba(51, 65, 85, 0.6);
}

.marketing-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .marketing-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.marketing-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.marketing-footer-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, #0ea5e9, #7c3aed);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.marketing-footer-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.marketing-footer-links {
    display: inline-flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--slate-500);
}

.marketing-footer-links a {
    color: inherit;
    text-decoration: none;
}

.marketing-footer-links a:hover {
    color: var(--slate-700);
}

:root.dark .marketing-footer-links {
    color: var(--slate-400);
}

.marketing-footer-note {
    color: var(--slate-400);
    font-size: 0.8rem;
}

.landing-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

@media (min-width: 768px) {
    .landing-footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 3rem;
    }
}

.landing-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-footer-tagline {
    font-size: 0.85rem;
    color: var(--slate-500);
    line-height: 1.6;
}

:root.dark .landing-footer-tagline {
    color: var(--slate-400);
}

.landing-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.landing-footer-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--slate-900);
    margin-bottom: 0.25rem;
}

:root.dark .landing-footer-heading {
    color: #ffffff;
}

.landing-footer-link {
    font-size: 0.85rem;
    color: var(--slate-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

:root.dark .landing-footer-link {
    color: var(--slate-400);
}

.landing-footer-link:hover {
    color: var(--slate-900);
}

:root.dark .landing-footer-link:hover {
    color: #ffffff;
}

.landing-footer-bottom {
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    padding-top: 1.5rem;
    text-align: center;
}

:root.dark .landing-footer-bottom {
    border-color: rgba(51, 65, 85, 0.6);
}

/* ===== Scroll Reveal Animation ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Doc Page ===== */
.doc-section {
    padding: 6.5rem 0 3.5rem;
}

@media (max-width: 768px) {
    .doc-section {
        padding: 5.5rem 0 3rem;
    }
}

.doc-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .doc-layout {
        grid-template-columns: 14rem 1fr;
        gap: 2.5rem;
    }
}

.doc-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .doc-sidebar {
        display: block;
        position: sticky;
        top: 6rem;
        align-self: start;
        max-height: calc(100vh - 7rem);
        overflow-y: auto;
    }
}

.doc-sidebar-inner {
    padding: 0.5rem 0;
}

.doc-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--slate-400);
    margin-bottom: 0.75rem;
}

.doc-toc {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.doc-toc-link {
    display: block;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--slate-500);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    border-left: 2px solid transparent;
}

:root.dark .doc-toc-link {
    color: var(--slate-400);
}

.doc-toc-link:hover {
    color: var(--slate-900);
    background: rgba(248, 250, 252, 0.8);
}

:root.dark .doc-toc-link:hover {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.6);
}

.doc-toc-link.is-active {
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.08);
    border-left-color: #0ea5e9;
    font-weight: 600;
}

:root.dark .doc-toc-link.is-active {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.12);
    border-left-color: #38bdf8;
}

.doc-main {
    min-width: 0;
}

.doc-shell {
    background: #ffffff;
    border-radius: 2.25rem;
    padding: 2.5rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: 0 30px 60px -40px rgba(15, 23, 42, 0.4);
}

@media (max-width: 768px) {
    .doc-shell {
        padding: 1.75rem;
        border-radius: 1.75rem;
    }
}

:root.dark .doc-shell {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(51, 65, 85, 0.6);
}

.doc-header {
    margin-bottom: 2rem;
}

.doc-header-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.doc-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

:root.dark .doc-version-badge {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.2);
}

.doc-protocol-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-weight: 600;
    font-size: 0.72rem;
}

:root.dark .doc-protocol-badge {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.2);
}

.doc-title {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.doc-subtitle {
    color: var(--slate-500);
    line-height: 1.7;
}

:root.dark .doc-subtitle {
    color: var(--slate-300);
}

.doc-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.1rem 1.35rem;
    border-radius: 1.05rem;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
    margin-bottom: 1.75rem;
}

:root.dark .doc-callout {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.2);
}

.doc-callout-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.6rem;
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-callout-content {
    flex: 1;
    min-width: 0;
}

.doc-callout-content strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
}

.doc-callout-content p {
    font-size: 0.82rem;
    color: var(--slate-600);
    margin: 0;
    line-height: 1.6;
}

:root.dark .doc-callout-content p {
    color: var(--slate-300);
}

.doc-card {
    border-radius: 1.6rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

:root.dark .doc-card {
    border-color: rgba(51, 65, 85, 0.6);
}

.doc-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.05rem 1.6rem;
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    flex-wrap: wrap;
}

:root.dark .doc-card-header {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.6);
}

.doc-method {
    padding: 0.3rem 0.75rem;
    border-radius: 0.6rem;
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

:root.dark .doc-method {
    color: #6ee7b7;
}

.doc-endpoint {
    font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
    font-size: 0.85rem;
    color: var(--slate-700);
}

:root.dark .doc-endpoint {
    color: #e2e8f0;
}

.doc-card-label {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-400);
}

.doc-card-body {
    padding: 1.2rem;
}

.doc-text {
    color: var(--slate-600);
    margin-bottom: 1rem;
    font-size: 0.92rem;
    line-height: 1.7;
}

:root.dark .doc-text {
    color: var(--slate-300);
}

.doc-section-title {
    font-size: 0.86rem;
    font-weight: 700;
    margin: 1.25rem 0 0.6rem;
}

.doc-inline-code {
    padding: 0.15rem 0.45rem;
    border-radius: 0.4rem;
    background: rgba(226, 232, 240, 0.8);
    font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
    font-size: 0.75rem;
}

:root.dark .doc-inline-code {
    background: rgba(30, 41, 59, 0.8);
}

.doc-pre {
    background: rgba(226, 232, 240, 0.6);
    border-radius: 0.9rem;
    padding: 1.1rem;
    overflow-x: auto;
    font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: #0f172a;
}

:root.dark .doc-pre {
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
}

.doc-pre--dark {
    background: #0f172a;
    color: #e2e8f0;
}

.doc-error {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--slate-600);
}

:root.dark .doc-error {
    color: var(--slate-300);
}

.doc-error-code {
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    font-weight: 700;
    font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
}

:root.dark .doc-error-code {
    color: #fca5a5;
}

.doc-error-code--info {
    background: rgba(14, 165, 233, 0.15);
    color: #0284c7;
}

:root.dark .doc-error-code--info {
    color: #38bdf8;
}

.doc-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.6rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    background: rgba(248, 250, 252, 0.9);
    margin-bottom: 2rem;
}

:root.dark .doc-info {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.6);
}

.doc-info-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.doc-info-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.doc-section-heading {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2.5rem 0 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

:root.dark .doc-section-heading {
    border-color: rgba(51, 65, 85, 0.4);
}

.doc-section-heading svg {
    color: #0ea5e9;
    flex-shrink: 0;
}

.doc-code-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.doc-copy-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: none;
    background: rgba(226, 232, 240, 0.3);
    color: var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 2;
}

.doc-copy-btn:hover {
    background: rgba(226, 232, 240, 0.6);
    color: var(--slate-600);
}

.doc-pre--dark .doc-copy-btn,
.doc-code-wrapper:has(.doc-pre--dark) .doc-copy-btn {
    background: rgba(51, 65, 85, 0.4);
    color: rgba(226, 232, 240, 0.6);
}

.doc-code-wrapper:has(.doc-pre--dark) .doc-copy-btn:hover {
    background: rgba(51, 65, 85, 0.7);
    color: #e2e8f0;
}

.doc-copy-btn.is-copied {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.doc-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.doc-status-badge--success {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

:root.dark .doc-status-badge--success {
    color: #6ee7b7;
}

.doc-errors-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

:root.dark .doc-table {
    border-color: rgba(51, 65, 85, 0.6);
}

.doc-table-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    background: rgba(248, 250, 252, 0.5);
}

:root.dark .doc-table-row {
    border-color: rgba(51, 65, 85, 0.4);
    background: rgba(15, 23, 42, 0.4);
}

.doc-table-row:last-child {
    border-bottom: none;
}

.doc-table-key {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate-700);
    flex-shrink: 0;
    min-width: 7rem;
}

:root.dark .doc-table-key {
    color: #e2e8f0;
}

.doc-table-value {
    flex: 1;
    color: var(--slate-500);
    min-width: 0;
}

:root.dark .doc-table-value {
    color: var(--slate-400);
}

.doc-table-required {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #dc2626;
    flex-shrink: 0;
}

.doc-table-optional {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate-400);
    flex-shrink: 0;
}

.doc-best-practices {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .doc-best-practices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.doc-best-card {
    border-radius: 1.05rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    padding: 1rem;
    background: #ffffff;
}

:root.dark .doc-best-card {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.6);
}

.doc-best-card h4 {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.doc-best-card p {
    font-size: 0.86rem;
    color: var(--slate-500);
}

:root.dark .doc-best-card p {
    color: var(--slate-300);
}

.doc-best-card-number {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #0ea5e9, #7c3aed);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    float: left;
    margin-right: 0.75rem;
    margin-top: 0.1rem;
}

.doc-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    align-items: center;
}

.doc-inline-good,
.doc-inline-bad {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.6rem;
    background: rgba(226, 232, 240, 0.7);
}

.doc-inline-good {
    color: #047857;
    background: rgba(16, 185, 129, 0.15);
}

.doc-inline-bad {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.15);
}

.doc-lang-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--slate-100);
    border-radius: 0.85rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

:root.dark .doc-lang-tabs {
    background: rgba(30, 41, 59, 0.8);
}

.doc-lang-tab {
    padding: 0.5rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--slate-500);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

:root.dark .doc-lang-tab {
    color: var(--slate-400);
}

.doc-lang-tab:hover {
    color: var(--slate-700);
    background: rgba(255, 255, 255, 0.5);
}

:root.dark .doc-lang-tab:hover {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.5);
}

.doc-lang-tab.is-active {
    background: #ffffff;
    color: var(--slate-900);
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.15);
}

:root.dark .doc-lang-tab.is-active {
    background: var(--surface-900);
    color: #ffffff;
}

.doc-lang-panel {
    display: none;
}

.doc-lang-panel.is-active {
    display: block;
}

/* ===== Responsive Typography ===== */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ===== Focus Ring for Accessibility ===== */
*:focus-visible {
    outline: 2px solid rgba(14, 165, 233, 0.5);
    outline-offset: 2px;
}

/* ===== Reduce Motion for Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
