.compare-intro{margin-bottom:2rem}
h2.compare-header{margin:0 0 .5rem;padding:0;border:0;color:#263846}
.compare-intro p{margin:0;color:#61727e;font-size:1.5rem;line-height:1.5}
.compare-add-shortcut{display:none;padding:.8rem 1.2rem;border:1px solid #79aeb9;border-radius:.8rem;background:#fff;color:#177e93;font-size:1.3rem;font-weight:700;cursor:pointer}
.compare-add-shortcut:hover{background:#eaf8fa}
.compare-table-scroll{width:100%;overflow-x:auto;border:1px solid #dce7eb;border-radius:1.4rem;background:#fff;box-shadow:0 1.2rem 3.5rem rgba(31,66,80,.08);scrollbar-color:#a7c2ca #f1f6f7}
.compare-results{width:100%;min-width:68rem;margin:0;border:0;border-collapse:separate;border-spacing:0;table-layout:fixed}
.compare-results:has(tr#liv td:nth-child(5)){min-width:84rem}
.compare-results:has(tr#liv td:nth-child(6)){min-width:100rem}
.compare-results tr[id]{display:none}
.compare-results tr#liv{display:table-row}
.compare-results td{padding:1.6rem 1.4rem;border:0;border-bottom:1px solid #e7eef0;background:#fff;text-align:center;vertical-align:top}
.compare-results tr:last-child td{border-bottom:0}
.compare-results td:first-child{position:sticky;left:0;z-index:2;width:22rem;min-width:22rem;background:#fff;text-align:left;box-shadow:1px 0 #e7eef0}
.compare-results tr#liv td{position:relative;padding-top:1.7rem;padding-bottom:1.7rem;background:#f4f8f9;color:#314957;font-size:1.3rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;vertical-align:middle}
.compare-results tr#liv td:first-child{position:sticky;z-index:3;background:#f4f8f9}
.compare-results tr#liv td:not(:first-child):not(:last-child){padding-right:3rem}
.compare-results tr:not([id]):hover td{background:#fbfdfd}
.compare-results tr[id]:target+tr td{background:#f9fcfc}
.compare-results tr[id]+tr td:first-child>span{position:relative;display:flex;align-items:center;min-height:5.8rem;padding-right:2rem;gap:.6rem;color:#263d49;font-size:1.3rem;font-weight:700;line-height:1.3;cursor:pointer}
.compare-results tr[id]+tr td:first-child>span::before{content:'';flex:0 0 7.2rem;width:7.2rem;height:5.8rem;border-radius:1.2rem;background:#2f80b0}
.compare-results tr[id]+tr td:first-child>span i{position:absolute;top:-.1rem;left:.6rem;width:6rem;height:6rem;background:url(/images/city-compare-score-sprite.png) no-repeat 50% 0;transform:scale(.8);pointer-events:none}
.compare-results tr#liv+tr td:first-child i{background-position:50% -700px}
.compare-results tr#liv+tr td:first-child>span{min-height:9rem}
.compare-results tr#liv+tr td:first-child>span::before{height:9rem}
.compare-results tr#liv+tr td:first-child i{top:2rem}
.compare-results tr#ams+tr td:first-child i{background-position:50% 0}
.compare-results tr#col+tr td:first-child i{background-position:50% -100px}
.compare-results tr#cri+tr td:first-child i{background-position:50% -200px}
.compare-results tr#edu+tr td:first-child i{background-position:50% -300px}
.compare-results tr#emp+tr td:first-child i{background-position:50% -400px}
.compare-results tr#hou+tr td:first-child i{background-position:50% -500px}
.compare-results tr#usr+tr td:first-child i{background-position:50% -600px}
.compare-results tr[id]+tr td:first-child>span::after{content:'';position:absolute;right:.4rem;top:50%;width:.8rem;height:.8rem;border-right:2px solid #75919d;border-bottom:2px solid #75919d;transform:translateY(-65%) rotate(45deg);transition:transform .2s ease}
.compare-results tr[id]:target+tr td:first-child>span::after{transform:translateY(-25%) rotate(225deg)}
.compare-results tr[id]+tr:focus-visible,.compare-results tr#liv td:focus-visible,.compare-results button:focus-visible,.compare-table-scroll:focus-visible{outline:3px solid #137c91;outline-offset:-3px}
.compare-results tr:not([id]) td:not(:first-child)>span{position:relative;display:inline-flex;align-items:center;justify-content:center;width:7.2rem;min-height:5.8rem;border-radius:1.2rem;color:#fff;font-size:2.8rem;font-weight:700;line-height:1}
.compare-results tr#liv+tr td:not(:first-child)>span{min-height:9rem;padding-top:1.6rem;background:transparent url(/images/liv-shield.png) no-repeat center center;background-size:6.8rem auto;color:#fff;font-size:2.7rem}
.compare-results:has(tr#liv td:last-child:empty) tr:not([id]) td:last-child{background:#f8fbfc}
.compare-results:has(tr#liv td:last-child:empty) tr:not([id]) td:last-child>span:empty{display:none}
.compare-results td>span var{position:absolute;top:-.8rem;right:-3.5rem;width:6.2rem;height:2.3rem;border:1px solid #bedcc9;border-radius:.6rem;background:#f4faf6;box-shadow:0 2px 4px rgba(25,62,40,.12);color:#315f45;font-size:1rem;font-style:normal;font-weight:800;letter-spacing:.04em;line-height:2.1rem;white-space:nowrap}
.compare-results td>span var::after{content:'★ BEST'}
.compare-results ol,.compare-results ul{display:none;margin:1.7rem 0 0;padding:0;list-style:none;color:#445762;font-size:1.3rem;line-height:1.45}
.compare-results li{min-height:3.5rem;padding:.7rem 0;border-top:1px solid #e6edef}
.compare-results td:first-child li{font-weight:600}
.compare-results td:not(:first-child) li{font-variant-numeric:tabular-nums}
.compare-results td a{display:none;margin-top:1.3rem;color:#137e98;font-size:1.3rem;font-weight:700;line-height:1.4;text-decoration:none}
.compare-results td a::before{content:'Explore '}
.compare-results td a::after{content:' data →'}
.compare-results td a:hover{text-decoration:underline}
.compare-results tr[id]:target+tr ol,.compare-results tr[id]:target+tr ul,.compare-results tr[id]:target+tr td a{display:block}
.compare-results tr[id]:target+tr td a{min-height:2.2rem}
.compare-results tr#liv td:empty{cursor:pointer}
.compare-results tr#liv td:empty::after{content:'+ Add a city';display:inline-block;padding:.8rem .6rem;border:1px dashed #79aeb9;border-radius:.8rem;background:#fff;color:#177e93;font-size:1.2rem;font-weight:700;letter-spacing:0;text-transform:none;white-space:nowrap}
.compare-results tr#liv td:empty:hover::after{background:#eaf8fa}
.compare-results:has(tr#liv td:last-child:empty) tr#liv td:last-child{width:14rem}
.compare-results tr#liv td em{position:absolute;top:50%;right:.8rem;display:flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;border-radius:50%;background:transparent;color:#768d98;font-size:1.8rem;font-style:normal;line-height:1;transform:translateY(-50%);cursor:pointer}
.compare-results tr#liv td em::after{content:'×'}
.compare-results tr#liv td em:hover{background:#e5eef1;color:#263846}
#compare-place-form{position:fixed;z-index:100;display:none;width:min(32rem,calc(100vw - 2rem));margin:0;padding:1.6rem;border:1px solid #d8e5e9;border-radius:1.2rem;background:#fff;box-shadow:0 1.6rem 4rem rgba(31,66,80,.2)}
#compare-place-form label{display:block;margin-bottom:1rem;color:#29414d;font-size:1.4rem;font-weight:700}
.compare-place-input-row{display:flex;gap:.5rem}
#compare-place-form input{flex:1;min-width:0;margin:0;padding:1rem;border:1px solid #a6bbc3;border-radius:.7rem;font-size:1.4rem}
#compare-place-form ul{display:none;max-height:25rem;overflow-y:auto;margin:1rem 0 0;padding:.4rem;border:1px solid #e4edef;border-radius:.7rem;list-style:none}
#compare-place-form ul li{margin:0;padding:.8rem 1rem;border-radius:.5rem;color:#29414d;cursor:pointer}
#compare-place-form ul li:hover,#compare-place-form ul li.h{background:#e8f6f8}
@media(max-width:700px){.compare-intro{margin-bottom:1.5rem}.compare-add-shortcut:not([hidden]){display:inline-flex;margin-top:1.2rem}.compare-results td{padding:1.3rem 1rem}.compare-results td:first-child{width:22rem;min-width:22rem}.compare-results ol,.compare-results ul{font-size:1.2rem}}
