/* =========================================================
   QUICK OPTIONS (edit these only)
   ========================================================= */
.sd-dashboard{
  --sd-font-family: overpass;
  --sd-text-color: #000;

  --sd-border: #d9d9d9;

  --sd-title-size: 15px;
  --sd-sub-size: 12px;
  --sd-year-size: 12px;

  --sd-number-size: 14px;
  --sd-prefix-size: 12px;

  --sd-padding-y: 5px;
  --sd-padding-x: 5px;

  --sd-icon-size: 24px;

  /* Row accent colors */
  --sd-row1: #11355b;
  --sd-row2: #f26124;
  --sd-row3: #f7943d;
  --sd-row4: #00a0d7;
  --sd-row5: #006c9c;
}


/* =========================================================
   GRID WRAPPER
   ========================================================= */
.sd-dashboard{
  font-family: var(--sd-font-family);
  background: var(--sd-bg);
  border: 1px solid var(--sd-border);
  border-radius: 8px;
  overflow: hidden;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width:1024px){
  .sd-dashboard{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width:767px){
  .sd-dashboard{ grid-template-columns: 1fr; }
}

/* =========================================================
   ITEMS + GRID LINES
   ========================================================= */

/* Item is a 2-col grid so left/right never overlap */
.sd-item{
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items:center;
  column-gap: 14px;

  padding: var(--sd-padding-y) var(--sd-padding-x);

  color: var(--sd-text-color);
  border-right: 1px solid var(--sd-border);
  border-bottom: 1px solid var(--sd-border);

  --accent: var(--sd-row1);
}

/* Right border removal per breakpoint */
.sd-item:nth-child(3n){ border-right: none; }
.sd-item:nth-last-child(-n+3){ border-bottom: none; }

@media (max-width:1024px){
  .sd-item{ border-right: 1px solid var(--sd-border); }
  .sd-item:nth-child(2n){ border-right: none; }
  .sd-item:last-child{ border-bottom:none; border-right:none; }
}

@media (max-width:767px){
  .sd-item{ border-right:none; }
  .sd-item:last-child{ border-bottom:none; }
}

/* =========================================================
   ROW ACCENT COLORS (SEQUENCE YOU SHARED = row-major)
   Row 1: items 1-3
   Row 2: items 4-6
   Row 3: items 7-9
   Row 4: items 10-12
   Row 5: items 13-15
   ========================================================= */
.sd-item:nth-child(-n+3){ --accent: var(--sd-row1); }
.sd-item:nth-child(n+4):nth-child(-n+6){ --accent: var(--sd-row2); }
.sd-item:nth-child(n+7):nth-child(-n+9){ --accent: var(--sd-row3); }
.sd-item:nth-child(n+10):nth-child(-n+12){ --accent: var(--sd-row4); }
.sd-item:nth-child(n+13):nth-child(-n+15){ --accent: var(--sd-row5); }

/* =========================================================
   LEFT SIDE
   ========================================================= */
.sd-left{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}

.sd-icon svg{
  width: var(--sd-icon-size);
  height: var(--sd-icon-size);
  display:block;
}

/* Icon uses accent color */
.sd-icon, .sd-icon svg{ color: var(--accent); }
.sd-icon svg path,
.sd-icon svg circle,
.sd-icon svg rect,
.sd-icon svg polygon,
.sd-icon svg ellipse,
.sd-icon svg line,
.sd-icon svg polyline{
  fill: currentColor;
  stroke: currentColor;
}

.sd-text{ min-width:0; }

.sd-label{
  display:flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.15;
}

.sd-title{
  font-weight:600;
  font-size: var(--sd-title-size);
  color: var(--accent);
}

/* Subscript text (rate/density/coverage) */
.sd-sub{
  font-size: var(--sd-sub-size);
  color: var(--sd-text-color);
  opacity: .9;
  vertical-align: sub;
  font-weight: 400;
  font-style: italic;
}

/* Year inline */
.sd-year-inline{
  font-size: var(--sd-year-size);
  color: var(--sd-text-color);
  opacity: .75;
  font-weight: 400;
}

/* =========================================================
   RIGHT SIDE
   ========================================================= */
.sd-right{
  text-align:right;
  min-width: 170px;
  max-width: 260px;
}

@media (max-width:767px){
  .sd-right{ min-width:0; max-width:none; }
}

.sd-value{
  display:flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
}

.sd-prefix{
  font-weight:400;
  font-size: var(--sd-prefix-size);
  letter-spacing: .02em;
  color: var(--sd-text-color);
}

.sd-number{
  font-weight:400;
  font-size: var(--sd-number-size);
  color: var(--sd-text-color);
}

/* A/B-like blocks (but you are using k=part-time etc.) */
.sd-ab-grid{
  display:grid;
  grid-template-columns: auto auto;
  column-gap: 18px;
  justify-content:end;
  align-items:start;
}

.sd-ab-top{
  display:flex;
  justify-content:flex-end;
  gap: 6px;
  white-space: nowrap;
}

.sd-ab-key{
  font-weight:400;
  font-size: 10px;
  color: var(--sd-text-color);
}

.sd-ab-val{
  font-weight:400;
  font-size: var(--sd-number-size);
  color: var(--sd-text-color);
}

.sd-ab-note{
  margin-top: 1px;
  font-size: 10px;
  font-weight: 400;
  color: var(--sd-text-color);
  opacity: .75;
  white-space: normal;
  line-height: 1.15;
}

.sd-ab-note-part{
  display:inline-block;
}

/* Mobile tuning */
@media (max-width:767px){
  .sd-item{
    column-gap: 10px;
    align-items:start;
  }

  .sd-icon svg{
    width: 32px;
    height: 32px;
  }

  .sd-title{ font-size: 15px; }
  .sd-number{ font-size: 19px; }

  .sd-ab-grid{
    column-gap: 12px;
  }

  .sd-ab-top{ gap: 4px; white-space: normal; }
  .sd-ab-val{ font-size: 16px; }
}
