/* TLS checker (/tls), also used by /headers, /dns and /ai. Loaded after style.css and uses its colours. */

/* Same colours as the Open Graph checker: good is our teal, to improve and
   problem are orange and red of the same strength */
:root {
  --ok: #008484;
  --warn: #996731;
  --bad: #a35c57;
  --card-radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ok: #2bb3b3;
    --warn: #cd8f4f;
    --bad: #da827b;
  }
}

.tls-hero { padding: 64px 0 48px; }
.tls-hero .lead { margin-bottom: 24px; }

/* Host form */
.tls-form { max-width: 720px; }
.tls-label { display: block; font-weight: 600; margin-bottom: 6px; }
.tls-row { display: flex; gap: 10px; }
.tls-row input { flex: 1; min-width: 0; }
.tls-row .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.tls-form input {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.tls-error { color: var(--bad); font-weight: 600; margin: 16px 0 0; }
.tls-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--muted); font-size: 15px; }
.tls-chip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 14px; text-decoration: none; background: var(--bg); }
.tls-chip:hover { border-color: var(--accent); }
.tls-includes-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 40px 0 12px; }
.tls-includes { margin: 0 0 12px; }
.tls-free { color: var(--muted); font-size: 15px; margin: 0; }

/* Results */
.tls-results { padding-top: 40px; }
.tls-fetched-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 32px; }
.tls-fetched { color: var(--muted); font-size: 15px; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.tls-again {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--bg); color: var(--accent); border: 1px solid var(--accent); border-radius: 8px; padding: 6px 14px;
}

.tls-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-bottom: 40px; }
.tls-grade {
  flex: none; width: 112px; height: 112px; border-radius: var(--card-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 700; color: var(--bg); background: var(--ok);
}
.tls-g-A { background: var(--ok); }
.tls-g-B, .tls-g-C { background: var(--warn); }
.tls-g-D, .tls-g-F { background: var(--bad); }
.tls-score { margin: 0 0 8px; font-size: 20px; }
.tls-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tls-pill { border: 1px solid currentColor; border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 600; }
.tls-pill.tls-ok { color: var(--ok); }
.tls-pill.tls-warn { color: var(--warn); }
.tls-pill.tls-bad { color: var(--bad); }
.tls-pill.tls-note { color: var(--muted); }
.tls-cap { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.tls-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .tls-layout { grid-template-columns: minmax(0, 1fr); } }
.tls-layout h2 { font-size: 22px; }
.tls-section { font-size: 22px; margin-top: 48px; }
.tls-hint { color: var(--muted); font-size: 15px; }

.tls-checks { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.tls-checks li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); line-height: 1.45; overflow-wrap: anywhere; }
.tls-checks li > div { min-width: 0; }
.tls-fix { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.tls-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; }
.tls-checks .tls-ok .tls-dot { background: var(--ok); }
.tls-checks .tls-warn .tls-dot { background: var(--warn); }
.tls-checks .tls-bad .tls-dot { background: var(--bad); }
.tls-checks .tls-note .tls-dot { background: var(--muted); }
.tls-checks .tls-info .tls-dot { background: transparent; border: 2px solid var(--muted); }
.tls-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tables */
.tls-table-wrap { overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--card-radius); margin-bottom: 12px; }
.tls-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tls-table th, .tls-table td { text-align: left; vertical-align: top; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.tls-table tr:last-child th, .tls-table tr:last-child td { border-bottom: 0; }
.tls-table thead th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.tls-kv th { width: 160px; color: var(--muted); font-weight: 600; }
.tls-kv td { overflow-wrap: anywhere; }
.tls-table td.tls-ok { color: var(--ok); font-weight: 600; }
.tls-table td.tls-warn { color: var(--warn); font-weight: 600; }
.tls-table td.tls-bad { color: var(--bad); font-weight: 600; }
.tls-table td.tls-note { color: var(--muted); }
.tls-nowrap { white-space: nowrap; }
.tls-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.tls-chain { padding-left: 22px; margin: 0; }
.tls-chain li { margin-bottom: 6px; overflow-wrap: anywhere; }
.tls-chain span { color: var(--muted); font-size: 15px; }
.tls-untested { color: var(--muted); font-size: 15px; padding-left: 22px; margin: 0; }

/* Questions */
.tls-faq-list { max-width: 760px; }
.tls-faq details { border-bottom: 1px solid var(--line); }
.tls-faq details:first-child { border-top: 1px solid var(--line); }
.tls-faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.tls-faq details p { color: var(--muted); margin: 0 0 16px; }
.tls-faq:not(.features) + .contact { border-top: 1px solid var(--line); }

/* Also used by /headers, /dns and /ai */
.tls-sub { color: var(--muted); font-size: 14px; }
.tls-wrapany { overflow-wrap: anywhere; word-break: break-all; }
.tls-pills-top { margin: 0 0 24px; }
.tls-checks-wide { max-width: 860px; }
.tls-table td.tls-ok, .tls-table td.tls-warn, .tls-table td.tls-bad { font-weight: 600; }

.dns-bimi-logo { display: block; margin-top: 8px; width: 96px; height: 96px; object-fit: contain; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 6px; }
