/* Website Grader — widget styles
   Self-contained, prefixed with .wg- so it won't collide with your site's CSS. */

.wg-scope {
  --wg-ink: #10201E;
  --wg-ink-soft: #1A2E2B;
  --wg-paper: #FBF9F4;
  --wg-paper-dim: #F1EEE5;
  --wg-signal: #1FA89C;
  --wg-signal-soft: rgba(31, 168, 156, 0.14);
  --wg-muted: #5C6E6B;
  --wg-green: #1E9E6B;
  --wg-amber: #D99A1F;
  --wg-red: #D9503F;
  --wg-border: rgba(16, 32, 30, 0.10);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--wg-ink);
  box-sizing: border-box;
}
.wg-scope *, .wg-scope *::before, .wg-scope *::after { box-sizing: inherit; }

.wg-mono { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; }
.wg-display { font-family: 'Space Grotesk', 'Inter', sans-serif; }

/* ---------- Panel shell ---------- */
.wg-panel {
  background: var(--wg-ink);
  color: var(--wg-paper);
  border-radius: 18px;
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.wg-panel::before {
  /* schematic grid backdrop */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(251,249,244,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,249,244,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: -1;
  mask-image: radial-gradient(ellipse at top left, black, transparent 75%);
}

.wg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wg-signal);
  margin-bottom: 14px;
}
.wg-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--wg-signal);
  box-shadow: 0 0 0 3px var(--wg-signal-soft);
}

.wg-h1 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.wg-sub {
  color: rgba(251,249,244,0.68);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 46ch;
}

/* ---------- Input bar ---------- */
.wg-form {
  display: flex;
  gap: 10px;
  background: rgba(251,249,244,0.06);
  border: 1px solid rgba(251,249,244,0.14);
  border-radius: 12px;
  padding: 6px;
  max-width: 560px;
}
.wg-form input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--wg-paper);
  font-size: 15px;
  padding: 12px 14px;
  font-family: 'IBM Plex Mono', monospace;
}
.wg-form input[type="text"]::placeholder { color: rgba(251,249,244,0.4); }
.wg-form button {
  background: var(--wg-signal);
  color: #06211E;
  border: none;
  border-radius: 8px;
  padding: 0 22px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: transform 0.12s ease, background 0.12s ease;
}
.wg-form button:hover { background: #29c2b4; }
.wg-form button:active { transform: scale(0.97); }
.wg-form button:disabled { opacity: 0.6; cursor: default; }

.wg-error {
  margin-top: 12px;
  color: #FFB4A8;
  font-size: 14px;
}

/* ---------- Scanning state ---------- */
.wg-scan {
  margin-top: 28px;
  height: 3px;
  border-radius: 2px;
  background: rgba(251,249,244,0.08);
  overflow: hidden;
  position: relative;
  display: none;
}
.wg-scan.wg-active { display: block; }
.wg-scan::after {
  content: "";
  position: absolute;
  top: 0; left: -30%;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--wg-signal), transparent);
  animation: wg-sweep 1.1s ease-in-out infinite;
}
@keyframes wg-sweep {
  0% { left: -30%; }
  100% { left: 100%; }
}
.wg-scan-label {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(251,249,244,0.55);
  display: none;
}
.wg-scan-label.wg-active { display: block; }

/* ---------- Results ---------- */
.wg-report { display: none; margin-top: 36px; }
.wg-report.wg-active { display: block; }

.wg-report-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(251,249,244,0.12);
  margin-bottom: 24px;
}

.wg-dial-wrap { position: relative; width: 148px; height: 148px; flex-shrink: 0; }
.wg-dial-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wg-dial-track { fill: none; stroke: rgba(251,249,244,0.1); stroke-width: 10; }
.wg-dial-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.wg-dial-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.wg-dial-score { font-size: 34px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; line-height: 1; }
.wg-dial-of { font-size: 11px; color: rgba(251,249,244,0.5); margin-top: 2px; }

.wg-stamp {
  width: 68px; height: 68px;
  border: 3px solid currentColor;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px; font-weight: 700;
  transform: rotate(-6deg);
  flex-shrink: 0;
}

.wg-report-summary { flex: 1; min-width: 220px; }
.wg-report-summary h3 { margin: 0 0 6px; font-family: 'Space Grotesk', sans-serif; font-size: 20px; }
.wg-report-summary p { margin: 0; color: rgba(251,249,244,0.65); font-size: 14px; line-height: 1.5; }
.wg-report-url { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--wg-signal); word-break: break-all; }

.wg-cta {
  margin-left: auto;
  align-self: flex-start;
}
.wg-cta a {
  display: inline-block;
  background: var(--wg-paper);
  color: var(--wg-ink);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  font-family: 'Space Grotesk', sans-serif;
  white-space: nowrap;
}
.wg-cta a:hover { background: #fff; }

/* ---------- Category grid ---------- */
.wg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.wg-card {
  background: rgba(251,249,244,0.045);
  border: 1px solid rgba(251,249,244,0.1);
  border-radius: 12px;
  padding: 16px 18px;
}
.wg-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 10px;
}
.wg-card-title { font-size: 14px; font-weight: 600; font-family: 'Space Grotesk', sans-serif; }
.wg-card-score { display: flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.wg-card-grade {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: #06211E;
}
.wg-bar-track { height: 5px; border-radius: 3px; background: rgba(251,249,244,0.1); margin-top: 12px; overflow: hidden; }
.wg-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }

.wg-findings {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.wg-card.wg-open .wg-findings { display: flex; }
.wg-findings li {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(251,249,244,0.75);
  padding-left: 18px;
  position: relative;
}
.wg-findings li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
}
.wg-findings li[data-status="good"]::before { background: var(--wg-green); }
.wg-findings li[data-status="warn"]::before { background: var(--wg-amber); }
.wg-findings li[data-status="bad"]::before { background: var(--wg-red); }

.wg-toggle-icon { transition: transform 0.2s ease; color: rgba(251,249,244,0.5); flex-shrink: 0; }
.wg-card.wg-open .wg-toggle-icon { transform: rotate(180deg); }

@media (max-width: 560px) {
  .wg-panel { padding: 28px 18px; }
  .wg-report-top { flex-direction: column; align-items: flex-start; }
  .wg-cta { margin-left: 0; }
  .wg-cta a { display: block; text-align: center; }
}
