/*
 * V4 fidelity overrides: Scan Results Snapshot + Platform Catalog only.
 * The 864 px desktop measurements follow backlinkchecker/mockup.png.
 */

.results-panel,
.catalog {
  background: rgba(1, 20, 15, 0.94);
  border-color: #365a49;
}

.results-section {
  display: none;
}

.results-section.is-visible {
  display: block;
  animation: results-reveal .45s ease both;
}

@keyframes results-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-panel .section-title,
.catalog .section-title {
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 14px;
}

/* Scan results: 14 px panel inset; 155/100 px summary columns place the
   table at x=310 in the 864 px reference. */
.results-panel {
  padding: 12px 14px 4px;
}

.results-panel .result-head {
  min-height: 14px;
  gap: 8px;
}

.results-panel .demo {
  padding: 2px 6px;
  border-color: #3d5d50;
  font-size: 7px;
  line-height: 10px;
}

.results-panel .results {
  grid-template-columns: 155px 100px minmax(0, 1fr);
  gap: 10px;
  margin-top: 5px;
}

.results-panel .score-column {
  padding: 2px 0 0;
  border-right: 0;
}

.results-panel .ring {
  width: 155px;
  height: 155px;
  margin: 14px auto 19px;
}

.results-panel .ring::after {
  inset: 18px;
  background: #071d17;
}

.results-panel .ring b {
  font-size: 39px;
  line-height: 1;
}

.results-panel .ring small {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.35;
}

.results-panel .score-copy {
  max-width: 155px;
  margin: 0;
  color: #c6d1cb;
  font-size: 9.5px;
  line-height: 1.42;
}

.results-panel .counts {
  position: relative;
  padding: 17px 0 0 12px;
}

.results-panel .counts::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 35px;
  left: 0;
  width: 1px;
  background: #2b6d40;
}

.results-panel .counts li {
  position: relative;
  display: grid;
  grid-template-columns: 27px max-content;
  align-items: center;
  column-gap: 2px;
  margin: 9px 0;
  font-size: 9px;
  line-height: 16px;
  white-space: nowrap;
}

.results-panel .counts li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.results-panel .counts b {
  min-width: 0;
  font-size: 22px;
  line-height: 22px;
  text-align: left;
}

.results-panel .table-wrap {
  overflow: visible;
}

.results-panel table,
.catalog table {
  border-collapse: collapse;
  table-layout: fixed;
}

.results-panel table {
  min-width: 0;
  font-size: 8px;
}

.results-panel th,
.results-panel td {
  height: 27px;
  padding: 0 9px;
  border: 1px solid #173b30;
  line-height: 1.15;
}

.results-panel th {
  height: 25px;
  background: linear-gradient(90deg, rgba(14, 52, 39, 0.75), rgba(4, 31, 24, 0.62));
  border-color: #244c3d;
  font-size: 8px;
  font-weight: 500;
}

.results-panel th:nth-child(1) { width: 21.3%; }
.results-panel th:nth-child(2) { width: 13.2%; }
.results-panel th:nth-child(3) { width: 15.9%; }
.results-panel th:nth-child(4) { width: 25.1%; }
.results-panel th:nth-child(5) { width: 24.5%; text-align: center; }

.results-panel td:first-child {
  position: relative;
  padding-left: 27px;
  white-space: nowrap;
}

.results-panel td:first-child::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 9px;
  width: 11px;
  height: 11px;
  transform: translateY(-50%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.results-panel tbody tr:nth-child(1) td:first-child::before { background-image: url("https://www.google.com/s2/favicons?domain=google.com&sz=64"); }
.results-panel tbody tr:nth-child(2) td:first-child::before { background-image: url("https://www.google.com/s2/favicons?domain=linkedin.com&sz=64"); }
.results-panel tbody tr:nth-child(3) td:first-child::before { background-image: url("https://www.google.com/s2/favicons?domain=instagram.com&sz=64"); }
.results-panel tbody tr:nth-child(4) td:first-child::before { background-image: url("https://www.google.com/s2/favicons?domain=facebook.com&sz=64"); }
.results-panel tbody tr:nth-child(5) td:first-child::before { background-image: url("https://www.google.com/s2/favicons?domain=x.com&sz=64"); }
.results-panel tbody tr:nth-child(6) td:first-child::before { background-image: url("https://www.google.com/s2/favicons?domain=youtube.com&sz=64"); }
.results-panel tbody tr:nth-child(7) td:first-child::before { background-image: url("https://www.google.com/s2/favicons?domain=tiktok.com&sz=64"); }
.results-panel tbody tr:nth-child(8) td:first-child::before { background-image: url("https://www.google.com/s2/favicons?domain=medium.com&sz=64"); }

.results-panel .row-action {
  display: block;
  min-width: 83px;
  height: 18px;
  margin: auto;
  padding: 0 5px;
  font-size: 7.5px;
  line-height: 16px;
}

.results-panel tbody tr:nth-child(1) .row-action,
.results-panel tbody tr:nth-child(3) .row-action {
  color: #eef4ef;
}

.results-panel tbody tr:nth-child(2) .row-action,
.results-panel tbody tr:nth-child(5) .row-action {
  color: var(--yellow);
}

.results-panel tbody tr:nth-child(4) .row-action,
.results-panel tbody tr:nth-child(8) .row-action {
  color: var(--blue);
}

.results-panel tbody tr:nth-child(6) .row-action,
.results-panel tbody tr:nth-child(7) .row-action {
  color: #ff6b3d;
}

.results-panel .section-link {
  min-height: 18px;
  padding-top: 6px;
  font-size: 11px;
}

.results-panel .section-link svg,
.catalog .section-link svg {
  width: 16px;
  height: 16px;
}

/* Catalog: the same 14 px inset, visible cell grid, and measured column widths
   reproduce the compact 12-row V4 table without sacrificing filter behavior. */
.catalog {
  padding: 12px 14px 6px;
}

.page main section:has(> .catalog) {
  margin-top: 12px;
}

.catalog .filters {
  gap: 5px;
  padding: 6px 0 7px;
}

.catalog .filter {
  min-height: 21px;
  padding: 3px 9px;
  border-color: #315347;
  font-size: 7px;
  line-height: 13px;
}

.catalog table {
  min-width: 720px;
  font-size: 8px;
}

.catalog th,
.catalog td {
  height: 20px;
  padding: 0 9px;
  border: 1px solid #173b30;
  line-height: 1.1;
}

.catalog th {
  border-color: #244c3d;
  font-size: 8px;
  font-weight: 500;
}

.catalog th:nth-child(1) { width: 20.7%; }
.catalog th:nth-child(2) { width: 15.8%; }
.catalog th:nth-child(3) { width: 9.8%; }
.catalog th:nth-child(4) { width: 12.9%; }
.catalog th:nth-child(5) { width: 24.6%; }
.catalog th:nth-child(6) { width: 16.2%; }

.catalog .platform-name {
  gap: 7px;
  white-space: nowrap;
}

.catalog .platform-name img {
  width: 11px;
  height: 11px;
  flex: none;
}

.catalog .section-link {
  min-height: 18px;
  padding-top: 6px;
  font-size: 11px;
}

@media (max-width: 700px) {
  .results-panel .results {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .results-panel .table-wrap {
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .results-panel table {
    min-width: 620px;
  }

  .catalog .table-wrap {
    overflow-x: auto;
  }
}

@media (max-width: 430px) {
  .results-panel,
  .catalog {
    padding-inline: 10px;
  }

  .results-panel .results {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-panel .score-column {
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .results-panel .ring {
    grid-row: 1 / span 2;
  }

  .results-panel .score-copy {
    max-width: none;
  }

  .results-panel .counts {
    padding-left: 18px;
  }

  .results-panel .table-wrap {
    grid-column: auto;
  }
}
