/* Stage D2: property rates, notices, Tricity guide */
.hts-mkt { max-width: 1100px; margin: 0 auto; }
.hts-mkt-lead { font-size: 1.02rem; color: var(--hts-muted); max-width: 46rem; line-height: 1.55; }
.hts-mkt-note {
  background: #fff8e6; border: 1px solid #efd7a0; color: #5c4708;
  border-radius: 10px; padding: 12px 14px; font-size: .9rem; line-height: 1.5; margin: 14px 0 18px;
}
.hts-mkt-hubs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.hts-mkt-hubs a {
  display: inline-flex; align-items: center; border: 1px solid var(--hts-line);
  border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 700;
  background: #fff; color: var(--hts-ink);
}
.hts-mkt-hubs a:hover, .hts-mkt-hubs a.is-on { background: var(--hts-teal); border-color: var(--hts-teal); color: #fff; }
.hts-mkt-method, .hts-mkt-panel {
  background: #fff; border: 1px solid var(--hts-line); border-radius: var(--hts-radius);
  padding: 16px 18px; margin: 0 0 18px;
}
.hts-mkt-method h2, .hts-mkt-panel h2, .hts-mkt-city h2 { margin: 0 0 10px; font-size: 1.15rem; }
.hts-mkt-method > summary {
  font-weight: 800; font-size: 1.05rem; cursor: pointer; list-style: none;
}
.hts-mkt-method > summary::-webkit-details-marker { display: none; }
.hts-mkt-method > summary::after { content: " ▾"; font-size: .75em; color: var(--hts-muted); }
.hts-mkt-method[open] > summary { margin-bottom: 10px; }
.hts-mkt-method ol, .hts-mkt-method ul { margin: 0; padding-left: 1.2rem; color: var(--hts-muted); font-size: .9rem; line-height: 1.55; }
.hts-mkt-table-wrap { width: 100%; overflow-x: auto; margin: 0 0 18px; }
.hts-mkt-table { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
.hts-mkt-table th, .hts-mkt-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hts-line); vertical-align: top; }
.hts-mkt-table th { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--hts-muted); background: #f7f8fa; }
.hts-mkt-table td.num, .hts-mkt-table th.num { text-align: right; white-space: nowrap; }
.hts-mkt-table .range { color: var(--hts-muted); font-size: .85rem; }
.hts-mkt-cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.hts-notice-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: #fff; border: 1px solid var(--hts-line); border-radius: var(--hts-radius); padding: 14px 16px; margin: 12px 0 18px; max-width: 100%; }
.hts-notice-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; font-weight: 700; color: var(--hts-muted); flex: 1 1 140px; min-width: 0; }
.hts-notice-filters select { border: 1px solid var(--hts-line); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; max-width: 100%; box-sizing: border-box; }
.hts-notice-card {
  background: #fff; border: 1px solid var(--hts-line); border-radius: var(--hts-radius);
  padding: 16px 18px; margin: 0 0 12px; min-width: 0;
}
.hts-notice-card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.hts-notice-card h2 a { color: inherit; }
.hts-notice-meta { margin: 0 0 8px; color: var(--hts-muted); font-size: .85rem; }
.hts-notice-badge { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--hts-teal-soft); color: var(--hts-teal-dark); border-radius: 999px; padding: 3px 8px; margin-right: 6px; }
.hts-notice-body { margin: 0 0 8px; line-height: 1.55; }
.hts-notice-buy { margin: 0; padding: 10px 12px; background: #f4faf9; border-radius: 8px; font-size: .9rem; line-height: 1.5; }
.hts-tricity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.hts-tricity-card { background: #fff; border: 1px solid var(--hts-line); border-radius: var(--hts-radius); padding: 16px 18px; min-width: 0; }
.hts-tricity-card h2 { margin: 0 0 8px; font-size: 1.08rem; }
.hts-tricity-card p, .hts-tricity-card li { color: var(--hts-ink); font-size: .92rem; line-height: 1.55; }
.hts-mkt-faq details { border-top: 1px solid var(--hts-line); padding: 10px 0; }
.hts-mkt-faq summary { font-weight: 700; cursor: pointer; }
.hts-mkt-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 0; }
@media (max-width: 800px) {
  .hts-tricity-grid { grid-template-columns: 1fr; }
  .hts-mkt-table th, .hts-mkt-table td { padding: 8px 8px; font-size: .82rem; }
}
/* Stack rate rows on narrow screens so percentile figures are never clipped. */
@media (max-width: 700px) {
  .hts-mkt-table-wrap { overflow: visible; }
  .hts-mkt-table, .hts-mkt-table thead, .hts-mkt-table tbody, .hts-mkt-table tr, .hts-mkt-table th, .hts-mkt-table td {
    display: block; width: auto; max-width: 100%;
  }
  .hts-mkt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .hts-mkt-table { background: transparent; }
  .hts-mkt-table tr {
    background: #fff;
    border: 1px solid var(--hts-line);
    border-radius: 10px;
    margin: 0 0 8px;
    padding: 10px 12px;
  }
  .hts-mkt-table td, .hts-mkt-table td.num {
    border: 0;
    padding: 3px 0;
    text-align: left;
    white-space: normal;
  }
  .hts-mkt-table td:first-child { font-weight: 800; padding-bottom: 6px; }
  .hts-mkt-table td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 10.5em;
    color: var(--hts-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-right: 8px;
  }
  .hts-mkt-table .range { display: inline; }
}

/* Compact list view on /properties.php */
.hts-view-toggle { display: flex; gap: 0; border: 1px solid var(--hts-line); border-radius: 999px; overflow: hidden; }
.hts-view-toggle a {
  padding: 6px 12px; font-size: .8rem; font-weight: 800; color: var(--hts-ink); background: #fff; text-decoration: none;
}
.hts-view-toggle a.is-on { background: var(--hts-teal); color: #fff; }
.hts-quick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.hts-quick-chips a {
  display: inline-flex; align-items: center; border: 1px solid var(--hts-line); border-radius: 999px;
  padding: 5px 10px; font-size: .78rem; font-weight: 700; background: #fff; color: var(--hts-ink);
}
.hts-quick-chips a.is-on { background: var(--hts-teal-soft); border-color: var(--hts-teal); color: var(--hts-teal-dark); }
.hts-rows { display: flex; flex-direction: column; gap: 0; background: #fff; border: 1px solid var(--hts-line); border-radius: var(--hts-radius); overflow: hidden; }
.hts-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .7fr) minmax(0, .9fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hts-line);
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.hts-rows .hts-row:last-child { border-bottom: 0; }
.hts-row:hover { background: #f6fbfa; }
.hts-row-icon {
  width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(145deg, #0d3d40, #0d7377);
  color: #fff; display: grid; place-items: center; flex: 0 0 36px;
}
.hts-row-icon .hts-type-icon-svg { width: 18px; height: 18px; display: block; }
.hts-row-title { font-weight: 800; font-size: .92rem; color: var(--hts-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hts-row-meta, .hts-row-size { color: var(--hts-muted); font-size: .82rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hts-row-price { font-weight: 800; font-size: .92rem; min-width: 0; }
.hts-row-go { font-size: .8rem; font-weight: 800; color: var(--hts-teal); white-space: nowrap; }
@media (max-width: 820px) {
  .hts-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-columns: 36px minmax(0, 1fr) auto auto;
    grid-template-areas:
      "icon title title go"
      "icon meta  meta  go"
      "icon price size  go";
    gap: 2px 10px;
    padding: 10px 10px;
  }
  .hts-row-icon { grid-area: icon; align-self: start; }
  .hts-row-title { grid-area: title; white-space: normal; }
  .hts-row-meta { grid-area: meta; }
  .hts-row-size { grid-area: size; display: block; text-align: right; }
  .hts-row-price { grid-area: price; font-size: .88rem; }
  .hts-row-go { grid-area: go; align-self: center; }
}
/* Market nav group */
.hts-nav-group { position: relative; }
.hts-nav-group > summary {
  list-style: none; cursor: pointer; color: rgba(255,255,255,.88); font-weight: 700; font-size: inherit;
}
.hts-nav-group > summary::-webkit-details-marker { display: none; }
.hts-nav-group > summary::after { content: " ▾"; font-size: .75em; }
@media (min-width: 901px) {
  .hts-nav-group .hts-nav-sub {
    display: none; position: absolute; left: 0; top: 100%;
    background: #084244; border-radius: 10px; padding: 8px 0; min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 50;
  }
  .hts-nav-group[open] .hts-nav-sub, .hts-nav-group:hover .hts-nav-sub { display: flex; flex-direction: column; gap: 0; }
  .hts-nav-group .hts-nav-sub a { padding: 8px 14px; white-space: nowrap; }
}
@media (max-width: 900px) {
  .hts-nav-group { display: contents; }
  .hts-nav-group > summary { display: none; }
  .hts-nav-group .hts-nav-sub { display: contents; }
}

/* Stage D2b: corridor-style rates layout (original HTS styles) */
.hts-rates-hero {
  background: #fff;
  border: 1px solid var(--hts-line);
  border-radius: var(--hts-radius);
  padding: 22px 22px 18px;
  margin: 0 0 16px;
}
.hts-rates-kicker {
  margin: 0 0 6px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hts-teal);
}
.hts-rates-hero h1 { margin: 0 0 8px; }
.hts-rates-hero .hts-mkt-lead { margin: 0; }
.hts-rates-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}
.hts-rates-stat {
  background: #f4faf9;
  border: 1px solid var(--hts-line);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
}
.hts-rates-stat strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--hts-teal-dark, #0d3d40);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.hts-rates-stat span {
  display: block;
  margin-top: 4px;
  color: var(--hts-muted);
  font-size: .8rem;
  line-height: 1.35;
}
.hts-rates-map-block { margin: 0 0 22px; }
.hts-rates-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.hts-rates-map-toolbar h2 { margin: 0; font-size: 1.15rem; }
.hts-map-toggle {
  display: inline-flex;
  border: 1px solid var(--hts-line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.hts-map-toggle button {
  border: 0;
  background: #fff;
  padding: 6px 12px;
  font: inherit;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--hts-ink);
}
.hts-map-toggle button.is-on { background: var(--hts-teal); color: #fff; }
.hts-rates-map {
  width: 100%;
  height: 400px;
  background: #e8eef0;
  border: 1px solid var(--hts-line);
  border-radius: var(--hts-radius);
  overflow: hidden;
}
.hts-rates-map-fallback {
  margin: 0;
  padding: 24px 16px;
  color: var(--hts-muted);
  font-size: .95rem;
}
.leaflet-container img,
.leaflet-container img.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow { max-width: none !important; }
.hts-rates-map .leaflet-popup-content { font-size: .9rem; line-height: 1.45; margin: 10px 12px; }
.hts-rates-map .leaflet-popup-content a { color: var(--hts-teal); font-weight: 700; }

.hts-rate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.hts-rate-card {
  background: #fff;
  border: 1px solid var(--hts-line);
  border-radius: var(--hts-radius);
  padding: 14px 16px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hts-rate-card:hover { border-color: var(--hts-teal); }
.hts-rate-card-label {
  margin: 0;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hts-teal-dark, #0d3d40);
}
.hts-rate-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.hts-rate-card-range {
  margin: 6px 0 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hts-ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.hts-rate-card-range span {
  font-size: .8rem;
  font-weight: 700;
  color: var(--hts-muted);
  letter-spacing: 0;
}
.hts-rate-card-med { margin: 0; color: var(--hts-muted); font-size: .88rem; }
.hts-rate-card-go { margin: 4px 0 0; }
.hts-rate-card-go a { font-size: .9rem; font-weight: 800; color: var(--hts-teal); }
.hts-rate-card-note {
  margin: 8px 0 0;
  color: var(--hts-muted);
  font-size: .85rem;
  line-height: 1.45;
}
.hts-mkt-table-fold { margin-top: 8px; }

@media (max-width: 959px) {
  .hts-rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .hts-rates-stats { grid-template-columns: 1fr; }
  .hts-rates-hero { padding: 16px 14px 14px; }
  .hts-rates-stat strong { font-size: 1.15rem; }
}
@media (max-width: 639px) {
  .hts-rate-grid { grid-template-columns: 1fr; }
  .hts-rates-map { height: 260px; }
}
