/* Last in the cascade: the directory is the homepage product surface. */
#rankings,
body.directory-first .lower #rankings {
  background: #111c22 !important;
  color: #eff3e8 !important;
  border-color: #32433e !important;
  border-radius: 0 !important;
}
#rankings .directory-launchbar {
  min-height: 48px;
  grid-template-columns: minmax(105px, 1fr) auto 40px !important;
  background: #23362f !important;
  border-color: #3b5546 !important;
}
#rankings .directory-sales,
#rankings .section-head,
#rankings .directory-summary > div,
#rankings .rank-card,
#rankings .directory-empty {
  background: #14232a !important;
  color: #eff3e8 !important;
}
#rankings .directory-sales { padding: 6px 10px !important; }
#rankings .directory-sales span {
  font: 700 9px/1.1 "DM Mono", monospace !important;
  letter-spacing: .05em;
  color: #aabdae !important;
}
#rankings .directory-sales strong {
  font: 800 20px/1.1 "DM Mono", monospace !important;
  color: #d9f37d !important;
}
#rankings .directory-sales small {
  display: block !important;
  margin-top: 4px !important;
  font: 600 9px/1.3 "DM Mono", monospace !important;
  letter-spacing: 0 !important;
  color: #c5d2c4 !important;
  white-space: normal !important;
}
#rankings .directory-top-claim {
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: #d9f37d !important;
  color: #14231b !important;
  padding: 6px 12px !important;
  font: 800 11px/1.1 Inter, system-ui, sans-serif !important;
  white-space: normal !important;
}
#rankings .directory-top-claim b { color: #14231b !important; }
#rankings .directory-city { border-radius: 0 !important; background: #2a453a !important; color: #e7f5d9 !important; }
#rankings .directory-activity {
  position: sticky;
  top: 56px;
  z-index: 5;
  min-height: 34px;
  padding: 7px 10px !important;
  background: #c8ee78 !important;
  color: #1c2c20 !important;
  border-color: #92b351 !important;
  font-size: 11px !important;
}
#rankings .directory-activity time { color: #344824 !important; font-size: 9px !important; }
#rankings .section-head,
#rankings .directory-list-heading { border-color: #354740 !important; }
#rankings .section-head h2,
#rankings .rank-info button,
#rankings .directory-empty strong { color: #f4f4e9 !important; }
#rankings .section-head label,
#rankings .rank-info p,
#rankings .rank-meta,
#rankings .legal-note,
#rankings .directory-empty p { color: #a9b9b1 !important; }
#rankings .directory-list-heading { background: #1c3030 !important; color: #b3c9ae !important; }
#rankings .directory-list-heading strong,
#rankings .directory-summary strong,
#rankings .rank-actions strong { color: #d9f37d !important; }
#rankings .directory-summary { background: #354740 !important; border-color: #354740 !important; }
#rankings .directory-summary > div { border-radius: 0 !important; }
#rankings .directory-summary span { color: #aabdae !important; }
#rankings .rank-card {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #34433e !important;
  border-radius: 0 !important;
  overflow: hidden;
}
#rankings .rank-card:hover { background: #1b3034 !important; }
#rankings .rank-number { background: #d9f37d !important; color: #19271e !important; }
#rankings .rank-info { border-color: #34433e !important; }
#rankings .rank-actions { border-color: #34433e !important; }
#rankings .rank-actions:before,
#rankings .rank-actions button,
#rankings .rank-actions a { border-color: #34433e !important; }
#rankings .rank-actions button,
#rankings .rank-actions a {
  background: transparent !important;
  color: #d9f37d !important;
  border-radius: 0 !important;
}
#rankings .rank-actions strong small { color: #a3b3aa !important; }
#rankings .avenue-brand { color: #aabdae !important; }
#rankings .directory-summary[hidden] { display: none !important; }
/* Desktop rail: never collapse to a ~120px clipped sliver across common widths. */
@media (min-width: 701px) {
  .lower #rankings,
  body.directory-first .lower #rankings,
  #rankings.leaderboard {
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 392px !important;
    min-width: 360px !important;
    max-width: min(410px, 44vw) !important;
    transform: none !important;
    border-right: 1px solid #354740 !important;
    box-shadow: 8px 0 32px #0a171733 !important;
    border-radius: 0 !important;
  }
  /* Prefer display:none hide — slide-off transform left a thin clipped remnant. */
  .panel-hidden .leaderboard,
  .panel-hidden #rankings {
    transform: none !important;
  }
}
@media (max-width: 700px) {
  body.directory-first .lower #rankings {
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    border: 0 !important;
  }
  #rankings .directory-launchbar { grid-template-columns: 100px minmax(0, 1fr) 40px !important; }
  #rankings .directory-top-claim { font-size: 10px !important; }
  #rankings .rank-card { margin: 0 !important; }
}


/* 90% polish pass: clearer live metrics and stronger interaction hierarchy. */
.avenue-stat-label {
  color: #c4d0c7;
  font: 700 8px/1 Inter, system-ui, sans-serif;
  letter-spacing: .09em;
}
.avenue-stat-cell { gap: 7px !important; }
#rankings .rank-card { position: relative; }
#rankings .rank-logo {
  box-shadow: 0 4px 16px rgba(2, 10, 7, .22);
}
#rankings .rank-info button:focus-visible,
#rankings .rank-actions button:focus-visible,
#rankings .rank-actions a:focus-visible {
  outline: 2px solid #d9f37d !important;
  outline-offset: -2px !important;
}
@media (max-width: 700px) {
  .avenue-stat-label { font-size: 7px; }
  .avenue-stat-cell { gap: 5px !important; padding: 0 5px !important; }
  #rankings .directory-launchbar {
    padding-top: env(safe-area-inset-top);
  }
  #rankings .rank-actions button,
  #rankings .rank-actions a {
    min-height: 44px;
  }
}


/* Let the skyline arrive before the directory and drag hint. */
@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
  .skyline-arrival #rankings { animation: arrival-reveal .28s ease-out .9s both; }
  .skyline-arrival .map-hint { animation: arrival-reveal .28s ease-out 1.1s both; }
}
@keyframes arrival-reveal { from { opacity: 0; visibility: hidden; pointer-events: none; } to { opacity: 1; visibility: visible; pointer-events: auto; } }
#rankings .section-head { padding: 8px 10px !important; }
#rankings .section-head h2 { font-size: 14px !important; }
#rankings .directory-tools { padding: 8px 10px !important; }
#rankings .directory-list-heading { padding: 7px 10px !important; }
#rankings .directory-details { border-top: 1px solid #32433e; }
#rankings .directory-details > summary { padding: 14px 10px; cursor: pointer; font-size: 12px; }
#rankings .directory-details .avenue-claim { display: none !important; }

#rankings .rank-info { min-width: 0 !important; }
#rankings .rank-info button { white-space: normal !important; overflow-wrap: anywhere !important; max-width: 100% !important; text-align: left !important; }

#rankings .rank-card.address-row .rank-top { grid-template-columns: 52px minmax(0, 1fr) !important; }


/* Restored compact leaderboard. Keep the existing city/rail positioning contract. */
body #rankings.restored-leaderboard {
  background:#0e1b16!important;color:#f1f3e9!important;
  scrollbar-color:#637568 #0e1b16;
}
body #rankings.restored-leaderboard .directory-brand {display:none!important}
body #rankings.restored-leaderboard .directory-launchbar {
  position:static!important;grid-template-columns:minmax(100px,1fr) minmax(0,1.6fr) 44px!important;
  min-height:56px;background:#13221b!important;border-bottom:1px solid #3b4b3c!important;
}
body #rankings.restored-leaderboard .directory-sales {padding:8px 12px!important;background:#13221b!important}
body #rankings.restored-leaderboard .directory-sales span {font-size:10px!important;line-height:1.2!important;letter-spacing:.06em}
body #rankings.restored-leaderboard .directory-sales strong {font-size:23px!important;line-height:1.2!important;overflow-wrap:anywhere}
body #rankings.restored-leaderboard .directory-top-claim {
  margin:7px 4px!important;padding:7px!important;background:#243429!important;color:#f1f3e9!important;
  border-radius:7px!important;font-size:12px!important;line-height:1.2!important;
}
body #rankings.restored-leaderboard .directory-top-claim b {color:#d9f37d!important;white-space:nowrap}
body #rankings.restored-leaderboard .directory-city {min-height:44px;background:#d9f37d!important;color:#14231b!important;font-size:23px!important}
body #rankings.restored-leaderboard .directory-activity {
  position:static!important;display:grid!important;grid-template-columns:6px minmax(0,1fr) auto auto;
  gap:6px;min-height:44px;padding:7px 10px!important;background:#cfe785!important;
  color:#20301c!important;font-size:12px!important;line-height:1.35!important;
}
body #rankings.restored-leaderboard #directoryActivity {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body #rankings.restored-leaderboard #directoryActivityTime {white-space:nowrap;font-size:9px!important}
body #rankings.restored-leaderboard #nextDirectoryActivity {width:32px;min-height:32px;padding:0;border:1px solid #667b35;border-radius:5px;background:transparent;color:#21311b;font-size:23px;cursor:pointer}
body #rankings.restored-leaderboard #nextDirectoryActivity[hidden] {display:none!important}
body #rankings.restored-leaderboard .directory-activity[data-state="error"] {background:#d8d9bc!important}
body #rankings.restored-leaderboard .section-head {
  position:static!important;display:flex!important;flex-wrap:wrap!important;gap:7px!important;padding:8px 10px!important;background:#122219!important;
}
body #rankings.restored-leaderboard .section-head h2 {font-size:12px!important;flex:1;min-width:100px}
body #rankings.restored-leaderboard .section-head label {font-size:10px!important;min-width:0!important;flex:0 1 auto!important;display:flex!important;gap:4px;align-items:center}
body #rankings.restored-leaderboard .section-head select {min-width:0;max-width:120px;font-size:10px!important;min-height:32px}
body #rankings.restored-leaderboard #closeDirectory {min-width:36px;min-height:36px;background:#24372b;color:#eff3e8}
body #rankings.restored-leaderboard .directory-filters {background:#102018;border-bottom:1px solid #34453a}
body #rankings.restored-leaderboard .directory-filters>summary {padding:10px 12px;color:#bccbbb;font-size:11px;cursor:pointer}
body #rankings.restored-leaderboard .directory-tools {border:0;background:#102018!important}
body #rankings.restored-leaderboard .live-strip {padding:8px 10px;font-size:10px;background:#14251b!important;color:#adbfa8!important;border-color:#34453a}
body #rankings.restored-leaderboard .directory-list-heading {gap:8px;flex-wrap:wrap;background:#102018!important;font-size:8px!important}
body #rankings.restored-leaderboard .directory-discovery {flex-wrap:wrap;gap:8px}
body #rankings.restored-leaderboard #randomBusiness {min-height:32px;background:#223729;color:#d9f37d;border-color:#435b3b;font-size:8px}
body #rankings.restored-leaderboard .directory-block {margin:0;padding:10px 12px;color:#cbd9be;font-size:10px;background:#112018;border-bottom:1px solid #304333}
body #rankings.restored-leaderboard .directory-block small {display:none}
body #rankings.restored-leaderboard .rank-card {background:#0e1b16!important;border-color:#2e4132!important;transform:none!important}
body #rankings.restored-leaderboard .rank-card:hover {background:#15251c!important}
body #rankings.restored-leaderboard .business-row .rank-top {grid-template-columns:28px 72px minmax(0,1fr)!important;align-items:stretch!important;min-height:142px!important}
body #rankings.restored-leaderboard .rank-number {margin-top:12px;padding:4px!important;font:800 9px/1 "DM Mono",monospace!important;align-self:start!important}
body #rankings.restored-leaderboard .business-logo {align-self:center;width:64px;height:64px;margin:8px 4px;border:1px solid #b3c6ad;border-radius:11px;box-sizing:border-box}
body #rankings.restored-leaderboard .rank-info {padding:13px 10px 11px!important;border-color:#2e4132!important}
body #rankings.restored-leaderboard .rank-info button {font:750 15px/1.3 Inter,system-ui,sans-serif!important;color:#f2f3ec!important}
body #rankings.restored-leaderboard .rank-info p {font-size:12px!important;line-height:1.45!important;color:#a0b2a1!important;margin:6px 0 9px!important}
body #rankings.restored-leaderboard .rank-meta {gap:5px 8px!important;font-size:9px!important;color:#9eb399!important}
body #rankings.restored-leaderboard .rank-actions {display:grid!important;grid-template-columns:minmax(0,1fr) 116px!important;min-height:76px!important;border-color:#2e4132!important}
body #rankings.restored-leaderboard .rank-actions:before {display:none!important}
body #rankings.restored-leaderboard .directory-action-stack {display:grid!important;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr)!important;gap:0!important;padding:0!important}
body #rankings.restored-leaderboard .rank-actions a,
body #rankings.restored-leaderboard .rank-actions button {min-height:44px!important;padding:7px!important;margin:0!important;line-height:1.3!important;font-size:9px!important;text-align:center!important;background:transparent!important;color:#bcd0b2!important;border:0!important;border-right:1px solid #2e4132!important;border-radius:0!important}
body #rankings.restored-leaderboard .rank-actions strong {font:800 24px/1 "DM Mono",monospace!important;color:#d9f37d!important;border:0!important}
body #rankings.restored-leaderboard .rank-actions strong small {font-size:10px!important;letter-spacing:.12em;color:#95a990!important}
body #rankings.restored-leaderboard .founding-business {font-size:8px!important}
body #rankings.restored-leaderboard button:focus-visible,
body #rankings.restored-leaderboard a:focus-visible,
body #rankings.restored-leaderboard summary:focus-visible {outline:2px solid #d9f37d!important;outline-offset:-3px!important}
@media(max-width:700px), (max-height:520px) and (hover:none) and (pointer:coarse) {
  html body #rankings.restored-leaderboard .directory-launchbar {grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px!important}
  body #rankings.restored-leaderboard .directory-sales {padding:7px!important}
  body #rankings.restored-leaderboard .directory-sales strong {font-size:20px!important}
  body #rankings.restored-leaderboard .directory-top-claim {font-size:10px!important}
  html body #rankings.restored-leaderboard .section-head {display:grid!important;grid-template-columns:minmax(0,1fr) 44px!important}
  body #rankings.restored-leaderboard #closeDirectory {width:44px!important;height:44px!important}
  html body #rankings.restored-leaderboard .section-head label {grid-column:1/-1!important;width:100%;min-height:36px}
  html body #rankings.restored-leaderboard .section-head select {max-width:none;flex:1;min-height:36px}
  body #rankings.restored-leaderboard .business-row .rank-top {grid-template-columns:24px 52px minmax(0,1fr)!important;min-height:146px!important}
  body #rankings.restored-leaderboard .business-logo {width:46px;height:46px;margin:10px 3px}
  body #rankings.restored-leaderboard .rank-info {padding:11px 8px!important}
  body #rankings.restored-leaderboard .rank-info button {font-size:13px!important}
  body #rankings.restored-leaderboard .rank-info p {font-size:11px!important}
  body #rankings.restored-leaderboard .rank-actions {grid-template-columns:minmax(0,1fr) 76px!important}
  body #rankings.restored-leaderboard .rank-actions strong {font-size:21px!important}
  body #rankings.restored-leaderboard .rank-actions a,body #rankings.restored-leaderboard .rank-actions button {font-size:8px!important}
  body #rankings.restored-leaderboard #nextDirectoryActivity {min-height:44px;width:32px}
}

.leaderboard-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

body #rankings.restored-leaderboard #directorySales[data-state="error"]{font-size:12px!important;line-height:1.5!important;overflow-wrap:normal!important;word-break:normal!important}
