/* ============================================
   /Recon Preview: external attack-surface scan
   ============================================ */

.hep-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(var(--navbar-height) + var(--space-10)) var(--space-6) var(--space-20);
}

/* ── Hero ── */
.hep-hero {
  margin-bottom: var(--space-8);
}

.hep-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-small);
  color: var(--text-tertiary);
  text-decoration: none;
  margin-bottom: var(--space-4);
  transition: color var(--transition-fast);
}
.hep-back-link:hover { color: var(--accent-primary); }

.hep-hero-eyebrow {
  display: inline-block;
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: var(--space-3);
}

.hep-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  max-width: 820px;
}

.hep-hero p {
  max-width: 720px;
  font-size: var(--text-body-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
}

.hep-privacy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-md);
  font-size: var(--text-small) !important;
  color: var(--success) !important;
  max-width: none !important;
}
.hep-privacy svg { flex-shrink: 0; }

/* ── Scanner input ── */
.hep-scanner-panel {
  background: var(--bg-pure);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-card);
}

.hep-input-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}

.hep-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: stretch;
}

@media (max-width: 600px) {
  .hep-input-row { grid-template-columns: 1fr; }
}

.hep-input-row input {
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-body);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.hep-input-row input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.hep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--text-light);
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.hep-btn:hover { background: var(--accent-primary-dark); transform: translateY(-1px); }
.hep-btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.hep-input-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
  font-style: italic;
}
.hep-input-hint code {
  font-family: var(--font-mono);
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  font-style: normal;
}

/* ── Results wrapper ── */
.hep-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

/* ── Panel — shared ── */
.hep-panel {
  background: var(--bg-pure);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hep-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-light);
}

.hep-panel-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0;
}

.hep-scan-target {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--text-tertiary);
}

.hep-panel-body { padding: var(--space-6); }

/* ── Overall grade panel ── */
.hep-overall-panel {
  background: linear-gradient(135deg, var(--indigo-950), var(--violet-700));
  color: var(--text-light);
  border: none;
}

.hep-overall-panel .hep-panel-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.hep-overall-panel .hep-panel-header h2 { color: var(--text-light); }
.hep-overall-panel .hep-scan-target { color: var(--text-light-muted); }

.hep-grade-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
}

@media (max-width: 600px) {
  .hep-grade-layout { grid-template-columns: 1fr; text-align: center; }
}

.hep-grade-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}
.hep-grade-circle.grade-A, .hep-grade-circle.grade-Aplus { background: rgba(16, 185, 129, 0.25); border-color: #34d399; }
.hep-grade-circle.grade-B { background: rgba(59, 130, 246, 0.25); border-color: #60a5fa; }
.hep-grade-circle.grade-C { background: rgba(245, 158, 11, 0.25); border-color: #fbbf24; }
.hep-grade-circle.grade-D { background: rgba(249, 115, 22, 0.25); border-color: #fb923c; }
.hep-grade-circle.grade-F { background: rgba(220, 38, 38, 0.3); border-color: #f87171; }

.hep-grade-letter {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--text-light);
}

.hep-grade-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-light-muted);
  margin-top: var(--space-1);
}

.hep-grade-summary p {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--text-light-secondary);
  margin: 0 0 var(--space-3);
}
.hep-grade-summary p:last-child { margin-bottom: 0; }
.hep-grade-summary strong { color: var(--text-light); }

/* ── Check panel header ── */
.hep-check-heading {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  min-width: 0;
}

.hep-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-cloud);
  color: var(--accent-primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.hep-check-heading h2 {
  font-size: var(--text-body-lg);
  margin: 0 0 2px 0;
}
.hep-check-heading .hep-check-sub {
  font-size: var(--text-small);
  color: var(--text-tertiary);
  margin: 0;
  line-height: var(--leading-snug);
}

.hep-check-status {
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  background: var(--bg-soft);
  color: var(--text-tertiary);
  border: 1px solid var(--border-default);
  white-space: nowrap;
  flex-shrink: 0;
}
.hep-check-status.running  { background: rgba(59, 130, 246, 0.1); color: #2563eb; border-color: rgba(59, 130, 246, 0.3); }
.hep-check-status.pass     { background: rgba(16, 185, 129, 0.12); color: var(--success); border-color: rgba(16, 185, 129, 0.3); }
.hep-check-status.partial  { background: rgba(245, 158, 11, 0.15); color: #b45309; border-color: rgba(245, 158, 11, 0.3); }
.hep-check-status.fail     { background: var(--danger); color: var(--text-light); border-color: var(--danger); }
.hep-check-status.warn     { background: rgba(220, 38, 38, 0.1); color: var(--danger); border-color: rgba(220, 38, 38, 0.3); }

/* ── Check body — idle ── */
.hep-check-idle {
  font-size: var(--text-small);
  color: var(--text-tertiary);
  font-style: italic;
  margin: 0;
}

/* ── Email check findings ── */
.hep-record-grid {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.hep-record {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-soft);
  border-left: 3px solid var(--border-default);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.hep-record.status-pass    { border-left-color: var(--success); }
.hep-record.status-partial { border-left-color: #f59e0b; }
.hep-record.status-fail    { border-left-color: var(--danger); }

.hep-record-label {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.hep-record-detail {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: var(--leading-snug);
  min-width: 0;
  word-break: break-word;
}
.hep-record-detail code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-pure);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.hep-record-verdict {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.hep-record-verdict.pass    { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.hep-record-verdict.partial { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.hep-record-verdict.fail    { background: var(--danger); color: var(--text-light); }

.hep-interpretation {
  padding: var(--space-4);
  background: var(--bg-mist);
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}
.hep-interpretation strong { color: var(--text-primary); }

.hep-error {
  padding: var(--space-4);
  background: rgba(220, 38, 38, 0.06);
  border-left: 3px solid var(--danger);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-small);
  color: var(--text-secondary);
}

/* ── Subdomain findings ── */
.hep-subdomain-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.hep-subdomain-count {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--accent-primary);
}
.hep-subdomain-count-label {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: var(--leading-snug);
}
.hep-subdomain-count-label strong { color: var(--text-primary); }

.hep-interesting-section {
  margin-bottom: var(--space-4);
}
.hep-interesting-section h4 {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}
.hep-interesting-section p {
  font-size: var(--text-small);
  color: var(--text-tertiary);
  margin: 0 0 var(--space-3);
}

.hep-wildcard-note {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  border-radius: var(--radius-md);
}
.hep-wildcard-note h4 {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}
.hep-wildcard-note p {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0 0 var(--space-2);
}
.hep-wildcard-note p:last-child { margin-bottom: 0; }
.hep-wildcard-note code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}

.hep-subdomain-list {
  display: grid;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  max-height: 300px;
  overflow-y: auto;
  padding: var(--space-3);
  background: #0f172a;
  color: #cbd5e1;
  border-radius: var(--radius-md);
}
.hep-subdomain-list > div { padding: 2px 0; word-break: break-all; }
.hep-subdomain-list > div.interesting { color: #fbbf24; }
.hep-subdomain-list > div.interesting::before { content: "! "; color: #f59e0b; font-weight: bold; }

.hep-subdomain-more {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
  font-style: italic;
}

/* ── CTA panel ── */
.hep-cta-panel {
  padding: var(--space-10);
  background: linear-gradient(135deg, var(--indigo-950), var(--violet-700));
  color: var(--text-light);
  border-radius: var(--radius-2xl);
  text-align: center;
}

.hep-cta-panel h2 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  color: var(--text-light);
  margin: 0 0 var(--space-4);
}

.hep-cta-panel p {
  max-width: 640px;
  margin: 0 auto var(--space-4);
  color: var(--text-light-secondary);
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
}
.hep-cta-panel p strong { color: var(--text-light); }

.hep-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--indigo-950);
  background: var(--text-light);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: transform var(--transition-fast);
  margin-top: var(--space-4);
}
.hep-cta-btn:hover { transform: translateY(-1px); }

.hep-cta-kicker {
  margin-top: var(--space-6) !important;
  font-size: var(--text-small) !important;
  color: var(--text-light-muted) !important;
  font-style: italic;
}

/* ── Explainer (shown before scan) ── */
.hep-explainer {
  margin-top: var(--space-8);
}

.hep-explainer h2 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin: 0 0 var(--space-5);
}

.hep-explainer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.hep-explainer-card {
  padding: var(--space-6);
  background: var(--bg-pure);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
}

.hep-explainer-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
}

.hep-explainer-card p {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}

.hep-explainer-card ul {
  padding-left: 1.25rem;
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}
.hep-explainer-card ul li { margin-bottom: var(--space-1); }
.hep-explainer-card strong { color: var(--text-primary); }
.hep-explainer-card code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}

.hep-results:not([hidden]) + .hep-explainer { display: none; }

/* Hero alignment: centered to match stack-analysis + casefile conventions. */
.hep-hero {
  text-align: center;
}
.hep-hero h1,
.hep-hero p {
  margin-left: auto;
  margin-right: auto;
}
