/* ==================== STUDY PAGES (is-an-ocean-view-worth-it.aspx - Nov 2026) ====================
   Sits on top of hg-about.css (page frame: .hga, .hga-head, .hga-sec, .hga-dark, .hga-stats).
   Chart colours: one blue hue, light = partial view, dark = ocean view (validated as an ordinal pair on
   the cream page). Text never takes the series colour. */

.hgs {
    --hgs-ocean: #1268a0;
    --hgs-partial: #7cb8d9;
    --hgs-neg: #b9ae96;
    --hgs-track: #efe7d0;
}

.hgs-hide {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.hga-dark.hgs-kpis {
    margin-top: 40px;
}

    .hgs-kpis .hga-stats {
        margin-top: 0;
    }

/* ---------------------------------------------------------------- tables */

.hgs-tablewrap {
    margin: 22px 0 22px;
    overflow-x: auto;
}

.hgs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

    .hgs-table th,
    .hgs-table td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--hgx-line);
        text-align: right;
        vertical-align: middle;
    }

        .hgs-table th:first-child,
        .hgs-table td:first-child {
            padding-left: 0;
            text-align: left;
        }

    .hgs-table:not(.hgs-resorts) td:first-child {
        white-space: nowrap;
    }

    .hgs-table thead th {
        border-bottom: 2px solid var(--hgx-line);
        font: 700 12px/1.3 var(--hgx-sans);
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--hgx-muted);
        vertical-align: bottom;
    }

    /* the ocean view column carries the emphasis */
    .hgs-table .hgs-o {
        font-weight: 700;
        color: var(--hgx-ink);
    }

    .hgs-table thead .hgs-o {
        color: var(--hgx-brown);
    }

.hgs-sw {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 2px;
    vertical-align: 0;
}

.hgs-sw-o { background: var(--hgs-ocean); }
.hgs-sw-p { background: var(--hgs-partial); }
.hgs-sw-n { background: var(--hgs-neg); }

.hga .hgs-note {
    margin-top: -8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--hgx-muted);
}

/* ---------------------------------------------------------------- island bars */

.hgs-chart {
    margin: 24px 0 18px;
}

.hgs-legend {
    display: flex;
    gap: 18px;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--hgx-muted);
}

.hgs-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hgx-line);
}

.hgs-row-name {
    font-weight: 600;
    color: var(--hgx-brown);
}

.hgs-pair {
    display: grid;
    gap: 2px;
}

.hgs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--hgx-ink);
    font-variant-numeric: tabular-nums;
}

    .hgs-bar i {
        display: block;
        height: 14px;
        border-radius: 0 4px 4px 0;
    }

    .hgs-bar.hgs-o i { background: var(--hgs-ocean); }
    .hgs-bar.hgs-p i { background: var(--hgs-partial); }
    .hgs-bar.hgs-o b { font-weight: 700; }
    .hgs-bar.hgs-p b { font-weight: 400; color: var(--hgx-muted); }

/* ---------------------------------------------------------------- resort table */

.hgs-resorts td:first-child a {
    color: var(--hgx-brown);
    font-weight: 600;
    text-decoration: none;
}

    .hgs-resorts td:first-child a:hover,
    .hgs-resorts td:first-child a:focus {
        color: var(--hgx-blue);
        text-decoration: underline;
    }

.hgs-resorts .hgs-area {
    display: block;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--hgx-muted);
}

.hgs-resorts tbody th {
    padding-top: 26px;
    border-bottom: 2px solid var(--hgx-line);
    font: 400 22px/1.2 var(--hgx-serif);
    color: var(--hgx-brown);
    text-align: left;
}

.hgs-resorts .hgs-meter {
    width: 34%;
    min-width: 120px;
}

.hgs-resorts thead th {
    white-space: nowrap;
}

/* track runs from -20% to +100%; the zero line sits at 1/6 */
.hgs-track {
    position: relative;
    height: 14px;
}

    .hgs-track::before {
        content: '';
        position: absolute;
        top: -4px;
        bottom: -4px;
        left: 16.667%;
        width: 1px;
        background: var(--hgx-muted);
    }

    .hgs-track i {
        position: absolute;
        top: 0;
        height: 14px;
        background: var(--hgs-ocean);
        border-radius: 0 4px 4px 0;
    }

        .hgs-track i.hgs-neg {
            background: var(--hgs-neg);
            border-radius: 4px 0 0 4px;
        }

.hgs-resorts .hgs-pct {
    width: 70px;
    font-weight: 700;
}

.hgs-resorts .hgs-usd {
    width: 104px;
    color: var(--hgx-ink);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- phones */

@media (max-width: 640px) {
    .hgs-table {
        font-size: 15px;
    }

        .hgs-table:not(.hgs-resorts) td:first-child {
            white-space: normal;
        }

        .hgs-table th,
        .hgs-table td {
            padding: 9px 6px;
        }

    .hgs-row {
        grid-template-columns: 82px 1fr;
        gap: 10px;
    }

    .hgs-resorts .hgs-meter {
        min-width: 48px;
        width: 15%;
    }

    .hgs-resorts .hgs-pct {
        width: 52px;
    }

    .hgs-resorts .hgs-usd {
        width: auto;
    }

    .hgs-resorts tbody th {
        font-size: 19px;
    }
}
