.comparison-preview-page main {
  padding-bottom: 40px;
}

.comparison-preview-page .site-header {
  min-height: 104px;
}

.geocompare-brand {
  gap: 18px;
}

.company-logo {
  width: clamp(148px, 18vw, 205px);
  height: auto;
  display: block;
}

.product-lockup {
  padding-left: 18px;
  border-left: 1px solid rgb(21 43 43 / 18%);
}

.product-lockup strong,
.product-lockup small {
  display: block;
}

.product-lockup strong {
  color: var(--ink);
  font-size: clamp(0.92rem, 1.6vw, 1.15rem);
  letter-spacing: 0.09em;
}

.product-lockup small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.66rem;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.preview-badge {
  border-color: rgb(198 95 40 / 35%);
  color: #8d3f1c;
  background: var(--orange-pale);
}

.compare-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(28px, 7vw, 88px);
  align-items: end;
  padding: 72px 0 46px;
}

.compare-hero h1 {
  max-width: 760px;
  font-size: clamp(2.7rem, 6vw, 5rem);
}

.fairness-note {
  position: relative;
  padding: 28px;
  border: 1px solid rgb(0 109 103 / 25%);
  border-radius: var(--radius-lg) var(--radius-lg) 8px var(--radius-lg);
  color: var(--white);
  background: var(--teal-dark);
  box-shadow: var(--shadow);
}

.fairness-note::before {
  position: absolute;
  width: 62px;
  height: 62px;
  right: 18px;
  top: -22px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 50%;
  content: "";
}

.fairness-note span,
.fairness-note strong {
  display: block;
}

.fairness-note span {
  color: #9fdad4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.fairness-note strong {
  margin-top: 24px;
  font-size: 1.7rem;
  letter-spacing: -0.035em;
}

.fairness-note p {
  margin: 12px 0 0;
  color: rgb(255 255 255 / 72%);
  font-size: 0.84rem;
  line-height: 1.65;
}

.compare-setup,
.comparison-result-preview {
  margin-bottom: 28px;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 253 248 / 92%);
  box-shadow: var(--shadow);
}

.shared-benchmark-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr auto;
  gap: 1px;
  align-items: stretch;
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--line);
}

.shared-benchmark-strip > div,
.shared-benchmark-strip > button {
  min-width: 0;
  padding: 16px 18px;
  border: 0;
  background: var(--white);
  text-align: left;
}

.shared-benchmark-strip span,
.shared-benchmark-strip strong {
  display: block;
}

.shared-benchmark-strip span {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.shared-benchmark-strip strong {
  font-size: 0.95rem;
}

.question-mix strong {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.question-mix b {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-pale);
  font-size: 0.7rem;
}

.text-button {
  color: var(--teal);
  font-weight: 800;
  white-space: nowrap;
}

.text-button::after {
  margin-left: 10px;
  content: "↘";
}

.shared-question-preview {
  padding: 18px 20px 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: #f8f6ef;
}

.shared-question-preview ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shared-question-preview li {
  line-height: 1.55;
}

.shared-question-preview li span {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 800;
}

.shared-question-preview p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.competitor-input-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.site-input-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8f6ef;
}

.site-input-card.owned-site {
  border: 2px solid var(--teal);
  background: var(--teal-pale);
}

.site-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-card-topline b {
  color: var(--teal);
  font-size: 0.65rem;
}

.site-input-card label {
  margin-bottom: 7px;
  font-size: 0.76rem;
}

.site-input-card input {
  min-height: 48px;
  padding: 11px 12px;
  font-size: 0.82rem;
}

.empty-slot {
  display: flex;
  flex-direction: column;
}

.add-competitor-button {
  flex: 1;
  min-height: 48px;
  border: 1px dashed #8f9b98;
  border-radius: var(--radius-sm);
  color: var(--teal-dark);
  background: transparent;
  font-weight: 760;
}

.add-competitor-button span {
  font-size: 1.2rem;
}

.score-boundary-note {
  display: flex;
  gap: 10px 16px;
  align-items: baseline;
  margin-top: 28px;
  padding: 13px 16px;
  border-left: 4px solid var(--orange);
  background: var(--orange-pale);
}

.score-boundary-note span {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.dimension-tabs {
  display: inline-flex;
  max-width: 100%;
  gap: 5px;
  margin: 24px 0 16px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ece8dc;
}

.dimension-tabs button {
  min-height: 38px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.dimension-tabs button[aria-selected="true"] {
  color: white;
  background: var(--teal-dark);
  box-shadow: 0 6px 18px rgb(21 43 43 / 16%);
}

.comparison-score-stage {
  padding: clamp(20px, 4vw, 34px);
  border-radius: 22px;
  color: white;
  background:
    radial-gradient(circle at 88% -20%, rgb(66 166 155 / 42%), transparent 36%),
    var(--ink);
}

.stage-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.stage-heading p {
  margin: 0;
}

.stage-heading > div > p {
  color: #91d6ce;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.stage-heading h3 {
  margin: 7px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.stage-heading > p {
  max-width: 430px;
  color: rgb(255 255 255 / 62%);
  font-size: 0.76rem;
  line-height: 1.55;
}

.large-score-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.brand-score-card {
  position: relative;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 7%);
}

.brand-score-card.owned {
  border-color: #52c8bb;
  background: rgb(0 109 103 / 42%);
  box-shadow: inset 0 0 0 1px rgb(82 200 187 / 24%);
}

.brand-score-card.leader::after {
  position: absolute;
  right: 14px;
  top: 14px;
  color: #ffc48d;
  content: "◆";
  font-size: 0.7rem;
}

.brand-score-card.muted {
  opacity: 0.54;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  border-radius: 999px;
  color: #9ddbd4;
  background: rgb(0 0 0 / 20%);
  font-size: 0.7rem;
  font-weight: 850;
}

.brand-score-card p {
  margin: 24px 0 2px;
  color: rgb(255 255 255 / 72%);
  font-size: 0.78rem;
}

.brand-score-card > strong {
  display: block;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(3.2rem, 6vw, 5.1rem);
  letter-spacing: -0.09em;
  line-height: 1;
}

.brand-score-card small {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: rgb(255 255 255 / 48%);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-track {
  height: 5px;
  margin: 20px 0 12px;
  overflow: hidden;
  border-radius: 99px;
  background: rgb(255 255 255 / 12%);
}

.score-track i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: #58cabd;
}

.leader .score-track i {
  background: #ffa96c;
}

.delta {
  color: rgb(255 255 255 / 54%);
  font-size: 0.67rem;
  font-weight: 700;
}

.delta.positive {
  color: #a2e2da;
}

.delta.leader-label {
  color: #ffc48d;
}

.comparison-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.55fr);
  gap: 16px;
  margin-top: 18px;
}

.platform-matrix-card,
.gap-card {
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8f6ef;
}

.platform-matrix-card h3,
.gap-card h3 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.platform-matrix {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.matrix-row {
  display: grid;
  grid-template-columns: minmax(145px, 1.5fr) repeat(3, minmax(72px, 0.65fr));
  align-items: center;
  min-width: 500px;
  border-top: 1px solid #e3dfd3;
}

.platform-matrix {
  overflow-x: auto;
}

.matrix-row:first-child {
  border-top: 0;
}

.matrix-row > * {
  padding: 13px 14px;
  text-align: center;
}

.matrix-row > :first-child {
  text-align: left;
}

.matrix-head {
  color: var(--ink-soft);
  background: #eeeadf;
  font-size: 0.68rem;
}

.matrix-row:not(.matrix-head) strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
}

.owned-cell {
  color: var(--teal);
  background: rgb(0 109 103 / 7%);
}

.best-cell::after {
  margin-left: 3px;
  color: var(--orange);
  content: "↑";
  font-size: 0.68rem;
}

.platform-dot {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 8px;
  color: white;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 850;
}

.google-dot { background: #356fd0; }
.gemini-dot { background: #7358bd; }
.doubao-dot { background: #222b4f; }

.gap-card {
  color: white;
  background: var(--teal-dark);
}

.gap-card .step-label {
  color: #9edbd4;
}

.gap-card > p:not(.step-label) {
  color: rgb(255 255 255 / 66%);
  font-size: 0.82rem;
  line-height: 1.65;
}

.gap-meter {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.gap-meter span {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  font-size: 0.7rem;
}

.gap-meter i {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgb(255 255 255 / 14%);
}

.gap-meter i::after {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: #68d2c6;
  content: "";
}

.gap-meter span:nth-child(2) i::after {
  background: #ffac71;
}

.gap-card .secondary-button {
  width: 100%;
  color: var(--teal-dark);
  background: white;
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 18px;
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}

.preview-actions p {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .compare-hero {
    grid-template-columns: 1fr;
  }

  .fairness-note {
    max-width: 420px;
  }

  .shared-benchmark-strip,
  .competitor-input-grid,
  .large-score-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .comparison-preview-page .site-header {
    min-height: 116px;
    align-items: flex-start;
    padding-block: 20px;
  }

  .geocompare-brand {
    gap: 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .company-logo {
    width: 148px;
  }

  .product-lockup {
    padding-left: 0;
    border-left: 0;
  }

  .product-lockup small {
    white-space: normal;
  }

  .preview-badge {
    margin-top: 2px;
    font-size: 0.58rem;
  }

  .compare-hero {
    padding-top: 54px;
  }

  .compare-hero h1 br {
    display: none;
  }

  .shared-benchmark-strip,
  .competitor-input-grid,
  .large-score-row,
  .shared-question-preview ol {
    grid-template-columns: 1fr;
  }

  .stage-heading,
  .score-boundary-note,
  .preview-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-actions .primary-button {
    width: 100%;
  }

  .brand-score-card > strong {
    font-size: 4rem;
  }
}
