/* Testing strategy optimization solution summary: same container treatment
   as .diet-solution-summary (pages/diet.css), plus one categorical identity that Furo
   has no variable for: one color per testing environment, used on the
   "Env #N" badges. OS row labels use the theme's own default text color
   (distinguished by icon instead of a second color axis), so environment
   identity is the only new color needed on this page. Base hues follow the
   same blue/orange/violet/aqua split already validated together for
   Facility's plant colors (four different hue families so no two are ever
   confusable), with blue/orange/aqua pushed to more saturated, higher-
   contrast steps than Facility's originals for stronger at-a-glance
   legibility on small badge text; violet is unchanged. */
[role="main"] .testing-strategy-optimization-solution-summary {
    padding: 1.2em 1.3em;
    border-radius: 0.6em;
    background: #eef1f5;
    border: 1px solid var(--color-sidebar-background-border);
    --tso-env-1: #1971c2;
    --tso-env-2: #e8590c;
    --tso-env-3: #4a3aa7;
    --tso-env-4: #2f9e44;
}

body[data-theme="dark"] [role="main"] .testing-strategy-optimization-solution-summary {
    background: #15171a;
    --tso-env-1: #4dabf7;
    --tso-env-2: #ffa94d;
    --tso-env-3: #9085e9;
    --tso-env-4: #69db7c;
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) [role="main"] .testing-strategy-optimization-solution-summary {
        background: #15171a;
        --tso-env-1: #4dabf7;
        --tso-env-2: #ffa94d;
        --tso-env-3: #9085e9;
        --tso-env-4: #69db7c;
    }
}

/* Testing strategy grid table: borderless by design (per-cell values are
   distinguished by color and spacing, not gridlines). The compatibility
   grid (.tso-grid--grouped) additionally gets a light background band under
   its "Machine #" group header, to visually tie the individual
   machine-number sub-columns together. The band excludes the leading corner
   cell (:not(:first-child)) so it reads as belonging only to the
   machine-number columns, not bleeding into the OS column beside it. The
   plain results table below it has a single flat header row and is left
   with the default th styling (bold, black) instead. */
[role="main"] .testing-strategy-optimization-solution-summary .tso-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

[role="main"] .testing-strategy-optimization-solution-summary .tso-grid th,
[role="main"] .testing-strategy-optimization-solution-summary .tso-grid td {
    border: none;
    padding: 7px 10px;
    text-align: center;
}

[role="main"] .testing-strategy-optimization-solution-summary .tso-grid--grouped thead tr:first-child th:not(:first-child) {
    background: var(--color-background-secondary);
    font-weight: 600;
    border-radius: 0.4em 0.4em 0 0;
}

[role="main"] .testing-strategy-optimization-solution-summary .tso-grid--grouped thead tr:last-child th {
    font-weight: 500;
    color: var(--color-foreground-secondary);
    font-size: 12px;
}

[role="main"] .testing-strategy-optimization-solution-summary .tso-grid tbody tr:nth-child(odd) {
    background: var(--color-background-secondary);
}

/* Environment identity as a solid badge (colored background + white text)
   rather than colored text on the page background — a filled chip reads as
   a much stronger, more legible color signal at this font size than tinted
   text does, especially for the lighter steps in the quartet. */
[role="main"] .testing-strategy-optimization-solution-summary .tso-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    color: #fff;
    line-height: 1.6;
}

[role="main"] .testing-strategy-optimization-solution-summary .tso-badge.tso-env-1 { background: var(--tso-env-1); }

[role="main"] .testing-strategy-optimization-solution-summary .tso-badge.tso-env-2 { background: var(--tso-env-2); }

[role="main"] .testing-strategy-optimization-solution-summary .tso-badge.tso-env-3 { background: var(--tso-env-3); }

[role="main"] .testing-strategy-optimization-solution-summary .tso-badge.tso-env-4 { background: var(--tso-env-4); }

[role="main"] .testing-strategy-optimization-solution-summary .tso-grid td.tso-os-label {
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

/* Real brand marks (Simple Icons) instead of lookalike emoji, colored via
   currentColor so they track the OS-label text in both light and dark mode.
   Sized in em so they scale with the label's own larger font-size rather
   than staying pinned to the table's base 13px. */
[role="main"] .testing-strategy-optimization-solution-summary .tso-os-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.1em;
    margin-right: 5px;
    fill: currentColor;
}
