/* ── Health Score ────────────────────────────────────────────────────── */
.tool-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 24px; font-weight: 700; margin-bottom: 6px;
}
.tool-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.tool-icon--health {
  background: linear-gradient(135deg, var(--green), var(--accent));
}
.tool-desc { color: var(--muted2); font-size: 14px; margin-bottom: 24px; }

.health-form .form-row { display: flex; gap: 10px; }
.input-wrap--domain { flex: 1; }
.health-form .input {
  width: 100%; height: 44px; padding: 12px 16px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 10px; color: var(--text);
  font-size: 15px; font-family: var(--mono);
  transition: border-color .2s, box-shadow .2s;
}
.health-form .input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,138,248,.3);
}
.health-form .btn-primary {
  min-height: 44px; padding: 12px 24px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #0b0d14; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity .2s, transform .15s, filter .2s;
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.health-form .btn-primary:hover { transform: scale(1.02); filter: brightness(1.1); }
.health-form .btn-primary:active { transform: scale(0.98); }
.health-form .btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

}

to   { opacity: 1; transform: translateY(0); }
}

.health-error { color: var(--red); font-size: 14px; margin-top: 16px; animation: fadeInUp .3s var(--ease-out); }

/* ── Score Circle ───────────────────────────────────────────────────── */
.health-score-hero {
  display: flex; align-items: center; gap: 32px;
  margin-top: 20px; padding: 28px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 4px 24px rgba(0,0,0,.2);
  animation: fadeInUp .4s var(--ease-out);
}
.health-circle-wrap {
  position: relative; width: 140px; height: 140px; flex-shrink: 0;
}
.health-circle-svg {
  width: 140px; height: 140px; transform: rotate(-90deg);
}
.health-circle-bg {
  fill: none; stroke: var(--surface2); stroke-width: 8;
}
.health-circle-fg {
  fill: none; stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 1.2s ease-out, stroke .3s;
}
.health-score-number {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px; font-weight: 700; color: var(--text);
  line-height: 1;
}
.health-score-number small {
  font-size: 14px; font-weight: 400; color: var(--muted);
}
.health-score-info { flex: 1; }
.health-grade-badge {
  display: inline-block; padding: 6px 16px;
  border-radius: 8px; font-size: 20px; font-weight: 700;
  margin-bottom: 8px;
}
.health-grade--aplus, .health-grade--a { background: rgba(34,197,94,.15); color: #22c55e; }
.health-grade--b { background: rgba(59,130,246,.15); color: #3b82f6; }
.health-grade--c { background: rgba(234,179,8,.15); color: #eab308; }
.health-grade--d { background: rgba(249,115,22,.15); color: var(--orange); }
.health-grade--f { background: rgba(239,68,68,.15); color: var(--danger); }

.health-url-meta {
  font-size: 13px; color: var(--muted); margin-top: 6px;
}
.health-url-meta span { color: var(--muted2); }

/* ── Categories ─────────────────────────────────────────────────────── */
.health-categories {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 20px;
}
.health-cat-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 22px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .2s, transform .15s;
  animation: fadeInUp .45s var(--ease-out);
}
.health-cat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.health-cat-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(91,138,248,.1);
}
.health-cat-name {
  font-size: 15px; font-weight: 600; color: var(--text);
}
.health-cat-score {
  font-size: 14px; font-weight: 600; font-family: var(--mono);
}
.health-cat-bar {
  width: 100%; height: 6px; background: var(--surface2);
  border-radius: 3px; overflow: hidden; margin-bottom: 16px;
}
.health-cat-fill {
  height: 100%; border-radius: 3px; transition: width .8s ease-out;
}

/* ── Check Items ────────────────────────────────────────────────────── */
.health-check-list {
  list-style: none; padding: 0; margin: 0;
}
.health-check-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.health-check-item:last-child { border-bottom: none; }
.health-check-icon {
  flex-shrink: 0; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; margin-top: 1px;
  border-radius: 50%;
}
.health-check-icon--pass { color: #22c55e; background: rgba(34,197,94,.12); }
.health-check-icon--fail { color: var(--danger); background: rgba(239,68,68,.12); }
.health-check-icon--warning { color: #eab308; background: rgba(234,179,8,.12); }
.health-check-name { color: var(--text); flex: 1; }
.health-check-pts {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  white-space: nowrap;
}
.health-check-detail {
  font-size: 11px; color: var(--muted); font-family: var(--mono);
  word-break: break-all; margin-top: 2px;
}

/* ── Recommendations ────────────────────────────────────────────────── */
.health-recs {
  margin-top: 20px; background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 22px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  animation: fadeInUp .5s var(--ease-out);
}
.health-recs-title {
  font-size: 14px; font-weight: 600; color: var(--muted2);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(91,138,248,.15);
}
.health-rec-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 6px;
  background: var(--surface2); border-radius: 10px;
  font-size: 13px;
  transition: transform .15s;
}
.health-rec-item:hover { transform: translateX(4px); }
.health-rec-item:last-child { margin-bottom: 0; }
.health-rec-item--fail { border-left: 3px solid var(--danger); }
.health-rec-item--warning { border-left: 3px solid #eab308; }
.health-rec-icon { font-size: 14px; flex-shrink: 0; }
.health-rec-text { color: var(--text); }

/* ── Export bar ──────────────────────────────────────────────────────── */
.health-export-bar {
  display: flex; gap: 8px; margin-top: 20px;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .health-form .form-row { flex-direction: column; }
  .health-form .btn-primary { width: 100%; justify-content: center; }
  .health-form .input { width: 100%; }
  .health-score-hero { flex-direction: column; text-align: center; gap: 16px; padding: 20px; }
  .health-categories { grid-template-columns: 1fr; }
}

/* Paywall blur for recommendations */
.health-recs--locked { position: relative; overflow: hidden; }
.health-recs-blur { filter: blur(5px); pointer-events: none; user-select: none; }
.health-paywall { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; background: rgba(var(--bg-rgb, 15,15,20), 0.7); backdrop-filter: blur(2px); z-index: 2; border-radius: 14px; text-align: center; padding: 2rem; }
.health-paywall__icon { font-size: 2.5rem; }
.health-paywall__title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.health-paywall__desc { color: var(--muted); font-size: 0.95rem; max-width: 360px; line-height: 1.5; }
.health-paywall__btn { display: inline-block; margin-top: 0.5rem; padding: 0.6rem 1.5rem; background: var(--accent); color: var(--white); border-radius: 8px; text-decoration: none; font-weight: 600; transition: opacity 0.2s; }
.health-paywall__btn:hover { opacity: 0.85; }

/* ── Expandable fix guides (details/summary) ─────────────────────── */
.health-rec-item:is(details) { cursor: default; }
.health-rec-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 0;
}
.health-rec-summary::-webkit-details-marker { display: none; }
.health-rec-arrow {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
details.health-rec-item[open] .health-rec-arrow { transform: rotate(90deg); }
details.health-rec-item[open] { padding-bottom: 4px; }
.health-rec-steps {
  margin: 8px 0 2px 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.health-rec-steps li {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.health-rec-steps code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent);
  word-break: break-all;
}
.health-rec-steps a { color: var(--accent); text-decoration: underline; }
