:root {
    /* VIMS brand palette */
     --vims-dark-blue: #003e6b;
     --vims-light-blue: #00a8e8;
     --vims-grey: #f0f2f5;
     --vims-text: #222;
     --vims-font-stack: "Open Sans", sans-serif;
}
/* Section wrapper */
 #solar-section {
     background: var(--vims-grey);
     padding: 1.5rem;
     border-radius: 8px;
     font-family: var(--vims-font-stack);
     color: var(--vims-text);
     max-width: 800px;
     margin: 2rem auto;
     box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
 #solar-section h3 {
     margin-bottom: 1rem;
     font-size: 1.5rem;
     color: var(--vims-dark-blue);
     border-bottom: 2px solid var(--vims-light-blue);
     padding-bottom: 0.25rem;
}
/* Summary paragraph */
 #solar-summary {
     font-size: 1rem;
     line-height: 1.5;
     margin-bottom: 1rem;
}
/* Cards grid - always use grid for layout, auto-size columns to fit content */
 #solar-widget {
     display: grid;
     grid-template-columns: repeat(5, auto);
     gap: 1rem;
     justify-content: center;
    /* center the row if not full width */
}
/* Base card style */
 #solar-widget .card {
     background: #fff;
     border-top: 4px solid var(--vims-light-blue);
     border-radius: 6px;
     padding: 1rem;
     text-align: center;
     transition: transform 0.2s, box-shadow 0.2s;
     min-width: 0;
     width: auto;
}
/* Hover lift (respects reduced‑motion) */
 @media (prefers-reduced-motion: no-preference) {
     #solar-widget .card:hover {
         transform: translateY(-4px);
         box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
}
 @media screen {
     .sr-only {
         position: absolute !important;
         width: 1px;
         height: 1px;
         margin: -1px;
         padding: 0;
         overflow: hidden;
         clip: rect(0 0 0 0);
         border: 0;
    }
}
#solar-widget .card h4 {
  margin: 0 0 0.4rem 0;  /* Changed this line */
  font-size: 1rem;
  color: var(--vims-dark-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Numeric value */
 #solar-widget .value {
     font-size: 2.25rem;
     margin: 0.5rem 0;
     color: var(--vims-light-blue);
     font-weight: bold;
     white-space: nowrap;
    /* keep numbers on one line */
}
 #solar-widget small {
     font-size: 0.875rem;
     color: var(--vims-text);
}
/* ===== Featured KPI cards ===== */
 #solar-widget .card.featured {
     background: #e6f4fb;
    /* subtle blue tint */
     border-top-color: var(--vims-dark-blue);
    /* darker accent bar */
     box-shadow: 0 0 0 2px rgba(0, 62, 107, 0.15);
}
 #solar-widget .card.featured .value {
     font-size: 2.5rem;
    /* slightly larger number */
     font-weight: 700;
}
 #solar-widget .card.featured small {
     font-size: 0.8rem;
    /* keep unit discreet */
}
/* Accessible table */
 #solar-table {
     width: 100%;
     border-collapse: collapse;
     margin-top: 1.5rem;
     font-size: 0.875rem;
}
 #solar-table caption {
     text-align: left;
     font-weight: bold;
     margin-bottom: 0.5rem;
}
 #solar-table th, #solar-table td {
     border: 1px solid #ccc;
     padding: 0.5rem;
}
 #solar-table th {
     background: #f5f5f5;
     text-align: left;
}
 #solar-table td {
     text-align: right;
}
/* Compact (sidebar) version of the solar widget */
 #solar-section.compact {
     width: fit-content;
    /* container fits exactly to its content */
     padding: 0.75rem 0.5rem;
    /* small but reasonable horizontal padding */
     margin: 0;
    /* left-justify the widget */
     font-size: 0.85rem;
    /* scale down overall text */
}
/* Tweak the heading */
 #solar-section.compact h3 {
     font-size: 1.1rem;
     text-align: center;
     margin-bottom: 0.5rem;
}
/* Hide the long summary to save space */
 #solar-section.compact #solar-summary {
     display: none;
}
/* Shrink the card grid gaps and cells */
 #solar-section.compact #solar-widget {
     grid-template-columns: repeat(5, auto);
     gap: 0.5rem;
     justify-content: center;
    /* keep cards centered */
}
/* Smaller cards */
 #solar-section.compact .card {
     padding: 0.5rem;
     border-radius: 4px;
     min-width: max-content;
    /* ensure card is at least as wide as its content */
}
 #solar-section.compact .card h4 {
     font-size: 0.55rem;
     text-align: center;
}
 #solar-section.compact .value {
     font-size: 1.5rem;
     margin: 0.25rem 0;
     white-space: nowrap;
    /* ensure values don't wrap in compact mode */
}
 #solar-section .solar-subheading {
     margin: 0.5rem 0 1rem;
     font-size: 0.85rem;
     color: var(--vims-dark-blue);
     text-align: center;
}

/* ===== Card Icons ===== */
#solar-widget .card-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 0.5rem;
  background-color: var(--vims-light-blue);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

#solar-widget .card.featured .card-icon {
  background-color: var(--vims-dark-blue);
}