:root {
    color-scheme: dark;
    --qas-blue: #3b82f6;
    --qas-blue-dark: #1e40af;
    --qas-blue-soft: #eff6ff;
    --qas-blue-soft-dark: #1e3a8a;
    --qas-surface-dark: #1e293b;
    --qas-slate-700: #334155;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
}

.has-app-header {
    padding-top: 4.25rem;
}

.app-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid #1e293b;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.app-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: 56rem;
    min-height: 3.75rem;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.app-header__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.25rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: #dbeafe;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(30, 41, 59, 0.82);
}

.app-header__back:hover {
    background: rgba(51, 65, 85, 0.95);
}

.app-header__title {
    overflow: hidden;
    color: #cbd5e1;
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: right;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

button,
a,
label,
select {
    touch-action: manipulation;
}

a {
    text-underline-offset: 3px;
    color: inherit;
}

a:visited {
    color: inherit;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tool-card {
    background-color: var(--qas-surface-dark);
    border: 1px solid var(--qas-slate-700);
    color: #f8fafc;
    transition: transform 0.1s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.tool-card:active {
    transform: scale(0.96);
    background-color: var(--qas-slate-700);
}

.option-card {
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.option-card:active {
    transform: scale(0.99);
}

.option-card input[type="radio"] {
    display: none;
}

.dark .option-card {
    background-color: var(--qas-surface-dark);
}

.option-card.selected,
.btn-active {
    border-color: var(--qas-blue) !important;
    background-color: var(--qas-blue-soft) !important;
    color: var(--qas-blue-dark) !important;
    border-width: 2px !important;
}

.dark .option-card.selected,
.dark .btn-active {
    background-color: var(--qas-blue-soft-dark) !important;
    border-color: #60a5fa !important;
    color: #dbeafe !important;
}

.score-btn,
.result-card,
.chevron-icon {
    transition: all 0.3s ease-in-out;
}

.dashboard-page {
    background-color: #0f172a;
    color: #f8fafc;
}

* {
    box-sizing: border-box;
}

strong {
    font-weight: 700;
}

.container {
    width: 100%;
}

.absolute { position: absolute; }
.relative { position: relative; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.z-50 { z-index: 50; }

.block { display: block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.flex-col { flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.flex-grow { flex-grow: 1; }
.shrink-0 { flex-shrink: 0; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.mt-auto { margin-top: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-20 { padding-bottom: 5rem; }
.pb-48 { padding-bottom: 12rem; }
.pb-64 { padding-bottom: 16rem; }
.pl-4 { padding-left: 1rem; }

.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-\[18px\] { width: 18px; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-\[18px\] { height: 18px; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }

.overflow-hidden { overflow: hidden; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.border { border: 1px solid currentColor; }
.border-2 { border-width: 2px; border-style: solid; }
.border-b { border-bottom: 1px solid currentColor; }
.border-t { border-top: 1px solid currentColor; }
.border-l-4 { border-left: 4px solid currentColor; }
.border-b-8 { border-bottom: 8px solid currentColor; }
.border-dashed { border-style: dashed; }
.border-transparent { border-color: transparent; }

.shadow-sm { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.shadow-md { box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12); }
.shadow-lg { box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16); }
.shadow-xl { box-shadow: 0 18px 32px rgba(15, 23, 42, 0.2); }
.shadow-2xl { box-shadow: 0 25px 50px rgba(15, 23, 42, 0.35); }
.shadow-red-900\/40 { box-shadow: 0 20px 30px rgba(127, 29, 29, 0.4); }
.shadow-amber-900\/40 { box-shadow: 0 20px 30px rgba(120, 53, 15, 0.4); }

.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-50\/50 { background-color: rgba(248, 250, 252, 0.5); }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-900\/50 { background-color: rgba(15, 23, 42, 0.5); }
.bg-slate-900\/80 { background-color: rgba(15, 23, 42, 0.8); }
.bg-slate-900\/90 { background-color: rgba(15, 23, 42, 0.9); }
.bg-slate-950 { background-color: #020617; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500\/10 { background-color: rgba(59, 130, 246, 0.1); }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-900\/10 { background-color: rgba(30, 58, 138, 0.1); }
.bg-blue-900\/30 { background-color: rgba(30, 58, 138, 0.3); }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-50\/30 { background-color: rgba(254, 242, 242, 0.3); }
.bg-red-500\/10 { background-color: rgba(239, 68, 68, 0.1); }
.bg-red-600 { background-color: #dc2626; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-green-500 { background-color: #22c55e; }
.bg-green-600 { background-color: #16a34a; }
.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-400 { background-color: #facc15; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-amber-500\/10 { background-color: rgba(245, 158, 11, 0.1); }
.bg-purple-50 { background-color: #faf5ff; }
.bg-purple-500\/10 { background-color: rgba(168, 85, 247, 0.1); }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }

.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-600 { border-color: #475569; }
.border-slate-700 { border-color: #334155; }
.border-slate-800 { border-color: #1e293b; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-blue-100 { border-color: #dbeafe; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-400 { border-color: #60a5fa; }
.border-blue-500 { border-color: #3b82f6; }
.border-blue-800 { border-color: #1e40af; }
.border-red-500 { border-color: #ef4444; }
.border-red-800 { border-color: #991b1b; }
.border-green-500 { border-color: #22c55e; }
.border-green-800 { border-color: #166534; }
.border-yellow-500 { border-color: #eab308; }
.border-amber-400 { border-color: #fbbf24; }
.border-amber-500 { border-color: #f59e0b; }
.border-purple-600 { border-color: #9333ea; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.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; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-\[10px\] { font-size: 10px; line-height: 1rem; }
.font-sans { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration-line: underline; }
.no-underline { text-decoration-line: none; }
.tracking-tight { letter-spacing: 0; }
.tracking-tighter { letter-spacing: 0; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.decoration-blue-500 { text-decoration-color: #3b82f6; }
.decoration-2 { text-decoration-thickness: 2px; }

.text-white { color: #ffffff; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-blue-300 { color: #93c5fd; }
.text-blue-400 { color: #60a5fa; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-blue-800 { color: #1e40af; }
.text-red-400 { color: #f87171; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-red-900 { color: #7f1d1d; }
.text-green-200 { color: #bbf7d0; }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-green-900 { color: #14532d; }
.text-yellow-900 { color: #713f12; }
.text-amber-900 { color: #78350f; }
.text-purple-200 { color: #e9d5ff; }
.text-purple-600 { color: #9333ea; }
.text-purple-900 { color: #581c87; }

.opacity-20 { opacity: 0.2; }
.opacity-50 { opacity: 0.5; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.list-disc { list-style-type: disc; }
.backdrop-blur-md,
.backdrop-blur-xl {
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}
.rotate-180 { transform: rotate(180deg); }

.transition { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.transition-all { transition: all 0.15s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition-transform { transition: transform 0.15s ease; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:underline:hover { text-decoration-line: underline; }
.active\:scale-95:active { transform: scale(0.95); }
.group:active .group-active\:text-white { color: #ffffff; }

.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px #3b82f6; }
.focus\:ring-blue-500:focus { box-shadow: 0 0 0 2px #3b82f6; }
.focus\:ring-offset-2:focus { outline-offset: 2px; }

.peer:checked ~ .peer-checked\:text-blue-500 { color: #3b82f6; }
.peer:checked ~ .peer-checked\:border-blue-500 { border-color: #3b82f6; }

.dark .dark\:bg-slate-950 { background-color: #020617; }
.dark .dark\:bg-slate-950\/20 { background-color: rgba(2, 6, 23, 0.2); }
.dark .dark\:bg-slate-900 { background-color: #0f172a; }
.dark .dark\:bg-slate-800 { background-color: #1e293b; }
.dark .dark\:bg-gray-950 { background-color: #030712; }
.dark .dark\:bg-gray-900 { background-color: #111827; }
.dark .dark\:bg-gray-800 { background-color: #1f2937; }
.dark .dark\:bg-gray-800\/50 { background-color: rgba(31, 41, 55, 0.5); }
.dark .dark\:bg-gray-800\/80 { background-color: rgba(31, 41, 55, 0.8); }
.dark .dark\:bg-blue-900\/20 { background-color: rgba(30, 58, 138, 0.2); }
.dark .dark\:bg-blue-900\/30 { background-color: rgba(30, 58, 138, 0.3); }
.dark .dark\:bg-green-600 { background-color: #16a34a; }
.dark .dark\:bg-green-900\/20 { background-color: rgba(20, 83, 45, 0.2); }
.dark .dark\:bg-red-900\/10 { background-color: rgba(127, 29, 29, 0.1); }
.dark .dark\:bg-red-900\/20 { background-color: rgba(127, 29, 29, 0.2); }
.dark .dark\:bg-red-900\/30 { background-color: rgba(127, 29, 29, 0.3); }
.dark .dark\:bg-yellow-500 { background-color: #eab308; }
.dark .dark\:bg-yellow-900\/20 { background-color: rgba(113, 63, 18, 0.2); }
.dark .dark\:bg-amber-900\/20 { background-color: rgba(120, 53, 15, 0.2); }
.dark .dark\:bg-purple-900\/30 { background-color: rgba(88, 28, 135, 0.3); }

.dark .dark\:border-slate-700 { border-color: #334155; }
.dark .dark\:border-slate-800 { border-color: #1e293b; }
.dark .dark\:border-gray-600 { border-color: #4b5563; }
.dark .dark\:border-gray-700 { border-color: #374151; }
.dark .dark\:border-gray-800 { border-color: #1f2937; }
.dark .dark\:border-blue-800 { border-color: #1e40af; }
.dark .dark\:border-blue-900\/50 { border-color: rgba(30, 58, 138, 0.5); }
.dark .dark\:border-red-900\/50 { border-color: rgba(127, 29, 29, 0.5); }
.dark .dark\:border-blue-400 { border-color: #60a5fa; }

.dark .dark\:text-white { color: #ffffff; }
.dark .dark\:text-slate-100 { color: #f1f5f9; }
.dark .dark\:text-slate-200 { color: #e2e8f0; }
.dark .dark\:text-slate-300 { color: #cbd5e1; }
.dark .dark\:text-slate-400 { color: #94a3b8; }
.dark .dark\:text-slate-500 { color: #64748b; }
.dark .dark\:text-gray-100 { color: #f3f4f6; }
.dark .dark\:text-gray-200 { color: #e5e7eb; }
.dark .dark\:text-gray-300 { color: #d1d5db; }
.dark .dark\:text-gray-400 { color: #9ca3af; }
.dark .dark\:text-gray-500 { color: #6b7280; }
.dark .dark\:text-blue-300 { color: #93c5fd; }
.dark .dark\:text-blue-400 { color: #60a5fa; }
.dark .dark\:text-red-400 { color: #f87171; }
.dark .dark\:text-green-200 { color: #bbf7d0; }
.dark .dark\:text-green-500 { color: #22c55e; }
.dark .dark\:text-yellow-200 { color: #fef08a; }
.dark .dark\:text-yellow-400 { color: #facc15; }
.dark .dark\:text-amber-200 { color: #fde68a; }
.dark .dark\:text-purple-200 { color: #e9d5ff; }

.dark .dark\:hover\:bg-gray-700:hover { background-color: #374151; }
.dark .dark\:hover\:bg-gray-800:hover { background-color: #1f2937; }
.dark .dark\:hover\:bg-slate-700:hover { background-color: #334155; }
.dark .dark\:hover\:bg-slate-800:hover,
.dark .dark\:hover\:bg-slate-800\/50:hover { background-color: rgba(30, 41, 59, 0.5); }

@keyframes bounce {
    0%, 100% { transform: translateY(-18%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

@keyframes pulse {
    50% { opacity: 0.55; }
}

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

@media (min-width: 640px) {
    .sm\:text-xs { font-size: 0.75rem; line-height: 1rem; }
}

@media (min-width: 768px) {
    .md\:w-auto { width: auto; }
    .md\:flex-row { flex-direction: row; }
    .md\:items-end { align-items: flex-end; }
    .md\:space-x-4 > * + * { margin-left: 1rem; }
    .md\:space-y-0 > * + * { margin-top: 0; }
    .md\:p-8 { padding: 2rem; }
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
}

a.tool-card,
a.tool-card:visited {
    color: #f8fafc;
}
