/**
 * Shared compact results band for tool pages (loading + results hero).
 */

.tool-page--checking .tool-hero-preview,
.tool-page--has-results .tool-hero-preview {
  display: none;
}

.tool-page.tool-page--checking .tool-hero,
.tool-page.tool-page--has-results .tool-hero {
  border-bottom: none;
}

/* Compact hero — loading + unified results band */
.tool-page .tool-hero.tool-hero--compact {
  padding: 8px 0 0;
  overflow: visible;
}

.tool-page .tool-hero.tool-hero--compact::before,
.tool-page .tool-hero.tool-hero--compact::after {
  display: none;
}

.tool-page.tool-page--has-results .tool-results,
.tool-page.tool-page--checking .tool-loading {
  position: relative;
  z-index: 1;
}

.tool-page .tool-hero.tool-hero--compact .tool-hero-grid {
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
}

.tool-page .tool-hero.tool-hero--compact .hero-badge,
.tool-page .tool-hero.tool-hero--compact .tool-hero-subtitle,
.tool-page .tool-hero.tool-hero--compact .tool-hero-trust,
.tool-page .tool-hero.tool-hero--compact .tool-hero-helper,
.tool-page .tool-hero.tool-hero--compact .tool-context-links {
  display: none;
}

.tool-page.tool-page--checking .tool-hero.tool-hero--compact .tool-hero-copy .guides-breadcrumb,
.tool-page.tool-page--checking .tool-hero.tool-hero--compact .tool-hero h1,
.tool-page.tool-page--checking .tool-hero.tool-hero--compact #tool-heading,
.tool-page.tool-page--checking .tool-hero.tool-hero--compact .tool-results-domain-row {
  display: none;
  margin: 0;
}

.tool-page .tool-hero.tool-hero--compact .tool-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0 auto;
}

/* Unified results band — full width, left-aligned */
.tool-page .tool-hero.tool-hero--compact.tool-results-band {
  padding: 14px 0 16px;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border-soft);
}

[data-theme="dark"] .tool-page .tool-hero.tool-hero--compact.tool-results-band {
  background: rgba(148, 163, 184, 0.04);
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.tool-page .tool-hero.tool-hero--compact.tool-results-band .tool-hero-grid {
  max-width: 1220px;
  margin: 0 auto;
}

.tool-page .tool-hero.tool-hero--compact.tool-results-band .tool-hero-copy {
  max-width: none;
}

.tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band .guides-breadcrumb {
  display: flex;
  margin: 0 0 10px;
}

.tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band .guides-breadcrumb #tool-breadcrumb-domain {
  color: var(--color-text);
  font-weight: 600;
}

.tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band .tool-hero h1,
.tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band #tool-heading {
  display: block;
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-accent-dark);
  line-height: 1.3;
}

.tool-page .tool-hero.tool-hero--compact.tool-results-band .tool-results-domain-row:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.tool-page .tool-hero.tool-hero--compact.tool-results-band .tool-results-domain {
  margin: 0;
  font-size: inherit;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: left;
  color: var(--color-text);
  word-break: break-word;
}

.tool-results-favicon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4375rem;
  flex-shrink: 0;
  object-fit: contain;
  align-self: center;
  transform: translateY(0.06em);
  background: var(--color-card);
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 1px 3px rgba(7, 26, 51, 0.06);
}

img.tool-results-favicon[hidden],
img.tool-results-favicon:not([src]) {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none;
}

[data-theme="dark"] .tool-results-favicon {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: none;
}

.tool-page .tool-hero.tool-hero--compact.tool-results-band .tool-search {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}

.tool-page.tool-page--checking .tool-hero.tool-hero--compact.tool-results-band .tool-hero-grid {
  max-width: 1220px;
}

.tool-page.tool-page--checking .tool-hero.tool-hero--compact.tool-results-band .tool-search {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}

.tool-page.tool-page--checking .tool-hero.tool-hero--compact .tool-search {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 16px;
}

/* Inline search bar on compact hero */
.tool-page .tool-hero.tool-hero--compact .hero-search-inner,
.tool-page .tool-hero.tool-hero--compact .tool-search-inner {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  padding: 5px;
  gap: 8px;
}

.tool-page .tool-hero.tool-hero--compact .hero-input,
.tool-page .tool-hero.tool-hero--compact .tool-input {
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 10px 14px;
  font-size: 0.9375rem;
}

.tool-page .tool-hero.tool-hero--compact .hero-submit,
.tool-page .tool-hero.tool-hero--compact .tool-submit {
  width: auto;
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 0.875rem;
  min-width: 120px;
  white-space: nowrap;
}

.tool-page.tool-page--has-results .tool-results.is-visible {
  margin-top: 0;
  padding-top: 0;
}

.tool-page.tool-page--has-results .tool-results .container {
  padding-top: 0;
}

.tool-page.tool-page--has-results .report-audit {
  padding-top: 0;
}

.tool-page.tool-page--has-results .audit-dashboard--compact {
  margin-top: 0;
  padding-top: 16px;
  border-top: none;
  border-radius: 0 0 20px 20px;
}

.tool-page.tool-page--has-results .hero-badge,
.tool-page.tool-page--has-results .tool-hero-subtitle,
.tool-page.tool-page--has-results .tool-hero-trust,
.tool-page.tool-page--has-results .tool-hero-helper {
  display: none;
}

.tool-page .tool-results.is-visible {
  padding-top: 0;
  margin-top: 0;
}

/* --- Shared loading UI (checking state) --- */
.tool-page--checking .loading-progress {
  height: 4px;
  margin: 0 0 10px;
  border-radius: 999px;
  background: var(--color-border-soft);
  overflow: hidden;
}

.tool-page--checking .loading-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
  transition: width 320ms ease;
}

.tool-page--checking .loading-progress-meta {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-muted);
}

.tool-page--checking .loading-step-focus {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(22, 199, 132, 0.06);
  border: 1px solid rgba(22, 199, 132, 0.14);
  transition: opacity 180ms ease, transform 180ms ease;
}

[data-theme="dark"] .tool-page--checking .loading-step-focus {
  background: rgba(22, 199, 132, 0.08);
  border-color: rgba(22, 199, 132, 0.18);
}

.tool-page--checking .loading-step-focus.is-changing {
  opacity: 0.55;
  transform: translateY(2px);
}

.tool-page--checking .loading-step-focus-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.tool-page--checking .loading-step-focus-copy {
  min-width: 0;
  flex: 1;
}

.tool-page--checking .loading-step-focus-title {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
}

.tool-page--checking .loading-step-focus-detail {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-muted);
}

.tool-page--checking .loading-steps--compact {
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-page--checking .loading-steps--compact .loading-step.is-active {
  display: none;
}

.tool-page--checking .loading-step.is-pending {
  color: var(--color-muted);
  opacity: 0.72;
}

.tool-page--checking .loading-step-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}

.tool-page--checking .loading-skeleton {
  display: none;
}

/* Contained horizontal scroll for results tables */
.records-table-wrap,
[class*="-records-table-wrap"]:not([class*="-cards"]) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  .tool-page .tool-hero.tool-hero--compact,
  .tool-page .tool-hero.tool-hero--compact.tool-results-band,
  .tool-page.tool-page--has-results .tool-hero,
  .tool-page.tool-page--checking .tool-hero {
    padding: 8px 0 0;
  }

  .tool-page .tool-hero.tool-hero--compact.tool-results-band {
    padding-top: 12px;
  }

  .tool-page .tool-hero.tool-hero--compact.tool-results-band .tool-hero-grid {
    max-width: 100%;
  }

  .tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band .tool-search {
    margin-bottom: 0;
  }

  .tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band .tool-results-domain-row {
    margin-bottom: 10px;
    font-size: 1.375rem;
  }

  .tool-results-favicon {
    width: 1.65rem;
    height: 1.65rem;
  }
}

@media (max-width: 768px) {
  .tool-page .tool-hero.tool-hero--compact,
  .tool-page .tool-hero.tool-hero--compact.tool-results-band,
  .tool-page.tool-page--has-results .tool-hero,
  .tool-page.tool-page--checking .tool-hero {
    padding: 8px 0 0;
  }

  .tool-page .tool-hero.tool-hero--compact.tool-results-band {
    padding-top: 10px;
  }

  .tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band .tool-search {
    margin-bottom: 0;
  }

  .tool-page .tool-hero.tool-hero--compact .hero-search-inner,
  .tool-page .tool-hero.tool-hero--compact .tool-search-inner {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .tool-page .tool-hero.tool-hero--compact .hero-submit,
  .tool-page .tool-hero.tool-hero--compact .tool-submit {
    width: 100%;
    min-width: 0;
  }

  .tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band .tool-hero h1,
  .tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band #tool-heading {
    margin-bottom: 4px;
  }

  .tool-page.tool-page--has-results .tool-hero.tool-hero--compact.tool-results-band .tool-results-domain-row {
    margin-bottom: 8px;
    font-size: 1.25rem;
  }

  .tool-results-favicon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
  }

  /* Single-column results dashboard on phones */
  .tool-page .spf-dashboard-body,
  .ssl-checker-page .ssl-dashboard .spf-dashboard-body,
  .blacklist-checker-page .bl-dashboard .spf-dashboard-body,
  .website-status-checker-page .wsc-dashboard .spf-dashboard-body,
  .http-header-checker-page .hhc-dashboard .spf-dashboard-body,
  .reverse-dns-checker-page .rdns-dashboard .spf-dashboard-body,
  .caa-record-checker-page .caa-dashboard .spf-dashboard-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "status"
      "main"
      "meta"
      "actions";
    gap: 12px;
  }

  .tool-page .spf-dashboard-col--status,
  .ssl-checker-page .spf-dashboard-col--status,
  .blacklist-checker-page .spf-dashboard-col--status,
  .website-status-checker-page .spf-dashboard-col--status,
  .http-header-checker-page .spf-dashboard-col--status,
  .reverse-dns-checker-page .spf-dashboard-col--status {
    flex-direction: row;
    justify-content: flex-start;
  }

  .tool-page .spf-status-visual,
  .ssl-checker-page .spf-status-visual,
  .blacklist-checker-page .spf-status-visual,
  .website-status-checker-page .spf-status-visual,
  .http-header-checker-page .spf-status-visual,
  .reverse-dns-checker-page .spf-status-visual {
    flex-direction: row;
    align-items: center;
  }

  .tool-page .spf-status-hint,
  .ssl-checker-page .spf-status-hint,
  .blacklist-checker-page .spf-status-hint,
  .website-status-checker-page .spf-status-hint,
  .http-header-checker-page .spf-status-hint,
  .reverse-dns-checker-page .spf-status-hint {
    max-width: none;
    text-align: left;
  }

  .tool-page .spf-dashboard-col--meta,
  .ssl-checker-page .spf-dashboard-col--meta,
  .blacklist-checker-page .spf-dashboard-col--meta,
  .website-status-checker-page .spf-dashboard-col--meta,
  .http-header-checker-page .spf-dashboard-col--meta,
  .reverse-dns-checker-page .spf-dashboard-col--meta {
    align-items: stretch;
  }

  .tool-page .spf-dashboard-domain-row,
  .ssl-checker-page .spf-dashboard-domain-row,
  .blacklist-checker-page .spf-dashboard-domain-row,
  .website-status-checker-page .spf-dashboard-domain-row,
  .http-header-checker-page .spf-dashboard-domain-row,
  .reverse-dns-checker-page .spf-dashboard-domain-row {
    justify-content: flex-start;
  }

  .tool-page .spf-dashboard-domain-row .audit-domain-name--flagship,
  .ssl-checker-page .spf-dashboard-domain-row .audit-domain-name--flagship,
  .blacklist-checker-page .spf-dashboard-domain-row .audit-domain-name--flagship,
  .website-status-checker-page .spf-dashboard-domain-row .audit-domain-name--flagship,
  .http-header-checker-page .spf-dashboard-domain-row .audit-domain-name--flagship,
  .reverse-dns-checker-page .spf-dashboard-domain-row .audit-domain-name--flagship {
    text-align: left;
  }

  .tool-page .spf-dashboard-meta-block,
  .ssl-checker-page .spf-dashboard-meta-block,
  .blacklist-checker-page .spf-dashboard-meta-block,
  .website-status-checker-page .spf-dashboard-meta-block,
  .http-header-checker-page .spf-dashboard-meta-block,
  .reverse-dns-checker-page .spf-dashboard-meta-block {
    align-items: flex-start;
    text-align: left;
  }
}
