/* Songpa apartment trade-price pages (generated by scripts/songpa_apt_prices.py). */

.ap-hero h1 {
  margin: 0.4rem 0 1rem;
  color: var(--lr-navy);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.ap-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.ap-stats .lr-stat-pill {
  min-height: 112px;
}

.ap-stats .lr-stat-pill strong {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

.ap-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--lr-border);
  border-radius: var(--lr-radius-sm);
  background: var(--lr-surface);
}

.ap-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ap-table th,
.ap-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--lr-border);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.ap-table thead th {
  background: var(--lr-panel);
  color: var(--lr-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.ap-table tbody tr:last-child th,
.ap-table tbody tr:last-child td {
  border-bottom: 0;
}

.ap-table tbody th {
  color: var(--lr-navy);
  font-weight: 700;
}

.ap-table a {
  color: var(--lr-navy);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.ap-table small {
  display: block;
  margin-top: 2px;
  color: var(--lr-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.ap-group-title {
  margin: 2rem 0 0.8rem;
  color: var(--lr-navy);
  font-size: 1.25rem;
}

.ap-group-title:first-of-type {
  margin-top: 0;
}

.ap-group-title.ap-subhead {
  margin-top: 2rem;
}

.ap-table td.ap-wrap {
  white-space: normal;
  word-break: keep-all;
}

.ap-bars {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  height: 200px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-bars li {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
  min-width: 0;
}

.ap-bar {
  display: block;
  width: 100%;
  max-width: 34px;
  height: var(--h);
  min-height: 2px;
  border-radius: 6px 6px 0 0;
  background: var(--lr-navy);
}

.ap-bars strong {
  order: -1;
  color: var(--lr-navy);
  font-size: 0.8rem;
}

.ap-bars small {
  color: var(--lr-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.ap-links {
  margin-top: 1.2rem;
  color: var(--lr-muted);
}

.ap-links a,
.ap-siblings a {
  color: var(--lr-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

.ap-siblings li {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--lr-border);
  border-radius: var(--lr-radius-sm);
  background: var(--lr-surface);
}

.ap-siblings span {
  color: var(--lr-muted);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .ap-siblings {
    grid-template-columns: 1fr;
  }

  .ap-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .ap-stats .lr-stat-pill {
    min-height: 0;
    padding: 14px;
    border-radius: 16px;
  }

  .ap-stats .lr-stat-pill strong {
    font-size: 1.25rem;
  }

  .ap-table th,
  .ap-table td {
    padding: 10px 8px;
  }

  .ap-table--compact {
    min-width: 0;
    font-size: 0.88rem;
  }

  .ap-bars {
    gap: 3px;
    height: 160px;
  }

  .ap-bars strong {
    font-size: 0.7rem;
  }

  .ap-bars small {
    font-size: 0.65rem;
  }
}
