/* ---- Extended-scan report UI (scoped under .sx-report) ------------------ */
.sx-report { font-family: var(--font-primary, "Poppins", sans-serif); color: var(--color-black, #212529); padding: 10px 0 60px; }
.sx-report .container { max-width: 980px; }

/* Summary banner */
.sx-summary { background: #fff; border: 1px solid #e7e9ee; border-radius: 16px; padding: 26px 28px;
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap; box-shadow: 0 6px 24px rgba(9,43,170,.06); }
.sx-gauge { --p: 0; position: relative; width: 132px; height: 132px; flex: 0 0 132px; border-radius: 50%;
  background: conic-gradient(var(--gc) calc(var(--p) * 1%), #eef0f3 0); display: grid; place-items: center; }
.sx-gauge::after { content: ""; position: absolute; inset: 12px; background: #fff; border-radius: 50%; }
.sx-gauge .sx-gauge-num { position: relative; z-index: 1; font-size: 34px; font-weight: 700; line-height: 1; text-align: center; }
.sx-gauge .sx-gauge-num small { font-size: 15px; font-weight: 600; }
.sx-gauge .sx-gauge-cap { position: relative; z-index: 1; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8a8f98; margin-top: 4px; text-align: center; }
.sx-summary-meta { flex: 1 1 320px; }
.sx-summary-meta h2 { font-size: 26px; margin: 0 0 4px; color: var(--color-black); }
.sx-summary-meta .sx-sub { color: #6b7280; font-size: 14px; word-break: break-all; }
.sx-counts { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.sx-count { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.sx-count.crit { background: #fdecec; color: #b30000; }
.sx-count.warn { background: #fff4e0; color: #8a5a00; }
.sx-count.ok   { background: #e7f6ec; color: #1c7a36; }
.sx-count.free { background: #eef2fd; color: #092baa; }

/* Category cards */
.sx-cards { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.sx-card { background: #fff; border: 1px solid #e7e9ee; border-radius: 14px; overflow: hidden; transition: box-shadow .25s ease, border-color .25s ease; }
.sx-card.open { box-shadow: 0 10px 30px rgba(9,43,170,.08); border-color: #d7dbe6; }
.sx-card-head { display: grid; grid-template-columns: 38px 1fr auto 30px; align-items: center; gap: 16px;
  padding: 16px 20px; cursor: pointer; user-select: none; background: none; border: 0; width: 100%; text-align: left; }
.sx-card-head:focus-visible { outline: 2px solid var(--color-primary, #092baa); outline-offset: -2px; }
.sx-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #f3f5fb; }
.sx-ic img { width: 17px; height: 17px; object-fit: contain; opacity: .85; }
.sx-card-title { font-weight: 600; font-size: 17px; color: var(--color-black); }
.sx-card-summary { font-size: 13px; color: #707682; margin-top: 2px; }
.sx-score-wrap { width: 200px; max-width: 38vw; }
.sx-score-num { font-size: 14px; font-weight: 700; text-align: right; margin-bottom: 5px; }
.sx-bar { height: 9px; border-radius: 999px; background: #eef0f3; overflow: hidden; }
.sx-bar > span { display: block; height: 100%; border-radius: 999px; width: 0; transition: width .9s cubic-bezier(.22,.61,.36,1); }
.sx-chev { justify-self: end; color: #aab0bb; transition: transform .3s ease; font-size: 13px; }
.sx-card.open .sx-chev { transform: rotate(180deg); }

/* Detail panel */
.sx-detail { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.sx-detail-inner { padding: 4px 20px 22px; border-top: 1px solid #eef0f3; }
.sx-kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed #eef0f3; font-size: 14px; }
.sx-kv:last-child { border-bottom: 0; }
.sx-k { color: #6b7280; }
.sx-v { font-weight: 500; text-align: right; }
.sx-muted { color: #aab0bb; font-weight: 400; }
.sx-subhead { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8a8f98; font-weight: 700; margin: 18px 0 8px; }
.sx-clean { color: #1c7a36; font-size: 14px; margin: 6px 0; display: flex; align-items: center; gap: 7px; }
.sx-inline-ic { width: 16px; height: 16px; object-fit: contain; vertical-align: middle; }
.sx-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.sx-ok { background: #e7f6ec; color: #1c7a36; }
.sx-warn { background: #fff4e0; color: #8a5a00; }
.sx-bad { background: #fdecec; color: #b30000; }
.sx-info { background: #eef2fd; color: #092baa; }
.sx-issues { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: #555b63; }
.sx-issues li { margin-bottom: 4px; }
.sx-table-wrap { overflow-x: auto; }
.sx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sx-table th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8a8f98; padding: 8px 10px; border-bottom: 1px solid #eef0f3; }
.sx-table td { padding: 9px 10px; border-bottom: 1px solid #f3f5f8; vertical-align: top; }
.sx-table code { font-size: 12.5px; background: #f3f5fb; padding: 1px 6px; border-radius: 5px; }
.sx-fav { width: 14px; height: 14px; vertical-align: middle; margin-right: 2px; }
.sx-finding { border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.sx-finding-bad { background: #fdf3f3; border: 1px solid #f6d6d6; }
.sx-finding-warn { background: #fff9ef; border: 1px solid #f3e2bf; }
.sx-finding-head { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sx-finding-meta { font-size: 12.5px; color: #6b7280; margin-top: 5px; }
.sx-dump-label { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #8a8f98; margin: 9px 0 4px; }
.sx-dump { background: #1f2430; color: #e6e9f0; font-size: 12.5px; padding: 10px 12px; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.sx-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: #f3f5fb; color: var(--color-black); padding: 5px 11px; border-radius: 8px; text-decoration: none; border: 1px solid #e7e9ee; }
.sx-chip:hover { border-color: #c9d0e6; }
.sx-chip-ic { width: 15px; height: 15px; object-fit: contain; }
.sx-chip-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #8a8f98; }
@media (max-width: 640px) {
  .sx-card-head { grid-template-columns: 30px 1fr 22px; row-gap: 10px; }
  .sx-score-wrap { grid-column: 1 / -1; width: 100%; max-width: none; }
  .sx-chev { grid-row: 1; grid-column: 3; }
}
.sx-timing { margin-top: 10px; }
.sx-timing > summary { cursor: pointer; font-size: 13px; color: #092baa; font-weight: 600; list-style: none; padding: 6px 0; }
.sx-timing > summary::-webkit-details-marker { display: none; }
.sx-timing > summary::before { content: "\25B8  "; }
.sx-timing[open] > summary::before { content: "\25BE  "; }
.sx-timing-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 8px 0 10px; background: #eef0f3; }
.sx-timing-bar > span { display: block; height: 100%; }
.sx-timing-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; font-size: 13px; }
.sx-timing-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #eef0f3; padding: 4px 0; }
.sx-timing-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
.sx-hops { margin-top: 6px; }
.sx-hop { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; border-bottom: 1px dashed #eef0f3; }
.sx-hop-url { word-break: break-all; color: #555b63; }
.sx-hop-more { font-size: 12px; color: #8a8f98; padding: 5px 0; font-style: italic; }
@media (max-width: 640px) { .sx-timing-legend { grid-template-columns: 1fr; } }
      .sx-scan-overlay {
        display: none; position: fixed; inset: 0; z-index: 9999;
        background: rgba(255,255,255,.94); backdrop-filter: blur(2px);
        align-items: center; justify-content: center; text-align: center;
      }
      .sx-scan-overlay.active { display: flex; }
      .sx-scan-overlay-inner { max-width: 380px; padding: 24px; }
      .sx-scan-spinner {
        width: 46px; height: 46px; margin: 0 auto 18px;
        border: 4px solid #e4e7ec; border-top-color: var(--color-primary, #3b6fe0);
        border-radius: 50%; animation: sxSpin .8s linear infinite;
      }
      @keyframes sxSpin { to { transform: rotate(360deg); } }
      .sx-scan-overlay-text { font-size: 17px; font-weight: 600; color: #212529; margin-bottom: 6px; }
      .sx-scan-overlay-sub { font-size: 13.5px; color: #8a8f98; }
/* ---- Guest free-scan limit gate (scoped .sx-gate) ----------------------- */
.sx-gate-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(17, 22, 41, .55); backdrop-filter: blur(4px); animation: sxGateFade .3s ease; }
@keyframes sxGateFade { from { opacity: 0; } to { opacity: 1; } }
.sx-gate { font-family: var(--font-primary, "Poppins", sans-serif); background: #fff; border-radius: 18px;
  max-width: 460px; width: 100%; padding: 38px 34px 30px; text-align: center;
  box-shadow: 0 24px 70px rgba(9,43,170,.28); animation: sxGatePop .35s cubic-bezier(.21,1.02,.46,1.03); position: relative; }
@keyframes sxGatePop { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.sx-gate-close { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 22px; line-height: 1;
  color: #aab0bb; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.sx-gate-close:hover { background: #f3f5fb; color: #6b7280; }
.sx-gate-badge { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: #eef2fd; }
.sx-gate-badge svg { width: 30px; height: 30px; stroke: var(--color-primary, #092baa); }
.sx-gate h2 { font-size: 23px; font-weight: 700; color: var(--color-black, #212529); margin: 0 0 10px; }
.sx-gate p { font-size: 14.5px; color: #6b7280; line-height: 1.55; margin: 0 0 24px; }
.sx-gate p strong { color: var(--color-black, #212529); }
.sx-gate-actions { display: flex; flex-direction: column; gap: 10px; }
.sx-gate-btn { display: block; width: 100%; padding: 13px 18px; border-radius: 10px; font-size: 15px; font-weight: 600;
  text-decoration: none; transition: background .2s, color .2s; }
.sx-gate-primary { background: var(--color-primary, #092baa); color: #fff; }
.sx-gate-primary:hover { background: #071f80; color: #fff; }
.sx-gate-secondary { color: var(--color-primary, #092baa); font-size: 13.5px; font-weight: 500; text-decoration: none; margin-top: 4px; }
.sx-gate-secondary:hover { text-decoration: underline; }
.sx-gate-mini { margin-top: 16px; font-size: 12px; color: #aab0bb; }
.text-brand-fallback { color:var(--color-primary,#3b6fe0); }
.cached-note { margin-top:8px; font-size:12.5px; color:#8a8f98; }
