/**
 * @file utilities.css
 * @description Self-hosted production CSS utility bundle for the UPKK Interactive Question Bank (`v2.3.10`).
 * Eliminates any external runtime script dependency so the app renders identically on Cloudflare Pages,
 * Vercel, GitHub Pages, or offline local environments.
 */

/* 1. Tailwind Preflight / Base Element Resets */
h1, h2, h3, h4, h5, h6, p, ul, ol {
  margin: 0;
  padding: 0;
}
ul, ol {
  list-style: none;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}
button {
  background-color: transparent;
  background-image: none;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: inherit;
}
svg {
  display: block;
  vertical-align: middle;
}

/* 2. Display & Visibility */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* 3. Positioning & Z-Index */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-x-0 { left: 0; right: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.right-1\.5 { right: 0.375rem; }
.bottom-0 { bottom: 0; }
.top-\[667px\] { top: 667px; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.pointer-events-none { pointer-events: none; }

/* 4. Flexbox & Grid */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.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)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.col-span-2 { grid-column: span 2 / span 2; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-7 { grid-column: span 7 / span 7; }
.col-span-8 { grid-column: span 8 / span 8; }

.gap-0\.5 { gap: 0.125rem; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-8 { gap: 2rem; }

/* Vertical Stack Spacing (space-y-*) */
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.625rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-3\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.875rem; }

/* 5. Sizing (Width & Height) */
.w-3 { width: 0.75rem; }
.w-3\.5 { width: 0.875rem; }
.w-7 { width: 1.75rem; }
.w-9 { width: 2.25rem; }
.w-full { width: 100%; }
.w-\[375px\] { width: 375px; }
.w-\[7\%\] { width: 7%; }
.w-\[33\%\] { width: 33%; }
.w-\[67\%\] { width: 67%; }

.min-w-0 { min-width: 0px; }
.min-w-\[44px\] { min-width: 44px; }
.min-w-\[48px\] { min-width: 48px; }

.max-w-\[175px\] { max-width: 175px; }
.max-w-\[360px\] { max-width: 360px; }
.max-w-\[480px\] { max-width: 480px; }
.max-w-\[640px\] { max-width: 640px; }
.max-w-\[760px\] { max-width: 760px; }
.max-w-\[1140px\] { max-width: 1140px; }
.max-w-\[1160px\] { max-width: 1160px; }

.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-3\.5 { height: 0.875rem; }
.h-7 { height: 1.75rem; }
.h-9 { height: 2.25rem; }
.h-full { height: 100%; }
.h-\[26px\] { height: 26px; }
.h-\[40px\] { height: 40px; }
.h-\[42px\] { height: 42px; }
.h-\[48px\] { height: 48px; }
.h-\[68px\] { height: 68px; }

.min-h-screen { min-height: 100vh; }
.min-h-\[36px\] { min-height: 36px; }
.min-h-\[38px\] { min-height: 38px; }
.min-h-\[40px\] { min-height: 40px; }
.min-h-\[42px\] { min-height: 42px; }
.min-h-\[44px\] { min-height: 44px; }
.min-h-\[46px\] { min-height: 46px; }
.min-h-\[48px\] { min-height: 48px; }
.min-h-\[68px\] { min-height: 68px; }
.min-h-\[76px\] { min-height: 76px; }
.min-h-\[667px\] { min-height: 667px; }
.min-h-\[680px\] { min-height: 680px; }

/* 6. Padding & Margin */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.py-0 { padding-top: 0px; padding-bottom: 0px; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }

.pt-0\.5 { padding-top: 0.125rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-2\.5 { padding-top: 0.625rem; }
.pb-1\.5 { padding-bottom: 0.375rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-\[84px\] { padding-bottom: 84px; }
.pb-\[88px\] { padding-bottom: 88px; }
.pl-2\.5 { padding-left: 0.625rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-6 { padding-right: 1.5rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mx-3\.5 { margin-left: 0.875rem; margin-right: 0.875rem; }
.mr-1 { margin-right: 0.25rem; }
.mt-0 { margin-top: 0px; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2\.5 { margin-top: 0.625rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-3\.5 { margin-top: 0.875rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-2\.5 { margin-bottom: 0.625rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-3\.5 { margin-bottom: 0.875rem; }
.mb-4 { margin-bottom: 1rem; }

/* 7. Typography */
.font-mono { font-family: var(--font-mono); }
.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-\[15px\] { font-size: 15px; }
.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; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.not-italic { font-style: normal; }
.underline { text-decoration-line: underline; }
.uppercase { text-transform: uppercase; }

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.leading-6 { line-height: 1.5rem; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-\[0\.01em\] { letter-spacing: 0.01em; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.whitespace-nowrap { white-space: nowrap; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 8. Text Colors */
.text-\[\#047857\] { color: #047857; }
.text-\[\#059669\] { color: #059669; }
.text-\[\#064E3B\] { color: #064E3B; }
.text-\[\#065F46\] { color: #065F46; }
.text-\[\#11221A\] { color: #11221A; }
.text-\[\#1E3A8A\] { color: #1E3A8A; }
.text-\[\#1E40AF\] { color: #1E40AF; }
.text-\[\#2C3E35\] { color: #2C3E35; }
.text-\[\#4A5D52\] { color: #4A5D52; }
.text-\[\#78350F\] { color: #78350F; }
.text-\[\#92400E\] { color: #92400E; }
.text-\[\#991B1B\] { color: #991B1B; }
.text-\[\#CFC9BC\] { color: #CFC9BC; }
.text-\[\#E6F4EE\] { color: #E6F4EE; }
.text-\[\#FFFFFF\] { color: #FFFFFF; }
.hover\:text-\[\#11221A\]:hover { color: #11221A; }

/* 9. Backgrounds */
.bg-transparent { background-color: transparent; }
.bg-\[\#047857\] { background-color: #047857; }
.bg-\[\#064E3B\] { background-color: #064E3B; }
.bg-\[\#065F46\] { background-color: #065F46; }
.bg-\[\#11221A\]\/75 { background-color: rgba(17, 34, 26, 0.75); }
.bg-\[\#2C3E35\] { background-color: #2C3E35; }
.bg-\[\#78350F\] { background-color: #78350F; }
.bg-\[\#991B1B\] { background-color: #991B1B; }
.bg-\[\#D1FAE5\] { background-color: #D1FAE5; }
.bg-\[\#D97706\] { background-color: #D97706; }
.bg-\[\#DBEAFE\] { background-color: #DBEAFE; }
.bg-\[\#DC2626\] { background-color: #DC2626; }
.bg-\[\#E2DDD3\] { background-color: #E2DDD3; }
.bg-\[\#E6F4EE\] { background-color: #E6F4EE; }
.bg-\[\#EFECE6\] { background-color: #EFECE6; }
.bg-\[\#F7F6F2\] { background-color: #F7F6F2; }
.bg-\[\#FBF3DB\] { background-color: #FBF3DB; }
.bg-\[\#FEE2E2\] { background-color: #FEE2E2; }
.bg-\[\#FEF3C7\] { background-color: #FEF3C7; }
.bg-\[\#FFFFFF\] { background-color: #FFFFFF; }
.bg-\[\#FFFFFF\]\/80 { background-color: rgba(255, 255, 255, 0.8); }

.hover\:bg-\[\#047857\]:hover { background-color: #047857; }
.hover\:bg-\[\#065F46\]:hover { background-color: #065F46; }
.hover\:bg-\[\#D1FAE5\]:hover { background-color: #D1FAE5; }
.hover\:bg-\[\#E6F4EE\]:hover { background-color: #E6F4EE; }
.hover\:bg-\[\#FEE2E2\]:hover { background-color: #FEE2E2; }
.hover\:bg-\[\#FEF3C7\]:hover { background-color: #FEF3C7; }

/* 10. Borders & Radii */
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-t-2 { border-top-width: 2px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-dashed { border-style: dashed; }

.border-\[\#047857\] { border-color: #047857; }
.border-\[\#059669\] { border-color: #059669; }
.border-\[\#059669\]\/30 { border-color: rgba(5, 150, 105, 0.3); }
.border-\[\#064E3B\] { border-color: #064E3B; }
.border-\[\#11221A\] { border-color: #11221A; }
.border-\[\#2563EB\] { border-color: #2563EB; }
.border-\[\#78350F\] { border-color: #78350F; }
.border-\[\#93C5FD\] { border-color: #93C5FD; }
.border-\[\#991B1B\] { border-color: #991B1B; }
.border-\[\#CFC9BC\] { border-color: #CFC9BC; }
.border-\[\#D97706\] { border-color: #D97706; }
.border-\[\#DC2626\] { border-color: #DC2626; }
.border-\[\#E2DDD3\] { border-color: #E2DDD3; }
.border-l-\[\#D97706\] { border-left-color: #D97706; }

.hover\:border-\[\#047857\]:hover { border-color: #047857; }
.hover\:border-\[\#11221A\]:hover { border-color: #11221A; }

.rounded-full { border-radius: 9999px; }
.rounded-\[2px\] { border-radius: 2px; }
.rounded-\[4px\] { border-radius: 4px; }
.rounded-\[6px\] { border-radius: 6px; }
.rounded-\[8px\] { border-radius: 8px; }
.rounded-b-\[2px\] { border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; }

/* 11. Overflow, Appearance, Shadows & Transitions */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.appearance-none { -webkit-appearance: none; appearance: none; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }

/* 12. Responsive Breakpoints (sm: 640px, md: 768px, lg: 1024px) */
@media (min-width: 640px) {
  .sm\:inline-flex { display: inline-flex; }
  .sm\:items-center { align-items: center; }
  .sm\:w-auto { width: auto; }
  .sm\:min-w-\[260px\] { min-width: 260px; }
  .sm\:px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 768px) {
  .md\:p-5 { padding: 1.25rem; }
  .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
}

@media (min-width: 1024px) {
  .lg\:flex-row { flex-direction: row; }
  .lg\:items-center { align-items: center; }
  .lg\:justify-between { justify-content: space-between; }
}
