/* AI 사이트 진단 — 리포트 스타일(단일 원본). 테마 변수(--color-*)를 쓰고, 클래스 접두사는 .sa- */
.sa-report, .sa-prog, .sa-error, .sa-hcard { --sa-ok: #4fae78; --sa-good: #4a9fd8; --sa-warn: #d9a441; --sa-bad: #d9765f; --sa-na: #8a8f98; }
.sa-tone-ok { --tone: var(--sa-ok); } .sa-tone-good { --tone: var(--sa-good); } .sa-tone-warn { --tone: var(--sa-warn); } .sa-tone-bad { --tone: var(--sa-bad); } .sa-tone-na { --tone: var(--sa-na); }

.sa-report { color: var(--color-text); font-size: 14px; line-height: 1.65; min-width: 0; }
.sa-report p { margin: 0 0 8px; }
.sa-report h3 { font-size: 17px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 10px; color: var(--color-text); }
.sa-report h4 { font-size: 13.5px; font-weight: 700; margin: 22px 0 10px; color: var(--color-text); }
.sa-muted { font-size: 12.5px; color: var(--color-text-muted); }
.sa-lead { font-size: 15px; line-height: 1.75; color: var(--color-text); }
.sa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.sa-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--tone, var(--color-border)); color: var(--tone, var(--color-text-muted)); background: transparent; white-space: nowrap; }

.sa-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--color-border); }
.sa-ttl { font-size: 15px; font-weight: 800; }
.sa-ttl span { font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin-left: 6px; }
.sa-pdf-btn { flex: none; font-size: 13px; font-weight: 700; color: #1a1710; background: var(--color-accent); border: 0; border-radius: 8px; padding: 8px 15px; cursor: pointer; }
.sa-pdf-btn:hover { opacity: .88; }

.sa-head { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 420px); gap: 24px; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 24px; margin-bottom: 18px; }
.sa-head__score { text-align: center; }
.sa-ring { width: 150px; height: 150px; display: block; margin: 0 auto; }
.sa-ring__bg { fill: none; stroke: var(--color-border); stroke-width: 10; }
.sa-ring__fg { fill: none; stroke: var(--tone); stroke-width: 10; stroke-linecap: round; }
.sa-ring__num { font-size: 34px; font-weight: 800; text-anchor: middle; fill: var(--color-text); }
.sa-ring__unit { font-size: 12px; text-anchor: middle; fill: var(--color-text-muted); }
.sa-grade { margin-top: 8px; font-size: 15px; font-weight: 800; color: var(--tone); }
.sa-grade small { display: block; font-size: 12px; font-weight: 500; color: var(--color-text-muted); }
.sa-url { display: block; font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 14px; word-break: break-all; text-decoration: none; }
a.sa-url:hover { color: var(--color-accent); }
.sa-bar { margin-bottom: 12px; }
.sa-bar__hd { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.sa-bar__hd small { font-size: 12px; font-weight: 400; color: var(--color-text-muted); margin-left: 4px; }
.sa-bar__hd b { color: var(--tone); white-space: nowrap; }
.sa-bar__track { height: 8px; border-radius: 99px; background: var(--color-border); overflow: hidden; }
.sa-bar__track i { display: block; height: 100%; border-radius: 99px; background: var(--tone); }
.sa-head__shots { display: flex; gap: 12px; align-items: flex-start; justify-content: flex-end; min-width: 0; }
.sa-shot { display: block; border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; background: var(--color-bg-deep); }
.sa-shot img { display: block; width: 100%; height: auto; }
.sa-shot--d { flex: 1 1 0; min-width: 0; }
.sa-shot--m { flex: 0 0 23%; }

.sa-sec { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 22px 24px; margin-bottom: 18px; }
.sa-sec__hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sa-code { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; font-size: 13px; font-weight: 800; color: #1a1710; background: var(--color-accent); }
.sa-tally { display: flex; gap: 12px; font-size: 12.5px; }
.sa-tally b { color: var(--tone); font-weight: 700; }
.sa-fixes { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.sa-items { display: grid; gap: 8px; }
.sa-item { border: 1px solid var(--color-border); border-radius: 11px; background: var(--color-bg-deep); }
.sa-item > summary { display: flex; align-items: baseline; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; }
.sa-item > summary::-webkit-details-marker { display: none; }
.sa-item__t { font-weight: 700; flex: 0 0 auto; }
.sa-item__f { flex: 1 1 auto; min-width: 0; color: var(--color-text-muted); font-size: 13px; overflow-wrap: anywhere; }
.sa-item__b { padding: 0 14px 12px 14px; font-size: 13px; }
.sa-item__b b { color: var(--color-accent); margin-right: 4px; }
.sa-badge { flex: none; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; border: 1px solid currentColor; }
.sa-badge--bad { color: var(--sa-bad); } .sa-badge--warn { color: var(--sa-warn); } .sa-badge--ok { color: var(--sa-ok); } .sa-badge--na { color: var(--sa-na); }

.sa-psi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sa-psi { border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; background: var(--color-bg-deep); }
.sa-psi__hd { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 10px; }
.sa-metrics { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 7px; }
.sa-metrics li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.sa-metrics small { display: block; font-size: 12px; color: var(--color-text-muted); }
.sa-metrics b { color: var(--tone); white-space: nowrap; }
.sa-opps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sa-opps li { border-left: 3px solid var(--color-accent); padding: 2px 0 2px 12px; }
.sa-opps li b { margin-right: 8px; }
.sa-opps p { font-size: 13px; color: var(--color-text-muted); margin: 3px 0 0; }

.sa-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.sa-card { border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; background: var(--color-bg-deep); }
.sa-card__hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.sa-card__ev { font-size: 13px; color: var(--color-text-muted); }
.sa-card__rx { font-size: 13px; }
.sa-card__rx b { color: var(--color-accent); margin-right: 4px; }
.sa-dots { display: inline-flex; align-items: center; gap: 3px; }
.sa-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--color-border); }
.sa-dots i.on { background: var(--tone); }
.sa-dots b { font-size: 12px; margin-left: 6px; color: var(--tone); }

.sa-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-border); }
.sa-kv > span { font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.sa-kv p, .sa-kv ul { margin: 0; }
.sa-kv ul { padding-left: 18px; }

.sa-table { overflow-x: auto; }
.sa-table table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.sa-table th, .sa-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.sa-table th { font-size: 12px; color: var(--color-text-muted); font-weight: 600; }
.sa-table tr.sa-miss td:last-child { color: var(--sa-bad); font-weight: 600; }
.sa-vol { display: inline-block; width: 70px; height: 6px; border-radius: 99px; background: var(--color-border); margin-right: 8px; vertical-align: middle; overflow: hidden; }
.sa-vol i { display: block; height: 100%; background: var(--color-accent); border-radius: 99px; }
.sa-spark { display: block; width: 100%; height: 110px; }
.sa-spark polyline { fill: none; stroke: var(--color-accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.sa-spark__x { display: flex; justify-content: space-between; font-size: 12px; color: var(--color-text-muted); margin-bottom: 8px; }

.sa-rx { margin: 0; padding: 0; list-style: none; counter-reset: rx; display: grid; gap: 12px; }
.sa-rx li { counter-increment: rx; position: relative; padding: 14px 16px 14px 52px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-bg-deep); }
.sa-rx li::before { content: counter(rx); position: absolute; left: 16px; top: 15px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #1a1710; background: var(--color-accent); }
.sa-rx__hd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.sa-rx__why { font-size: 13px; color: var(--color-text-muted); }
.sa-btn { display: inline-flex; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--color-accent); border: 1px solid var(--color-accent); border-radius: 9px; padding: 7px 12px; text-decoration: none; }
.sa-btn:hover { background: rgba(196, 165, 90, .1); }

.sa-pages { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.sa-pages .sa-chip { margin-right: 8px; }
.sa-pages em { color: var(--color-text-muted); font-style: normal; }
.sa-peers { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.sa-peers li { min-width: 0; padding: 11px 13px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-deep); }
.sa-peers a { font-size: 14px; font-weight: 700; color: var(--color-text); text-decoration: none; }
.sa-peers a:hover { color: var(--color-accent); }
.sa-peers .sa-muted { margin-left: 7px; word-break: break-all; }
.sa-peers p { margin: 5px 0 0; font-size: 13px; line-height: 1.6; color: var(--color-text-muted); }
.sa-link { display: inline-flex; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--color-accent); text-decoration: none; }
.sa-link:hover { text-decoration: underline; }
.sa-limits { margin: 12px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--color-text-muted); display: grid; gap: 4px; }

.sa-prog { border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); padding: 36px 24px; text-align: center; }
.sa-prog__steps { display: inline-flex; gap: 8px; margin-bottom: 22px; }
.sa-prog__steps span { font-size: 13px; font-weight: 700; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.sa-prog__steps span.on { border-color: var(--color-accent); color: var(--color-accent); }
.sa-prog__steps span.done { border-color: var(--sa-ok); color: var(--sa-ok); }
.sa-spin { width: 38px; height: 38px; margin: 0 auto 14px; border: 3px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: sa-spin .8s linear infinite; }
@keyframes sa-spin { to { transform: rotate(360deg); } }
.sa-prog__msg { font-size: 15px; font-weight: 600; margin: 0 0 6px; color: var(--color-text); }
.sa-prog__shot { display: block; width: 100%; max-width: 640px; margin: 22px auto 0; border: 1px solid var(--color-border); border-radius: 10px; }
.sa-error { border: 1px solid rgba(217, 118, 95, .45); border-radius: 14px; background: rgba(217, 118, 95, .07); padding: 22px; color: var(--sa-bad); font-size: 14px; line-height: 1.6; }
.sa-error p { margin: 6px 0 0; color: var(--color-text-muted); }
.sa-error a { color: var(--color-accent); font-weight: 700; }

.sa-hcard { position: relative; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; overflow: hidden; cursor: pointer; transition: border-color .15s, transform .1s; }
.sa-hcard:hover, .sa-hcard:focus-visible { border-color: var(--color-accent); transform: translateY(-2px); outline: none; }
.sa-hcard__thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; background: var(--color-bg-deep); }
.sa-hcard__body { padding: 12px 13px 14px; }
.sa-hcard__host { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--color-text); margin-bottom: 5px; }
.sa-hcard__host span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-hcard__sum { font-size: 12.5px; line-height: 1.5; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sa-hcard__date { font-size: 12px; color: var(--color-text-muted); opacity: .7; margin-top: 7px; }
.sa-hcard__del { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.sa-hcard:hover .sa-hcard__del, .sa-hcard__del:focus-visible { opacity: 1; }
.sa-hcard__del:hover { background: var(--sa-bad); }

@media (max-width: 1500px) {
  .sa-head { grid-template-columns: 170px minmax(0, 1fr); }
  .sa-head__shots { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 720px) {
  .sa-head { grid-template-columns: 1fr; padding: 18px; }
  .sa-sec { padding: 18px 16px; }
  .sa-psi-row, .sa-cards { grid-template-columns: 1fr; }
  .sa-kv { grid-template-columns: 1fr; gap: 4px; }
  .sa-item > summary { flex-wrap: wrap; }
  .sa-item__f { flex-basis: 100%; }
  .sa-rx li { padding-left: 46px; }
  .sa-hcard__del { opacity: 1; }
  .sa-pdf-btn { min-height: 44px; padding: 10px 16px; }
  .sa-btn { min-height: 44px; align-items: center; padding: 10px 14px; }
  .sa-peers a { display: flex; align-items: center; min-height: 44px; }
  .sa-peers .sa-muted { display: block; margin-left: 0; }
  .sa-link { min-height: 44px; align-items: center; }
}
@media print {
  .sa-pdf-btn, .sa-hcard__del { display: none !important; }
  .sa-sec, .sa-head, .sa-card, .sa-item, .sa-psi, .sa-rx li { break-inside: avoid; page-break-inside: avoid; }
  .sa-head { grid-template-columns: 150px minmax(0, 1fr) 260px; }
  .sa-report a { color: inherit; text-decoration: none; }
}
