
/* Keep the Glances CPU model below the card title and description. */
.service-card > .service-container.chart:has(> .-top-6) {
  height: 104px;
  min-height: 104px;
}
.service-card > .service-container.chart > .-top-6 {
  top: 8px;
  left: 8px;
  right: 8px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* RAM capacity is shown separately; hide the duplicate memory percentage. */
.service-card > .service-container.chart:has(> .-top-6)
  > .bottom-3.right-2 > .flex:nth-child(2) {
  display: none;
}

/* Clear green/blue history traces on the dark dashboard. */
.service-container.chart {
  --color-500: 74 222 128;
  --color-700: 96 165 250;
  --color-800: 59 130 246;
}
.service-container.chart .recharts-area-curve {
  stroke-width: 1.5px;
}
/* The CPU model is already known; keep its history value unobstructed. */
.service-card:has(.service-icon [style*="chip.svg"])
  > .service-container.chart > .bottom-3.left-3 {
  display: none;
}

.utilization-history {
  margin: 4px 6px 0;
  height: 105px;
}
.utilization-history svg { width: 100%; height: 105px; display: block; }
.utilization-history text { fill: #aab6c7; font-size: 10px; }
.utilization-history .history-grid { stroke: #94a3b8; opacity: .18; stroke-width: 1; }
.utilization-history .history-line { stroke: #4ade80; stroke-width: 2; fill: none; }
.utilization-history .history-fill { fill: #4ade80; opacity: .12; }

/* Match the GPU legend to its four history traces. */
.gpu-history-card .service-block:nth-child(1) .service-block-label { color: #4ade80; }
.gpu-history-card .service-block:nth-child(2) .service-block-label { color: #fb923c; }
.gpu-history-card .service-block:nth-child(3) .service-block-label { color: #60a5fa; }
.gpu-history-card .service-block:nth-child(4) .service-block-label { color: #c084fc; }

/* Color the live read/received and write/sent labels to match their traces. */
.throughput-history-card > .service-container:first-of-type .service-block:nth-child(1) .service-block-label { color: #4ade80; }
.throughput-history-card > .service-container:first-of-type .service-block:nth-child(2) .service-block-label { color: #60a5fa; }
.throughput-history-card .service-container:has(+ .service-container) .service-block:nth-child(1) .service-block-label { color: #4ade80; }
.throughput-history-card .service-container:has(+ .service-container) .service-block:nth-child(2) .service-block-label { color: #60a5fa; }

/* Intel badge: white logo on the familiar blue square. */
.service-icon:has([style*="intel.svg"]) {
  width: 34px;
  height: 34px;
  margin: 6px 7px;
  border-radius: 5px;
  background: #0071c5;
}
.service-icon:has([style*="intel.svg"]) > div {
  width: 25px !important;
  height: 25px !important;
  background: #ffffff !important;
}

/* Custom RAM DIMM: four chips, edge connector, and keyed contact gap. */
.service-icon > div[style*="expansion-card.svg"] {
  -webkit-mask-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2040%22%3E%3Cpath%20fill%3D%22white%22%20fill-rule%3D%22evenodd%22%20d%3D%22M4%207h56v24H4v-7H1v-8h3V7Zm5%205v12h9V12H9Zm12%200v12h9V12h-9Zm12%200v12h9V12h-9Zm12%200v12h9V12h-9Z%22%2F%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M7%2032h4v5H7zm6%200h4v5h-4zm6%200h4v5h-4zm6%200h4v5h-4zm10%200h4v5h-4zm6%200h4v5h-4zm6%200h4v5h-4zm6%200h4v5h-4z%22%2F%3E%3C%2Fsvg%3E') !important;
  mask-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2040%22%3E%3Cpath%20fill%3D%22white%22%20fill-rule%3D%22evenodd%22%20d%3D%22M4%207h56v24H4v-7H1v-8h3V7Zm5%205v12h9V12H9Zm12%200v12h9V12h-9Zm12%200v12h9V12h-9Zm12%200v12h9V12h-9Z%22%2F%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M7%2032h4v5H7zm6%200h4v5h-4zm6%200h4v5h-4zm6%200h4v5h-4zm10%200h4v5h-4zm6%200h4v5h-4zm6%200h4v5h-4zm6%200h4v5h-4z%22%2F%3E%3C%2Fsvg%3E') !important;
}
/* Match the first stats row to the read/received and write/sent traces. */
.throughput-history-card > .throughput-history + .service-container
  .service-block:nth-child(1) .service-block-label { color: #4ade80; }
.throughput-history-card > .throughput-history + .service-container
  .service-block:nth-child(2) .service-block-label { color: #60a5fa; }

/* Four CPU cores in a compact two-by-two grid. */
.cpu-core-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:4px 8px 8px;}
.cpu-core-panel{min-width:0;}
.cpu-core-label{font-size:11px;color:#aab6c7;text-align:center;}
.cpu-core-panel svg{display:block;width:100%;height:auto;}
.cpu-core-panel text{fill:#aab6c7;font-size:9px;}
.cpu-core-panel .history-grid{stroke:#94a3b8;opacity:.18;stroke-width:1;}
.cpu-core-panel .history-line{stroke:#4ade80;stroke-width:2;fill:none;}
.cpu-core-panel .history-fill{fill:#4ade80;opacity:.12;}
.cpu-core-card > .service-container{display:none;}

.cpu-overall{text-align:center;margin:4px 8px 8px;padding:8px;background:rgb(15 23 42 / .15);border-radius:4px;}
.cpu-overall-value{font-size:14px;color:#cbd5e1;}
.cpu-overall-label{font-size:11px;color:#cbd5e1;}

/* Overall CPU usage and package temperature side by side. */
.cpu-overall{display:flex;justify-content:space-evenly;align-items:center;gap:16px;}
.cpu-overall-stat{min-width:0;}
.cpu-temperature-value{color:#fb923c;}
