
section{
  margin-bottom: 30px !important;
}

/* ================= OFFICIAL CONTRACT GRID LAYOUT MECHANICS ================= */

/* 1. Base Framework Container Wrapper */
.content-container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 24px !important;
  box-sizing: border-box !important;
}

/* 2. Overhaul Parent Grid Layout to exact 3-Column matrix on desktop */
.contract-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important; /* Forces clean 3 columns */
  gap: 20px !important; /* Prevents card borders from smashing together */
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 3. The Isolated Responsive Card Component */
.contract-card {
  background-color: #1e293b !important; /* Dark premium slate card fill */
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  justify-content: flex-start !important;
  min-height: 180px !important;
  height: auto !important; /* Critical: Lets card body scale dynamically to avoid text-clipping */
  box-sizing: border-box !important;
}

/* 4. Score Adjustments Display Headers */
.contract-pts {
  font-size: 2rem !important;
  font-weight: 800 !important;
  margin-bottom: 8px !important;
  font-family: monospace, sans-serif !important;
}

/* Highly saturated, readable text contrast metrics */
.contract-pts.pts-positive { color: #10b981 !important; } /* Emerald Green */
.contract-pts.pts-neutral { color: #3b82f6 !important; }  /* Royal Blue */
.contract-pts.pts-negative { color: #ef4444 !important; } /* Crimson Red */

/* 5. Core Content Label Typography */
.contract-label {
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  margin: 4px 0 12px 0 !important;
  line-height: 1.3 !important;
}

/* 6. Context Paragraph Content */
.contract-subtext {
  color: #94a3b8 !important; /* Slate gray styling for clean visibility */
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

/* ================= AIRTIGHT LAYOUT CONSTRAINTS FOR RESPONSIVENESS ================= */

/* Tablet Optimization Layout (Gracefully morphs from 3 columns into 2 columns) */
@media (max-width: 1024px) {
  .contract-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .contract-card{
    margin-right: 15px !important;
  }
}

/* Mobile Screen Layout Optimization (Flattens completely into a solid 1-column stack) */
@media (max-width: 640px) {
  #sec-randomizer{
    padding-right: 5px !important;
  }
  
  body{
    margin-right: 5px !important;
  }

  .contract-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .contract-card {
    padding: 16px !important;
    min-height: auto !important; /* Allows layout to compress and stretch naturally */
  }
}

