/* ===========================================================================
   System status page, Oct 9 2026. Component-scoped (.ss-*), loaded after
   daily-driver.css, so nothing above moves. Dark is the default; body.light-theme
   re-values every colour (a colour that passes on one theme is not proof for the
   other). State is never colour alone: every chip and pill carries its word.
   =========================================================================== */
.ss-lede { max-width: 820px; margin: 0 0 14px; color: var(--text); font-size: 0.92rem; line-height: 1.5; }
.ss-note { margin: 10px 0 0; font-size: 0.78rem; line-height: 1.5; color: #8fa5bf; max-width: 860px; }

.ss-strip { padding: 11px 16px; border-radius: var(--radius-sm); font-size: 0.86rem; line-height: 1.5; margin: 0 0 12px; max-width: 920px; border: 1px solid; }
.ss-strip-ok { background: #0f1f2e; border-color: #2c4a66; color: #d6e4f2; }
.ss-strip-stale { background: #3a1d12; border-color: #fb923c; color: #ffe6d5; }
.ss-strip-unknown { background: #2a2140; border-color: #a78bfa; color: #ece6ff; }

.ss-controls { max-width: 920px; margin: 0 0 14px; font-size: 0.8rem; color: #8fa5bf; }
.ss-controls summary { cursor: pointer; padding: 4px 0; }
.ss-controls ul { margin: 6px 0 0; padding-left: 18px; }
.ss-controls li { margin: 3px 0; line-height: 1.45; }
.ss-ctl-pass b { color: #86efac; }
.ss-ctl-fail b { color: #fda4af; }

.ss-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ss-nav-item { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px 4px 6px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: 0.86rem; text-decoration: none; }
.ss-nav-item:hover { border-color: var(--accent); }

.ss-block { margin-top: 18px; padding: 16px 18px 12px; border-left: 4px solid var(--border); }
.ss-block-ok { border-left-color: #34d399; }
.ss-block-warn { border-left-color: #f2b83b; }
.ss-block-fail { border-left-color: #fb7185; }
.ss-block-unknown { border-left-color: #a78bfa; }
.ss-block-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
.ss-block-head h2 { margin: 0; font-size: 1.15rem; color: var(--text); }
.ss-purpose { margin: 3px 0 0; font-size: 0.82rem; color: #8fa5bf; max-width: 60ch; line-height: 1.45; }
.ss-block-status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ss-counts { font-size: 0.76rem; color: #8fa5bf; }

.ss-group { margin: 18px 0 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #8fa5bf; }
.ss-rows { list-style: none; margin: 0; padding: 0; }
.ss-row { display: grid; grid-template-columns: 7.6rem 13.5rem minmax(0, 1fr); gap: 4px 14px; padding: 9px 0; border-top: 1px solid rgba(143, 165, 191, 0.16); align-items: start; }
.ss-row:first-child { border-top: 0; }
.ss-label { font-size: 0.86rem; font-weight: 600; color: var(--text); line-height: 1.35; padding-top: 2px; }
.ss-value { font-size: 0.92rem; font-weight: 700; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; font-variant-numeric: tabular-nums lining-nums; }
.ss-detail { margin-top: 2px; font-size: 0.8rem; color: var(--text); line-height: 1.5; opacity: 1; overflow-wrap: anywhere; }
.ss-meta { margin-top: 3px; font-size: 0.72rem; color: #8fa5bf; line-height: 1.4; overflow-wrap: anywhere; }

.ss-chip, .ss-pill { display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; line-height: 1; padding: 5px 8px; border-radius: 4px; border: 1px solid; white-space: nowrap; }
.ss-pill { font-size: 0.72rem; padding: 5px 10px; border-radius: 999px; }
.ss-st-ok { background: #0f2a22; color: #86efac; border-color: #1f7a56; }
.ss-st-warn { background: #33270a; color: #fcd34d; border-color: #8a6a14; }
.ss-st-fail { background: #3b1220; color: #fda4af; border-color: #a3314f; }
.ss-st-unknown { background: #2a2140; color: #e0d7ff; border-color: #7a5abf; border-style: dashed; }
.ss-st-info { background: #162338; color: #b6c8e0; border-color: #3a5273; }

.ss-chart { margin: 8px 0 2px; max-width: 640px; }
.ss-bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; border-bottom: 1px solid rgba(143, 165, 191, 0.4); }
.ss-bar { flex: 1 1 0; min-width: 4px; background: #34d399; border-radius: 2px 2px 0 0; }
.ss-bar-partial { background: repeating-linear-gradient(135deg, #34d399 0 3px, transparent 3px 6px); outline: 1px solid #34d399; outline-offset: -1px; }
.ss-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; font-size: 0.7rem; color: #8fa5bf; }
.ss-numbers { margin-top: 4px; font-size: 0.76rem; color: #8fa5bf; }
.ss-numbers summary { cursor: pointer; }
.ss-numbers p { margin: 4px 0; line-height: 1.5; }

.ss-rules { margin-top: 14px; font-size: 0.76rem; color: #8fa5bf; }
.ss-rules summary { cursor: pointer; padding: 4px 0; }
.ss-rules ul { margin: 4px 0 0; padding-left: 18px; }
.ss-rules li { margin: 3px 0; line-height: 1.5; }

@media (max-width: 760px) {
  /* 44px tap targets (UMG design standard, section 4). */
  .ss-controls summary, .ss-rules summary, .ss-numbers summary { min-height: 44px; display: flex; align-items: center; }
  .ss-nav-item { min-height: 44px; }
  .ss-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .ss-state { margin-bottom: 2px; }
  .ss-block { padding: 14px 14px 10px; }
  .ss-block-status { align-items: flex-start; }
}

/* ---- light theme: every value re-set, then measured ---- */
body.light-theme .ss-note, body.light-theme .ss-purpose, body.light-theme .ss-counts,
body.light-theme .ss-group, body.light-theme .ss-meta, body.light-theme .ss-axis,
body.light-theme .ss-numbers, body.light-theme .ss-rules, body.light-theme .ss-controls { color: #4a5a6b; }
body.light-theme .ss-strip-ok { background: #e8f0f8; border-color: #8aa4bd; color: #17304a; }
body.light-theme .ss-strip-stale { background: #fff1e6; border-color: #c2570c; color: #6b2d05; }
body.light-theme .ss-strip-unknown { background: #f1ecff; border-color: #7a5abf; color: #3b2a78; }
body.light-theme .ss-st-ok { background: #dcfce7; color: #14532d; border-color: #2f855a; }
body.light-theme .ss-st-warn { background: #fef3c7; color: #6b3d03; border-color: #b7791f; }
body.light-theme .ss-st-fail { background: #ffe4e6; color: #8a1230; border-color: #c53050; }
body.light-theme .ss-st-unknown { background: #f1ecff; color: #3b2a78; border-color: #7a5abf; }
body.light-theme .ss-st-info { background: #e8eef7; color: #2c3e55; border-color: #7f93ad; }
body.light-theme .ss-ctl-pass b { color: #14532d; }
body.light-theme .ss-ctl-fail b { color: #8a1230; }
body.light-theme .ss-bar { background: #1f7a56; }
body.light-theme .ss-bar-partial { background: repeating-linear-gradient(135deg, #1f7a56 0 3px, transparent 3px 6px); outline-color: #1f7a56; }
body.light-theme .ss-row { border-top-color: rgba(60, 80, 100, 0.2); }
