/* Rankings, the rank lookup and the price tracker (insights app). Mobile first, lux.css tokens. */

.rank-page .visually-hidden,
.price-history .visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.rank-note {
  margin: 0 0 20px; padding: 12px 14px; border-left: 3px solid var(--lux-gold);
  background: var(--lux-ivory); color: var(--lux-ink); font-size: 14px; line-height: 1.5;
}
.rank-note a { color: var(--lux-ink); text-decoration: underline; }

.rank-table td, .rank-table th { vertical-align: top; }
.rank-table td:first-child { font-variant-numeric: tabular-nums; }
.rank-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border: 1px solid var(--lux-rule);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lux-text-mute);
}

.rank-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; padding: 0; list-style: none; }
.rank-links a { color: var(--lux-ink); text-decoration: underline; text-underline-offset: 3px; }

.rank-cards { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rank-cards a {
  display: block; padding: 14px 16px; border: 1px solid var(--lux-rule); color: var(--lux-ink);
  font-family: var(--lux-serif); font-size: 20px; text-decoration: none;
}
.rank-cards a:hover { border-color: var(--lux-gold); }

.rank-search label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--lux-ink); }
.rank-search__row, .price-watch__row { display: flex; flex-wrap: wrap; gap: 10px; }
.rank-search input, .price-watch input[type="email"] {
  flex: 1 1 220px; min-width: 0; padding: 12px 14px; border: 1px solid var(--lux-rule);
  font-size: 16px; background: #fff; color: var(--lux-ink);
}

.rank-result .lux-h2 a { color: var(--lux-ink); }
.rank-list { margin: 16px 0 24px; padding: 0; list-style: none; border-top: 1px solid var(--lux-rule); }
.rank-list li {
  display: grid; grid-template-columns: auto auto 1fr; gap: 4px 10px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--lux-rule);
}
.rank-list__pos { font-family: var(--lux-serif); font-size: 28px; color: var(--lux-ink); }
.rank-list__of { color: var(--lux-text-mute); font-size: 14px; white-space: nowrap; }
.rank-list__label a { color: var(--lux-ink); text-decoration: underline; text-underline-offset: 3px; }
.rank-service h3 { margin: 0 0 4px; font-size: 16px; }
.rank-matches { margin: 0; padding: 0; list-style: none; }
.rank-matches li { padding: 10px 0; border-bottom: 1px solid var(--lux-rule); }
.rank-matches a { color: var(--lux-ink); font-weight: 600; }

/* The line in a yacht page's dark hero */
.rank-line { margin: 14px 0 0; font-size: 14px; color: var(--lux-mute); }
.rank-line strong { color: #fff; }
.rank-line a { color: var(--lux-gold-soft); }

/* Price history panel and price pages */
.price-cut { color: #8a2c1d; white-space: nowrap; }
.price-rise { color: var(--lux-ink); white-space: nowrap; }
.price-cut span { color: var(--lux-text-mute); }
.price-history__sold { padding: 10px 14px; background: var(--lux-ivory); border-left: 3px solid var(--lux-gold); }
.price-chart { margin: 12px 0 18px; color: var(--lux-gold); }
.price-chart svg { display: block; width: 100%; max-width: 560px; height: 140px; background: var(--lux-ivory); }
.price-chart circle { fill: var(--lux-ink); }
/* The yacht page doesn't load lux-directory.css, so the panel styles its own table. */
.price-history .lux-dir-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--lux-rule); background: #fff; }
.price-history__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-history__table th, .price-history__table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--lux-rule); white-space: nowrap; }
.price-history__table th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lux-text-mute); }
.price-history .lux-empty { color: var(--lux-text-mute); }
.price-watch { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--lux-rule); }
.price-watch label { display: block; margin-bottom: 8px; font-weight: 600; }

.rank-page a:focus-visible, .price-history a:focus-visible,
.rank-search input:focus-visible, .price-watch input:focus-visible,
.rank-page button:focus-visible, .price-history button:focus-visible {
  outline: 2px solid var(--lux-gold); outline-offset: 2px;
}

@media (min-width: 720px) {
  .rank-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  .rank-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .rank-page *, .price-history * { transition: none !important; }
}
