:root{--ink:#111827;--muted:#6b7280;--line:#e5e7eb}
  body{font-family:system-ui,Segoe UI,Roboto,Arial;margin:24px;color:var(--ink)}
  h2{margin:0 0 6px}
  .sub{color:var(--muted);font-size:13px;margin-bottom:12px}
  .chart-box{width:100%;height:400px;position:relative}
  .sw{width:12px;height:12px;border-radius:3px;display:inline-block}
.chart-wrap {
  display: flex;
  flex-direction: row;   /* chart left + legend right */
  align-items: center;   /* vertically aligned */
  justify-content: center;
  gap: 32px;             /* spacing between chart and legend */
}

.chart-box {
  flex: 0 0 300px;       /* fixed width for the chart */
  height: 300px;
}

.chart-box canvas {
  width: 100%;
  height: 100%;
}

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;   /* vertical list */
  gap: 12px;                /* spacing between items */
  font-size: 14px;
  color: #374151;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.legend .sw {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}



  @media (max-width:900px){
    .wrap{grid-template-columns:1fr}.chart-box{height:400px}}
/* left side */
@media (max-width:768px) {
  #explore-button{
    text-align: right;
  }

  .chart-wrap{
      flex-direction: column!important;
  }
  #projects-by-sector {
    flex-direction: column!important;
    gap:40px;
  }

  #grid-items{
    flex-direction: column!important;
  }

  .full-flex{
    padding:40px!important;
    gap:40px!important;
  }

  .project-by-sector-left,
  .project-by-sector-right {
    width: 100%!important;   /* make both take full width */
  }
}

.row dt {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: #666;
  font-weight: bold;
}

.row dd {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  margin: 0;
  color: #666;
}

#asof {
  text-align: right;
  font-size: 12px;
  font-style: italic;
  color: #666;
  padding: 10px 10px 0 0;
}

/* right item styling */

.right .item {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  border-top:1px solid var(--border);
  padding-left: 0;
}

.card > h3 {
  font-size: 20px;
  padding: 0 0 18px 0;
}

.item h3 {
  font-family: Inter;
  font-size: 20px;
  color: #666;
}

.item-flex {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-flex,
.right .card p {
  flex: 1 1 50%;
  min-height: 80px;
}

.item p {
  color: #666;
}

.right .more {
  text-decoration: none;
}

/* operation status table */

#pspid {
  font-weight: bold;
}

.operation-table {
  display: grid;
  grid-template-columns: 50% 50%;
  gap: 14px;
}

.operation-table .table-heads {
  font-weight: bold;
  font-size: 14px;
}

/* ===================== */
/* EXPLORE MORE */
/* ===================== */
.explore-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.explore-flex h3 { font-size: 25px; }

#explore-button {
  color: #004392;
  font-size: 16px;
  font-weight: bold;
  padding: 0 0 8px 40px;
  text-decoration: none;
  border-bottom: 16px solid #004392;
  width: fit-content;
  align-self: end;
}

.full-flex {
  padding: 65px;
  display: flex;
  flex-direction: column;
  gap: 65px;
}

/* projects-by-sector */
#projects-by-sector{
  display: flex;
  flex-direction: row;
  align-items: center;
}

.card .num{
  font-size:12px;
}

.project-by-sector-left{
  width: 50%;
}

.project-by-sector-right{
  width: 50%;
}

/* .wrap{
max-width: 1100px;
} */


/* table */

/* ---- Card container ---- */
.card{
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-top: 20px;
}

.card .muted {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

/* ---- Table ---- */
.card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 12px;
}

/* Table header */
.card thead {
  background: #f9fafb;
}

.card thead th {
  text-align: left;
  font-weight: 600;
  color: #374151;
  padding: 12px 14px;
  border-bottom: 2px solid #e5e7eb;
  position: sticky;   /* sticky header */
  top: 0;
  z-index: 1;
}

.card thead th.num {
  text-align: left;
}

/* Table body */
.card tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  vertical-align: middle;
}

.card tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums; /* align numbers cleanly */
}

.card tbody tr:nth-child(even){
  background: #fdfdfd; /* subtle zebra */
}

.project-by-sector-right{
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.card tbody tr:hover {
  background: #f3f4f6;  /* hover highlight */
}

/* Emphasize first column */
.card tbody td:first-child {
  font-weight: 500;
  color: #111827;
}

/* Table footer */
.card tfoot td {
  padding: 12px 14px;
  font-weight: 700;
  border-top: 2px solid #e5e7eb;
  background: #f9fafb;
}

/* footnote */

#country-footnote {
  font-size: 15px;
  font-style: italic;
}