/* ── TLS Configuration Checker (/tools/tls-config/) ── */
/* Builds on certificate-authority.css (cards, pills, tables, chain card).
   Grade colours pair with the letter and the score, so colour is never the
   only signal. */
.tlc-summary { --tlc-g: var(--txt-4); --tlc-g-ink: var(--txt-3);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tlc-g) 9%, transparent), transparent 55%),
    var(--surface);
}
.grade-a { --tlc-g: var(--green); --tlc-g-ink: var(--cax-pass-ink); }
.grade-b { --tlc-g: #0d9488; --tlc-g-ink: color-mix(in srgb, #0d9488 75%, var(--txt)); }
.grade-c { --tlc-g: var(--amber); --tlc-g-ink: var(--cax-warn-ink); }
.grade-d { --tlc-g: var(--sev-high); --tlc-g-ink: color-mix(in srgb, var(--sev-high) 70%, var(--txt)); }
.grade-f { --tlc-g: var(--red); --tlc-g-ink: var(--cax-fail-ink); }
.grade-none { --tlc-g: var(--txt-4); --tlc-g-ink: var(--txt-3); }

.tlc-summary-row { display: flex; gap: 24px; align-items: center; }
.tlc-summary-body { min-width: 0; }
.tlc-host { margin: 0 0 6px; font-family: var(--font-data); font-size: var(--text-h3); font-weight: 600; overflow-wrap: anywhere; }
.tlc-summary-text { margin: 12px 0 0; color: var(--txt-2); line-height: 1.6; }
.tlc-summary-text strong { color: var(--txt); }
.tlc-grade { position: relative; width: 128px; height: 128px; flex: none; }
.tlc-grade svg { display: block; }
.tlc-grade-track { fill: none; stroke: var(--surface2); stroke-width: 10; }
.tlc-grade-arc { fill: none; stroke: var(--tlc-g); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.tlc-grade-letter {
  position: absolute; inset: 0 0 18px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.03em; color: var(--tlc-g-ink);
}
.tlc-grade-score { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; font-family: var(--font-data); font-size: var(--text-caption); font-weight: 600; color: var(--txt-3); }
.tlc-issue-chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tlc-issue-chips li { padding: 4px 10px; border-radius: 999px; font-size: var(--text-caption); font-weight: 600; background: var(--cax-none-bg); color: var(--txt-2); }
.tlc-issue-chips li.is-fail { background: var(--cax-fail-bg); color: var(--cax-fail-ink); }
.tlc-issue-chips li.is-warn { background: var(--cax-warn-bg); color: var(--cax-warn-ink); }

.tlc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tlc-steps li { display: flex; align-items: center; gap: 10px; font-size: var(--text-small); color: var(--txt-3); }
.tlc-steps li.is-done { color: var(--txt-2); }
.tlc-steps li.is-done .cax-icon { color: var(--cax-pass-ink); }
.tlc-steps li.is-busy { color: var(--txt); font-weight: 600; }

.tlc-protocols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tlc-protocols li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); }
.tlc-protocols li.is-fail { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); background: var(--cax-fail-bg); }
.tlc-protocols li.is-warn { border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); }
.tlc-proto-name { font-family: var(--font-data); font-weight: 600; }

.tlc-suite-block + .tlc-suite-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.tlc-suite-block > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; margin-bottom: 8px; }
.tlc-suite-block > summary::-webkit-details-marker { display: none; }
.tlc-suite-block > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--txt-3); border-bottom: 2px solid var(--txt-3); transform: rotate(-45deg); transition: transform var(--t-fast); flex: none; }
.tlc-suite-block[open] > summary::before { transform: rotate(45deg); }
.tlc-suite-block > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.tlc-suite-block h3 { margin: 0; font-size: var(--text-card-title); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tlc-count { font-size: var(--text-caption); font-weight: 600; color: var(--txt-3); }
.tlc-note { margin: 0 0 10px; color: var(--txt-3); font-size: var(--text-small); line-height: 1.55; }
.tlc-note.tlc-incomplete { color: var(--txt-2); font-weight: 500; }
.tlc-suites code { font-family: var(--font-mono); font-size: var(--text-caption); overflow-wrap: anywhere; word-break: break-all; }
.tlc-hex { display: block; margin-top: 2px; font-family: var(--font-data); font-size: var(--text-caption); color: var(--txt-3); }
.tlc-num { font-family: var(--font-data); font-variant-numeric: tabular-nums; color: var(--txt-3); }
.tlc-suites tr.is-fail td:first-child { box-shadow: inset 3px 0 0 var(--cax-fail); }
.tlc-suites tr.is-warn td:first-child { box-shadow: inset 3px 0 0 var(--cax-warn); }

.tlc-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tlc-groups li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); font-family: var(--font-data); font-size: var(--text-compact); }
.tlc-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 16px 0 0; }
.tlc-facts:empty { display: none; }
.tlc-facts dt { font-size: var(--text-caption); color: var(--txt-3); }
.tlc-facts dd { margin: 2px 0 0; font-family: var(--font-data); font-weight: 600; }
.tlc-facts .is-warn dd { color: var(--cax-warn-ink); }

.tlc-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tlc-features li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tlc-features li:last-child { border-bottom: 0; }
.tlc-features strong { display: block; font-size: var(--text-small); }
.tlc-features span:not(.cax-pill) { display: block; margin-top: 2px; font-size: var(--text-caption); color: var(--txt-3); }

.tlc-section-title { margin: 0 0 12px; font-size: var(--text-h3); }
.tlc-points { margin-left: 8px; font-style: normal; font-family: var(--font-data); font-size: var(--text-caption); font-weight: 600; color: var(--txt-3); }
.tlc-findings .tlc-detail { font-size: var(--text-caption); color: var(--txt-3); overflow-wrap: anywhere; }
.tlc-learn { display: inline-block; margin-top: 6px; font-size: var(--text-compact); font-weight: 600; }

@media (max-width: 720px) {
  .tlc-summary-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .tlc-protocols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tlc-suites th:nth-child(3), .tlc-suites td:nth-child(3), .tlc-suites th:nth-child(4), .tlc-suites td:nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tlc-grade-arc { transition: none; }
}
