/* === yp.lc Minimal Fallback — loaded only when cdn.tailwindcss.com is blocked === */

/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #f9fafb; --surface: #fff; --border: #e5e7eb;
  --text: #111827; --muted: #6b7280; --light: #9ca3af;
  --primary: #7c3aed; --primary-d: #6d28d9; --primary-bg: #f5f3ff;
  --radius: .75rem; --nav-h: 4rem;
}
.dark, [data-tw-blocked] body {
  --bg: #0a0a14; --surface: #111827; --border: #1f2937;
  --text: #f3f4f6; --muted: #9ca3af; --light: #6b7280;
  --primary-bg: #2e1065;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#0a0a14; --surface:#111827; --border:#1f2937; --text:#f3f4f6; --muted:#9ca3af; --light:#6b7280; --primary-bg:#2e1065; }
}

/* ─── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; }

/* ─── Critical utility classes Tailwind relies on ────────────────────────────── */
[x-cloak], .hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flex */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0, .shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

/* Gap */
.gap-1 { gap: .25rem; } .gap-1\.5 { gap: .375rem; } .gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }

/* Grid cols */
.grid-cols-1 { grid-template-columns: repeat(1,minmax(0,1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
@media (min-width:640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sm\:block { display: block; }
}
@media (min-width:768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none !important; }
}
@media (min-width:1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

/* Sizing */
.w-full { width: 100%; }
.w-4 { width: 1rem; } .w-5 { width: 1.25rem; } .w-6 { width: 1.5rem; }
.w-16 { width: 4rem; } .w-20 { width: 5rem; } .w-24 { width: 6rem; } .w-48 { width: 12rem; }
.h-4 { height: 1rem; } .h-5 { height: 1.25rem; } .h-6 { height: 1.5rem; }
.h-16 { height: 4rem; } .h-20 { height: 5rem; } .h-1\.5 { height: .375rem; }
.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }
.max-w-2xl { max-width: 42rem; } .max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; } .max-w-7xl { max-width: 80rem; }
.max-w-sm { max-width: 24rem; } .max-w-xl { max-width: 36rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
.whitespace-nowrap { white-space: nowrap; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; } .top-20 { top: 5rem; }
.right-0 { right: 0; } .right-4 { right: 1rem; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.z-0 { z-index: 0; } .z-10 { z-index: 10; } .z-50 { z-index: 50; }

/* Spacing — padding */
.p-1 { padding: .25rem; } .p-2 { padding: .5rem; } .p-3 { padding: .75rem; }
.p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; }
.px-2 { padding-inline: .5rem; } .px-3 { padding-inline: .75rem; }
.px-4 { padding-inline: 1rem; } .px-5 { padding-inline: 1.25rem; }
.px-6 { padding-inline: 1.5rem; } .px-8 { padding-inline: 2rem; }
.py-1 { padding-block: .25rem; } .py-1\.5 { padding-block: .375rem; }
.py-2 { padding-block: .5rem; } .py-2\.5 { padding-block: .625rem; }
.py-3 { padding-block: .75rem; } .py-4 { padding-block: 1rem; }
.py-8 { padding-block: 2rem; } .py-12 { padding-block: 3rem; }
.py-16 { padding-block: 4rem; } .py-20 { padding-block: 5rem; }
.py-28 { padding-block: 7rem; }
.pt-4 { padding-top: 1rem; } .pb-16 { padding-bottom: 4rem; }

/* Spacing — margin */
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.mb-14 { margin-bottom: 3.5rem; }
.ml-2 { margin-left: .5rem; } .ml-4 { margin-left: 1rem; }
.mr-1 { margin-right: .25rem; }
.mx-1 { margin-inline: .25rem; } .mx-1\.5 { margin-inline: .375rem; }
.mx-3 { margin-inline: .75rem; }
.space-y-1 > * + * { margin-top: .25rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-x-2 > * + * { margin-left: .5rem; }

/* Typography */
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.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-6xl { font-size: 3.75rem; line-height: 1; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-mono { font-family: ui-monospace, 'Cascadia Code', monospace; }
.font-sans { font-family: system-ui, -apple-system, sans-serif; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.tracking-tight { letter-spacing: -.025em; }
.tracking-wide { letter-spacing: .025em; }
.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.625; }
.underline { text-decoration: underline; }
.no-underline { text-decoration: none; }
.italic { font-style: italic; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.antialiased { -webkit-font-smoothing: antialiased; }
.bg-clip-text { -webkit-background-clip: text; background-clip: text; }
.text-transparent { color: transparent; }

/* Border */
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-none { border: none; }
.border-dashed { border-style: dashed; }
.rounded { border-radius: .25rem; }
.rounded-lg { border-radius: .5rem; }
.rounded-xl { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Shadow */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1); }

/* Colors — text */
.text-white { color: #fff !important; }
.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-900 { color: var(--text); }
.text-primary-300 { color: #c4b5fd; } .text-primary-400 { color: #a78bfa; }
.text-primary-600 { color: #7c3aed; } .text-primary-700 { color: #6d28d9; }
.text-red-400 { color: #f87171; } .text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; } .text-red-800 { color: #991b1b; }
.text-green-400 { color: #4ade80; } .text-green-600 { color: #16a34a; }
.text-amber-400 { color: #fbbf24; } .text-amber-700 { color: #b45309; }
.text-blue-300 { color: #93c5fd; } .text-blue-700 { color: #1d4ed8; }
.text-orange-400 { color: #fb923c; } .text-orange-600 { color: #ea580c; }
.text-cyan-500 { color: #06b6d4; }
.text-violet-300 { color: #c4b5fd; } .text-violet-700 { color: #6d28d9; }

/* Colors — bg */
.bg-white { background-color: var(--surface); }
.bg-transparent { background-color: transparent; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }
.bg-gray-950 { background-color: #030712; }
.bg-primary-100 { background-color: #ede9fe; }
.bg-primary-600 { background-color: #7c3aed; }
.bg-primary-700 { background-color: #6d28d9; }
.bg-primary-900 { background-color: #4c1d95; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-600 { background-color: #dc2626; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-amber-100 { background-color: #fef3c7; }
.bg-violet-50 { background-color: #f5f3ff; }
.bg-cyan-500 { background-color: #06b6d4; }

/* Dark mode overrides — most important ones */
.dark .bg-white, .dark .dark\:bg-gray-900 { background-color: #111827; }
.dark .dark\:bg-gray-800 { background-color: #1f2937; }
.dark .dark\:text-white { color: #fff; }
.dark .dark\:text-gray-300 { color: #d1d5db; }
.dark .dark\:text-gray-400 { color: #9ca3af; }
.dark .dark\:border-gray-700 { border-color: #374151; }
.dark .dark\:border-gray-800 { border-color: #1f2937; }

/* Misc */
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }
.opacity-0 { opacity: 0; } .opacity-60 { opacity: .6; } .opacity-75 { opacity: .75; }
.transition-colors { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.transition-all { transition: all .15s ease; }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Semantic component styles (when classes are missing/broken) ─────────────── */

nav {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.dark nav { background: rgba(10,10,20,.9); }

nav > div, nav > .max-w-7xl {
  display: flex; align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 80rem; margin: 0 auto;
  padding: 0 1rem;
}

main { display: block; }

/* Cards */
.bg-white.border.rounded-2xl,
.dark .dark\:bg-gray-900.border.rounded-2xl {
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* Buttons */
button, [type=submit] { cursor: pointer; }
.bg-primary-600, .bg-primary-600:is(a) {
  background: var(--primary); color: #fff; border: none;
  padding: .625rem 1.25rem; border-radius: .75rem;
  font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: .375rem;
  text-decoration: none;
}
.bg-primary-600:hover { background: var(--primary-d); }

/* Inputs */
input[type=text], input[type=email], input[type=password],
input[type=url], input[type=number], input[type=datetime-local],
select, textarea {
  width: 100%; padding: .625rem 1rem;
  border: 1px solid var(--border); border-radius: .75rem;
  background: var(--surface); color: var(--text);
  font-size: .875rem; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px rgba(124,58,237,.2);
}
.dark input, .dark select, .dark textarea {
  background: #1f2937; border-color: #374151;
}

/* Code/pre */
code { font-family: ui-monospace, monospace; font-size: .85em; }
pre { background: #030712; color: #4ade80; padding: 1rem; border-radius: .75rem; overflow-x: auto; font-size: .75rem; line-height: 1.6; }

/* Links */
a { color: var(--primary); }
a:hover { text-decoration: underline; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .875rem; }
th { font-weight: 600; }

/* Horizontal rule */
hr { border: none; border-top: 1px solid var(--border); }

/* Hero section */
section.relative.gradient-hero {
  background: linear-gradient(135deg, #0f0f1a 0%, #1e1040 50%, #0f0f1a 100%);
  color: #fff; text-align: center; padding: 5rem 1rem;
}
section.relative.gradient-hero h1 { font-size: clamp(2rem, 6vw, 4rem); font-weight: 800; margin-bottom: 1rem; }
section.relative.gradient-hero p { font-size: 1.1rem; color: #d1d5db; margin-bottom: 2rem; }

/* Flash messages */
.fixed.top-20.right-4 { position: fixed; top: 5rem; right: 1rem; z-index: 50; max-width: 20rem; }

/* Stat cards */
.text-3xl.font-extrabold { font-size: 1.875rem; font-weight: 800; }

/* Badge/pill */
.px-2.py-0\.5.rounded-full { padding: .125rem .5rem; border-radius: 9999px; }

/* Image fallback */
img { max-width: 100%; }

/* Canvas */
canvas { max-width: 100%; }
