/* Market snapshot pages */

.ms-hero {
    background: #fff;
    border-bottom: 1px solid #e4eaf2;
    padding: 44px 0 40px;
    color: #0d2340;
}

.ms-hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.ms-hero__eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #0b6f91;
    margin: 0 0 10px;
}

.ms-hero__title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: #0d2340;
    margin: 0 0 12px;
}

.ms-hero__sub {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: #52657c;
    max-width: 440px;
    margin: 0 0 24px;
}

.ms-btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    border: 0;
    transition: background-color .2s ease, transform .1s ease;
}

.ms-btn--light {
    background: #0d2340;
    color: #fff;
}

.ms-btn--light:hover,
.ms-btn--light:focus {
    background: #1190ba;
    color: #fff;
    text-decoration: none;
}

.ms-btn:active {
    transform: translateY(1px);
}

.ms-btn:focus-visible {
    outline: 3px solid #15b4e9;
    outline-offset: 2px;
}

.ms-ledger {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    padding: 4px 24px;
    border-radius: 12px;
    background: linear-gradient(150deg, #0b5a76, #1190ba);
    box-shadow: 0 10px 30px rgba(11, 90, 118, 0.18);
}

.ms-ledger__cell {
    padding: 20px 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ms-ledger__cell:nth-last-child(-n+2) {
    border-bottom: 0;
}

.ms-ledger__cell:nth-child(odd) {
    padding-right: 20px;
}

.ms-ledger__cell:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.ms-ledger dt {
    font-size: 13px;
    font-weight: 600;
    color: #7fd4f2;
    margin-bottom: 6px;
}

.ms-ledger dd {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.ms-ledger dd small,
.ms-side__figure small {
    font-size: 15px;
    font-weight: 500;
    opacity: .7;
    margin-left: 2px;
}

.ms-change {
    font-weight: 700;
    white-space: nowrap;
}

.ms-change__arrow {
    margin-right: 3px;
}

.ms-change--up { color: #1190ba; }
.ms-change--down { color: #d8433c; }
.ms-change--flat { color: #52657c; }

.ms-hero .ms-change--up { color: #15b4e9; }
.ms-hero .ms-change--down { color: #ff7a73; }
.ms-hero .ms-change--flat { color: #fff; }

.ms-page {
    padding-bottom: 8px;
}

.ms-h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: #0d2340;
    margin: 0 0 8px;
}

.ms-h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0d2340;
    margin: 0 0 6px;
}

.ms-lede {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: #52657c;
    max-width: 62ch;
    margin: 0 0 22px;
}

.ms-lede b {
    color: #0d2340;
    font-weight: 700;
}

.ms-more {
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    color: #1190ba;
}

.ms-more:hover,
.ms-more:focus {
    color: #0d2340;
}

/* A tinted band, so the top of the page is not one long white sheet */
.ms-trends {
    background: #f2f7fb;
    border-top: 1px solid #e4eaf2;
    border-bottom: 1px solid #e4eaf2;
    padding: 46px 0 40px;
    margin-bottom: 44px;
}

.ms-chart {
    margin: 0;
}

.ms-chart__plot {
    position: relative;
    height: 230px;
}

.ms-side .ms-chart__plot {
    height: 96px;
}


.ms-chart__plot::before,
.ms-chart__plot::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed #d6e0eb;
}

.ms-chart__plot::before { top: 12%; }
.ms-chart__plot::after { top: 88%; }

.ms-chart__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ms-chart__area {
    fill: rgba(21, 180, 233, 0.12);
}

.ms-chart__line {
    fill: none;
    stroke: #1190ba;
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.ms-chart__dot {
    position: absolute;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: #1190ba;
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(17, 144, 186, 0.35);
}

.ms-chart__tick {
    position: absolute;
    left: 8px;
    z-index: 1;
    font-size: 12px;
    font-weight: 600;
    color: #52657c;
    background: #f2f7fb;
    padding: 0 6px;
    line-height: 1;
    transform: translateY(-50%);
}

.ms-chart__tick--high { top: 12%; }
.ms-chart__tick--low { top: 88%; }

.ms-side .ms-chart__tick--low {
    display: none;
}

.ms-chart__mark {
    position: absolute;
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    border-radius: 50%;
    background: #1190ba;
    box-shadow: 0 0 0 2px #fff;
}

.ms-chart__plot {
    cursor: crosshair;
}

.ms-chart__hover {
    position: absolute;
    width: 11px;
    height: 11px;
    margin: -5.5px 0 0 -5.5px;
    border-radius: 50%;
    background: #0d2340;
    box-shadow: 0 0 0 3px #f2f7fb;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.ms-chart__rule {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #c3d6e4;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.ms-chart__tip {
    position: absolute;
    z-index: 3;
    padding: 7px 10px;
    border-radius: 8px;
    background: #0d2340;
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    margin-top: -14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.ms-chart__tip b {
    display: block;
    font-weight: 700;
    font-size: 15px;
}

.ms-chart.is-hovering .ms-chart__hover,
.ms-chart.is-hovering .ms-chart__rule,
.ms-chart.is-hovering .ms-chart__tip {
    opacity: 1;
}

.ms-chart__axis {
    position: relative;
    height: 16px;
    font-size: 12px;
    line-height: 16px;
    color: #52657c;
    margin-top: 8px;
}

.ms-chart__month {
    position: absolute;
    top: 0;
    white-space: nowrap;
    transform: translateX(-50%);
}

.ms-chart__month--start {
    transform: none;
}

.ms-chart__month--end {
    transform: translateX(-100%);
}

.ms-side {
    padding-top: 6px;
}

/* Price range inside the chart sidebar */
.ms-range__rows {
    margin: 0;
}

.ms-range__rows > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
}

.ms-range__rows dt {
    font-size: 14px;
    font-weight: 400;
    color: #52657c;
}

.ms-range__rows dd {
    font-size: 16px;
    font-weight: 700;
    color: #0d2340;
    font-variant-numeric: tabular-nums;
}

.ms-range__rows > div:nth-child(2) dd {
    color: #1190ba;
}

.ms-side__block {
    padding: 0 0 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #dbe6ef;
}

.ms-side__block:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}

.ms-side__figure {
    font-size: 26px;
    font-weight: 700;
    color: #0d2340;
    margin: 0 0 14px;
    font-variant-numeric: tabular-nums;
}

.ms-side__figure .ms-change {
    font-size: 14px;
    margin-left: 6px;
}

.ms-side__note {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: #33475e;
    margin: 0;
}

/* Month by month, as a strip instead of a table */
.ms-months {
    display: grid;
    grid-template-columns: repeat(13, minmax(0, 1fr));
    gap: 6px;
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    counter-reset: none;
}

.ms-months__item {
    padding: 10px 6px 11px;
    border-radius: 8px;
    border: 1px solid #dbe6ef;
    background: #fff;
    text-align: center;
}

.ms-months__month {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #52657c;
    margin-bottom: 4px;
}

.ms-months__value {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0d2340;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Tint runs with the value inside the year's own range */
.ms-months__item--t0 { background: #fff; }
.ms-months__item--t1 { background: rgba(21, 180, 233, 0.10); }
.ms-months__item--t2 { background: rgba(21, 180, 233, 0.20); }
.ms-months__item--t3 { background: rgba(21, 180, 233, 0.32); }

.ms-months__item.is-latest {
    border-color: #0d2340;
    box-shadow: inset 0 0 0 1px #0d2340;
}

@media (max-width: 1199px) {
    .ms-months {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ms-months {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
    }

    .ms-months__value {
        font-size: 12px;
    }
}

.ms-band {
    background: #fff;
    padding: 0 0 40px;
}

.ms-mix__bar {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    background: #e4eaf2;
    margin-bottom: 18px;
}

.ms-mix__seg + .ms-mix__seg {
    box-shadow: inset 2px 0 0 #fff;
}

.ms-mix__seg--c0 { background: #0d2340; }
.ms-mix__seg--c1 { background: #1190ba; }
.ms-mix__seg--c2 { background: #15b4e9; }
.ms-mix__seg--c3 { background: #7fd4f2; }
.ms-mix__seg--c4 { background: #9fb3c8; }
.ms-mix__seg--c5 { background: #c9d6e3; }

.ms-mix__legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 40px;
}

.ms-mix__legend li {
    display: flex;
    align-items: center;
    padding: 7px 0;
    font-size: 15px;
    font-weight: 400;
    color: #33475e;
}

.ms-mix__swatch {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 10px;
}

.ms-mix__label {
    flex: 1 1 auto;
}

.ms-mix__count {
    font-weight: 700;
    color: #0d2340;
    font-variant-numeric: tabular-nums;
}

.ms-range__track {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #bfe6f5 0%, #1190ba 100%);
    margin: 18px 0 16px;
}

.ms-range__marker {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    background: #0d2340;
    box-shadow: 0 0 0 3px #f5f8fc;
}

.ms-range__scale {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 0;
}

.ms-range__scale > div:last-child {
    text-align: right;
}

.ms-range__typical {
    position: absolute;
    top: 0;
    text-align: center;
    transform: translateX(-50%);
}

.ms-range__scale dt {
    font-size: 12px;
    font-weight: 600;
    color: #52657c;
}

.ms-range__scale dd {
    font-size: 17px;
    font-weight: 700;
    color: #0d2340;
    font-variant-numeric: tabular-nums;
}

.ms-range__typical dd {
    color: #1190ba;
}

/* Listings, neighborhoods, hazards */
.ms-listings {
    margin-bottom: 44px;
}

.ms-listings .nb-listings {
    margin-bottom: 8px;
}

.ms-local {
    padding-top: 36px;
    border-top: 1px solid #e4eaf2;
    margin-bottom: 44px;
}

.ms-hoods {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ms-hoods a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 14px;
    border: 1px solid #e4eaf2;
    border-radius: 8px;
    background: #fff;
    color: #0d2340;
    font-size: 15px;
    font-weight: 500;
    transition: border-color .2s ease;
}

.ms-hoods a:hover,
.ms-hoods a:focus {
    border-color: #15b4e9;
    text-decoration: none;
    color: #0d2340;
}

.ms-hoods__count {
    min-width: 28px;
    padding: 3px 7px;
    border-radius: 6px;
    background: #eaf6fb;
    color: #0b6f91;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ms-nearby__icon {
    color: #1190ba;
    margin-right: 10px;
}

.ms-nearby {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #e4eaf2;
}

.ms-nearby li {
    padding: 11px 2px;
    border-bottom: 1px solid #e4eaf2;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #0d2340;
}

.ms-nearby--wide {
    -webkit-column-count: 2;
    column-count: 2;
    -webkit-column-gap: 40px;
    column-gap: 40px;
    border-top: 0;
}

.ms-nearby--wide li {
    -webkit-column-break-inside: avoid;
    break-inside: avoid;
    border-top: 1px solid #e4eaf2;
    border-bottom: 0;
}

@media (max-width: 767px) {
    .ms-nearby--wide {
        -webkit-column-count: 1;
        column-count: 1;
    }
}

/* Expert quote */
.ms-quote {
    padding-top: 36px;
    border-top: 1px solid #e4eaf2;
    margin-bottom: 48px;
}

.ms-quote__body {
    margin: 14px 0 0;
    padding: 2px 0 2px 24px;
    border-left: 3px solid #15b4e9;
    font-size: inherit;
    max-width: 780px;
}

.ms-quote__body p {
    font-size: 19px;
    font-weight: 400;
    line-height: 1.6;
    color: #0d2340;
    margin: 0 0 16px;
}

.ms-quote__body footer {
    font-size: 14px;
    color: #52657c;
}

.ms-quote__body footer::before {
    content: none;
}

.ms-quote__name {
    display: block;
    font-style: normal;
    font-weight: 700;
    color: #0d2340;
    font-size: 15px;
}

/* Closing slab with the monthly alert signup */
.ms-slab {
    background: linear-gradient(160deg, #084258, #0b5a76);
    border-top: 3px solid #15b4e9;
    padding: 44px 0 40px;
    color: #fff;
}

.ms-slab__title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 10px;
}

.ms-slab__sub {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 20px;
}

.ms-alert__fields {
    display: grid;
    grid-template-columns: 1fr 1.3fr auto;
    gap: 12px;
    align-items: end;
}

.ms-alert__field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #7fd4f2;
    margin-bottom: 6px;
}

.ms-alert__field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: #0d2340;
    font-size: 16px;
    font-weight: 400;
}

.ms-alert__field input:focus {
    outline: 3px solid #15b4e9;
    outline-offset: 1px;
}

.ms-alert__submit {
    height: 46px;
}

.ms-alert__submit .fa-bell {
    color: #1190ba;
    margin-right: 6px;
}

.ms-alert__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ms-alert__status {
    min-height: 22px;
    margin: 12px 0 0;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
}

.ms-alert__status.is-error {
    color: #ff9a94;
}

.ms-alert.is-done .ms-alert__fields {
    display: none;
}

.ms-note {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    color: #52657c;
    max-width: 760px;
    margin: 28px 0 36px;
}

@media (prefers-reduced-motion: no-preference) {
    .ms-chart__svg {
        clip-path: inset(0 100% 0 0);
        animation: ms-reveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) .15s forwards;
    }

    .ms-chart__dot,
    .ms-chart__mark {
        opacity: 0;
        animation: ms-fade .3s ease 1.1s forwards;
    }
}

@keyframes ms-reveal {
    to { clip-path: inset(0 0 0 0); }
}

@keyframes ms-fade {
    to { opacity: 1; }
}

@media (max-width: 991px) {
    .ms-hero__copy {
        margin-bottom: 28px;
    }

    .ms-side {
        padding-top: 32px;
    }

    .ms-range {
        margin-top: 36px;
    }
}

@media (max-width: 767px) {
    .ms-hero {
        padding: 32px 0 28px;
    }

    .ms-hero__title {
        font-size: 30px;
    }

    .ms-ledger dd {
        font-size: 24px;
    }

    .ms-ledger__cell:nth-child(even) {
        padding-left: 16px;
    }

    .ms-ledger__cell:nth-child(odd) {
        padding-right: 12px;
    }

    .ms-chart__plot {
        height: 180px;
    }

    .ms-mix__legend {
        grid-template-columns: 1fr;
    }

    .ms-alert__fields {
        grid-template-columns: 1fr;
    }

    .ms-alert__submit {
        width: 100%;
    }

    .ms-quote__body p {
        font-size: 17px;
    }
}
