/* Ribbon — semantic <dl> rendered as a 5-cell grid on desktop.
   The .ribbon__metric wrappers are <div>s grouping a <dt>/<dd>
   pair so the dl stays valid HTML5 while preserving the grid layout. */

.ribbon {
    display: grid;
    /* 5 cells at >= 960px, 3 at 640-959px, 2 below. Mode + Health get
       priority on smallest screens (the first two cells); spend
       wraps below. */
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: var(--sp-5);
    margin-top: 0;  /* override <dl> default top margin */
}
@media (min-width: 640px) { .ribbon { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .ribbon { grid-template-columns: repeat(5, 1fr); } }

.ribbon__metric {
    display: flex;
    flex-direction: column;
    gap: var(--sp-quarter);
    min-width: 0;
    margin: 0;
}
.ribbon__metric-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-dim);
    margin: 0;  /* override <dt> default */
}
.ribbon__metric-value {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;  /* override <dd> default 40px indent */
}
.ribbon__metric-value--bad { color: var(--color-danger); }
.ribbon__metric-sub {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.ribbon__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-text-dim);
}
.ribbon__dot--ok   { background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.ribbon__dot--warn { background: var(--color-warning); }
.ribbon__dot--bad  { background: var(--color-danger);  }
.ribbon__dot--idle { background: var(--color-text-dim); }
