
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 3rem;
      background: #f9f9f9;
      color: #333;
    }
    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2rem;
    }
    header img {
      max-height: 50px;
      align-content: center;
    }
    .card-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1rem;
    }
    .gold-star {
      position: absolute;
      top: 0.5rem;
      left: 0.5rem;
      font-size: 1.5rem;
      color: #BA5803;
    }
    .star-spacer {
      height: 1rem;
    }
    #sort_by{
      margin-right: 1em;
    }
    .card {
      position: relative;
      background: #fff;
      padding: 1rem;
      border-radius: 4px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    .card h2 {
      margin-top: 0;
      font-size: 1.2rem;
    }
    .card h2 a {
      color: #0066cc;
      text-decoration: none;
    }
    .card h2 a:hover {
      text-decoration: underline;
    }
    .change {
      margin-top: 0.5em;
      font-size: 0.95rem;
      color: #555;
    }
    /* Summary Section */
    .summary-container {
      /*display: flex;*/
      justify-content: center;
      margin: 2rem 0 1rem 0;
    }
    .trend-chart {
      background: #fff;
      padding: 1rem;
      border-radius: 4px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
      margin: 2rem 0;
    }
    .trend-chart canvas {
      display: block;
      width: 100%;
      aspect-ratio: 3 / 1; /* Optional: or 16 / 9 or 2 / 1 depending on look */
      max-height: 400px;
    }
     /* Leaderboard outline */
    .leaderboard {
      border: 1px solid gray;
      padding: 0.5rem 1rem;
      border-radius: 6px;
      background: #f8f8f8;
      margin-bottom: 2rem;
    }
    /* Statewide Progress Section */
    .statewide-progress {
      border: 1px solid gray;
      padding: 0.5rem 1rem;
      border-radius: 6px;
      background: #f8f8f8;
      margin-bottom: 2rem;
    }
    .statewide-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1rem;
      margin: 1.5rem 0;
    }
    /* Individual cards */
    .grid-card {
      background: #fff;           /* adjust to match your theme */
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 1rem;
      text-align: center;
    }
    .grid-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    }
    .grid-card p {
      font-size: 1.5rem;
      font-weight: bold;
      margin: 0;
    }
    .controls {
      display: flex;
      justify-content: space-between;
      margin-bottom: 1.5rem;
    }
    .controls select {
      padding: 0.5rem;
      font-size: 1rem;
    }
    .controls-wrapper {
      display: flex;
      flex-wrap:wrap;
      gap: 2rem;
      align-items: flex-end;
      margin-bottom: 1.5rem;
      align-items: center;
    }
    .filter-group {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .filter-group label {
      font-weight: bold;
      margin: 0; /* remove vertical spacing */
    }
    .horizontal-select {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .horizontal-select label {
      margin: 0; /* remove vertical spacing */
      font-weight: bold;
    }
    .filter-group label {
      font-weight: bold;
      margin-bottom: 0.25rem;
    }
    footer {
      margin-top: 2rem;
      text-align: center;
      font-size: 0.9rem;
    }
    footer a {
      color: #0066cc;
      text-decoration: none;
    }
    footer a:hover {
      text-decoration: underline;
    }
    .responsive-header {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 0.5rem 1rem;
    }
    .responsive-header img {
      max-width: 100%;
      height: auto;
    }
    .bg-green-dots,
    .bg-red-lines,
    .bg-yellow-lines {
      height: 100%;
      width: 100%;
      padding: 1.5rem;
      border-radius: 4px;
      box-sizing: border-box;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 1.2rem;
      font-weight: bold;
    }
    /* Horizontal lines on red hue for count > 100 */
    .bg-red-lines {
      background-color: #fff0f0;
      border-top: 20px solid #aa0000; /* solid red top bar */
    }
    /* Small dots on green hue for count < 100 */
    .bg-green-dots {
      background-color: #f0fff0;
      border-top: 20px solid #00aa00; /* solid green top bar */
      color: #000;
    }
    /* Vertical lines on yellow hue for count == 100 */
    .bg-yellow-lines {
      background-color: #fffce5;
      border-top: 20px solid #b38f00; /* solid yellow top bar */
      color: #000;
    }
    .responsive-title {
      flex: 1 1 100%;
      text-align: center;
      font-size: 2rem;
      margin: 0.5rem 0;
      word-break: break-word;
    }
      .agency-select-wrapper {
      width: 100%;
      max-width: 300px;
      margin: 1rem auto;
      text-align: center;
    }
    .agency-select-wrapper select {
      width: 100%;
      padding: 0.5rem;
      font-size: 1rem;
      border-radius: 4px;
      border: 1px solid #ddd;
    }
    .info-icon {
      font-size: 1.5rem;
      margin-right: 0.5rem;
      vertical-align: middle;
      color: #005a9c; /* strong blue for accessibility */
    }
    .summary-section {
      margin: 2rem 0;
      padding: 0 1rem;
    }
    .summary-flex {
      display: flex;
      gap: 2rem;
      justify-content: space-between;
      align-items: flex-start;
      flex-wrap: wrap;
    }
    .summary-box {
      background-color: #fff8b3; /* soft yellow */
      border: 1px solid #e0c100;
      padding: .1rem;
      border-radius: 8px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      font-size: 1.25rem;
      font-weight: 700;
      text-align: center;
      color: #333;
    }
    @media (max-width: 600px) {
      .controls {
        flex-direction: column;
        align-items: center;
      }
      .controls select {
        width: 100%;
        margin-bottom: 1rem;
      }
    }
    .visually-hidden,
    .visually-hidden-focusable:not(:focus, :focus-within) {
      border: 0 !important;
      clip-path: inset(50%) !important; /* 2 */
      height: 1px !important;
      margin: -1px !important;
      overflow: hidden !important;
      padding: 0 !important;
      width: 1px !important;
      white-space: nowrap !important; /* 3 */
    }
    /*
      Prevent visually hidden caption from breaking table's collapsing borders
      @author Louis-Maxime Piton
      @see https://github.com/twbs/bootstrap/pull/37533
    */
    .visually-hidden:not(caption),
    .visually-hidden-focusable:not(caption):not(:focus, :focus-within) {
      position: absolute !important;
    }
    /*
      Prevent overflowing children from being focusable.
      @author Django Janny
      @see https://github.com/twbs/bootstrap/pull/41286
    */
    .visually-hidden *,
    .visually-hidden-focusable:not(:focus, :focus-within) * {
      overflow: hidden !important;
    }

    /* Agency Dashboard Page Styles */
    .last-updated {
      color: #666;
      font-size: 0.95rem;
      margin-top: -0.5rem;
      margin-bottom: 1.5rem;
    }

    .agency-dashboard {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 1.5rem;
      margin: 2rem auto;
      width: 100%;
      max-width: 1400px;
    }

    @media (min-width: 1100px) {
      .agency-dashboard {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .dashboard-card-span-two {
        grid-column: span 2;
      }

      .severity-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }

    .dashboard-card {
      background: #fff;
      padding: 1.5rem;
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .dashboard-card h2 {
      margin: 0 0 1rem 0;
      font-size: 1.25rem;
      color: #333;
      border-bottom: 2px solid #0066cc;
      padding-bottom: 0.5rem;
    }

    .dashboard-card-wide {
      grid-column: 1 / -1;
    }

    @media (min-width: 900px) {
      .dashboard-card-fill-right {
        grid-column: 2 / -1;
      }
    }

    /* Score Progress */
    .score-progress {
      font-size: 3rem;
      font-weight: bold;
      margin: 0.5rem 0;
      text-align: center;
    }

    .score-progress.positive {
      color: #006600;
    }

    .score-progress.negative {
      color: #cc0000;
    }

    .score-progress.neutral {
      color: #666;
    }

    .progress-label {
      text-align: center;
      color: #666;
      font-size: 0.9rem;
      margin: 0;
    }
    
    /* Score Sections (Agency vs Statewide) */
    .score-section {
      padding-bottom: 1rem;
    }
    
    .score-section-secondary {
      border-top: 1px solid #ddd;
      padding-top: 1rem;
      margin-top: 0.5rem;
    }
    
    .score-section-title {
      font-size: 1rem;
      font-weight: 600;
      color: #444;
      margin: 0 0 0.5rem 0;
      text-align: center;
    }
    
    .score-section-secondary .score-progress {
      font-size: 2rem;
    }
    
    .score-section-secondary .agency-card-data .data-item-score dd {
      font-size: 2rem;
    }

    /* Chart container */
    .chart-container {
      height: 250px;
      margin-bottom: 1.5rem;
    }

    /* Table responsive wrapper */
    .table-responsive {
      overflow-x: auto;
    }

    .table-responsive table {
      min-width: 600px;
    }

    /* No data / pending notice */
    .no-data {
      color: #666;
      font-style: italic;
    }

    .pending-notice {
      margin-top: 1rem;
      padding: 0.75rem;
      background: #fff8dc;
      border: 1px solid #e0c100;
      border-radius: 4px;
      color: #665500;
      font-style: italic;
    }

    /* Severity List */
    .severity-list {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
      margin: 0;
      padding: 0;
    }

    .severity-item {
      display: flex;
      flex-direction: column;
      padding: 1rem;
      border-radius: 6px;
      text-align: center;
    }

    .severity-item dt {
      font-weight: bold;
      font-size: 0.9rem;
      margin-bottom: 0.25rem;
    }

    .severity-item dd {
      font-size: 2rem;
      font-weight: bold;
      margin: 0;
    }

    .severity-critical {
      background: #ffe5e5;
      border-left: 4px solid #cc0000;
    }

    .severity-serious {
      background: #fff0e5;
      border-left: 4px solid #e65c00;
    }

    .severity-moderate {
      background: #fffce5;
      border-left: 4px solid #b38f00;
    }

    .severity-minor {
      background: #e5f5e5;
      border-left: 4px solid #006600;
    }

    /* File list */
    .file-list {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .file-list li {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem 0;
      border-bottom: 1px solid #eee;
    }

    .file-list li:last-child {
      border-bottom: none;
    }

    .file-link {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      text-decoration: none;
      color: #0066cc;
    }

    .file-link:hover {
      text-decoration: underline;
    }

    .file-icon {
      font-size: 1.2rem;
    }

    .file-name {
      word-break: break-all;
    }

    .file-date {
      font-size: 0.85rem;
      color: #666;
      white-space: nowrap;
      margin-left: 1rem;
    }

    /* Issue list */
    .issue-list {
      margin: 0;
      padding-left: 1.5rem;
    }

    .issue-list li {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem 0;
      border-bottom: 1px solid #eee;
    }

    .issue-list li:last-child {
      border-bottom: none;
    }

    .issue-name {
      flex: 1;
    }

    .issue-count {
      font-weight: bold;
      color: #0066cc;
      margin-left: 1rem;
    }

    /* Page list */
    .page-list {
      margin: 0;
      padding-left: 1.5rem;
    }

    .page-list li {
      padding: 0.5rem 0;
      border-bottom: 1px solid #eee;
    }

    .page-list li:last-child {
      border-bottom: none;
    }

    .page-url {
      display: block;
      word-break: break-all;
      color: #0066cc;
    }

    .page-count {
      display: block;
      font-size: 0.85rem;
      color: #666;
      margin-top: 0.25rem;
    }

    /* Back link */
    .back-link {
      margin-top: 2rem;
    }

    .back-link a {
      color: #0066cc;
      text-decoration: none;
    }

    .back-link a:hover {
      text-decoration: underline;
    }

    @media (max-width: 600px) {
      .agency-dashboard {
        grid-template-columns: 1fr;
      }

      .severity-list {
        grid-template-columns: 1fr;
      }

      .score-progress {
        font-size: 2.5rem;
      }
    }