@font-face {
    font-family: 'Articulat';
    src: url('assets/fonts/articulatcf-light.woff2') format('woff2');
    font-weight: 300;
}

@font-face {
    font-family: 'Articulat';
    src: url('assets/fonts/ArticulatCF-Medium.woff2') format('woff2');
    font-weight: 600;
}

:root {
    --ink: #092f59;
    --muted: #52708f;
    --paper: #edf6fd;
    --card: #ffffff;
    --line: #c8def1;
    --building: #66a9df;
    --overhang: #0b6bb7;
    --total: #06284d;
    --ratio: #b55763;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.metric-pixel {
    position: absolute;
    left: -9999px;
}

body {
    margin: 0;
    background:
        linear-gradient(rgba(11, 107, 183, 0.04) 1px, transparent 1px),
        var(--paper);
    background-size: 100% 28px;
    color: var(--ink);
    font-family: 'Articulat', sans-serif;
    font-weight: 300;
}

.page {
    width: min(1260px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: end;
    padding: 34px 38px 30px;
    border-top: 7px solid var(--overhang);
    background: var(--card);
    box-shadow: 0 14px 34px rgba(9, 67, 119, 0.1);
}

h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(36px, 4.4vw, 60px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.hero-copy {
    max-width: 780px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
}

.hero-logo { width: 180px; height: auto; }

.method-heading {
    margin: 30px 4px 12px;
    font-size: 27px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.method {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 0;
    background: var(--line);
    border: 1px solid var(--line);
}

.method-item {
    min-height: 106px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.94);
}

.method-number {
    display: block;
    margin-bottom: 7px;
    color: var(--overhang);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.method-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
    font-weight: 600;
}

.method-item span { color: var(--muted); line-height: 1.35; }

.city-nav {
    margin-top: 24px;
    padding: 20px 24px 22px;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(9, 67, 119, 0.06);
}

.city-nav-heading {
    display: flex;
    gap: 18px;
    align-items: baseline;
    margin-bottom: 14px;
}

.city-nav-heading h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.city-nav-heading span {
    color: var(--muted);
    font-size: 14px;
}

.city-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.city-link {
    padding: 8px 12px 7px;
    border: 1px solid var(--building);
    background: #f3f9fe;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.city-link:hover,
.city-link:focus {
    border-color: var(--overhang);
    background: var(--overhang);
    color: #ffffff;
    outline: none;
}

.charts { margin-top: 34px; }

.chart-card {
    position: relative;
    margin-bottom: 26px;
    padding: 26px 30px 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(9, 67, 119, 0.08);
    animation: reveal 0.45s ease both;
    scroll-margin-top: 20px;
}

.chart-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 7px;
    height: 100%;
    background: var(--overhang);
    content: '';
}

.city-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin: 0 0 20px;
}

.city-heading h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.city-logo {
    width: 112px;
    height: auto;
    flex: 0 0 auto;
}

.chart-heading { margin: 0 0 18px; }

.chart-heading h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: -0.01em;
}

.series-heading {
    display: inline-block;
    padding-bottom: 1px;
    border-bottom-width: 3px;
    border-bottom-style: solid;
}

.series-heading-building { border-bottom-color: var(--building); }

.series-heading-overhang {
    border-bottom-color: var(--overhang);
    border-bottom-style: dashed;
}

.series-heading-ratio { border-bottom-color: var(--ratio); }

.offer-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 0 22px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #f3f9fe;
}

.offer-table {
    width: auto;
    min-width: 720px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.offer-table th,
.offer-table td {
    padding: 4px 9px;
    border-left: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
}

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

.offer-table th {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.offer-table td { font-size: 14px; }

.offer-table td:last-child {
    color: var(--overhang);
    font-weight: 600;
}

.offer-table .estimate-row td { padding-top: 7px; }
.offer-table .estimate-row td:first-child { font-weight: 600; }

.offer-table .estimate-header-row td {
    padding-top: 9px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.canvas-wrap { position: relative; height: 430px; }

.empty {
    margin-top: 34px;
    padding: 36px;
    border: 1px solid var(--line);
    background: var(--card);
    font-size: 18px;
}

@keyframes reveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
    .page { width: 100%; padding: 0 0 32px; }
    .hero { grid-template-columns: 1fr; gap: 20px; padding: 26px 20px 22px; }
    .hero-logo { width: 126px; }
    .method-heading { margin: 26px 16px 10px; }
    .method { grid-template-columns: 1fr; }
    .method-item { min-height: 0; padding: 18px 20px; }
    .city-nav { margin: 18px 10px 0; padding: 18px 16px; }
    .city-nav-heading { display: block; }
    .city-nav-heading span { display: block; margin-top: 4px; }
    .charts { margin-top: 18px; }
    .chart-card { margin-bottom: 14px; padding: 20px 12px 24px 16px; }
    .chart-card::before { width: 5px; }
    .city-heading { gap: 12px; margin-bottom: 16px; }
    .city-heading h2 { font-size: 24px; line-height: 1.05; }
    .city-logo { width: 76px; }
    .offer-summary { margin-bottom: 18px; padding: 10px 4px; overflow: visible; }
    .offer-table { width: 100%; min-width: 0; table-layout: fixed; }
    .offer-table th,
    .offer-table td {
        padding: 5px 4px;
        white-space: normal;
        line-height: 1.2;
    }
    .offer-table th:first-child,
    .offer-table td:first-child { width: 38%; }
    .offer-table th { font-size: 8px; }
    .offer-table td { font-size: 12px; }
    .offer-table .estimate-header-row td { font-size: 8px; }
    .chart-heading { margin-bottom: 12px; }
    .chart-heading h3 { font-size: 16px; line-height: 1.55; }
    .series-heading { border-bottom-width: 2px; }
    .canvas-wrap { height: 530px; }
}

@media (max-width: 420px) {
    h1 { font-size: 31px; }
    .hero-copy { margin-top: 16px; font-size: 15px; }
    .city-heading h2 { font-size: 22px; }
    .city-logo { width: 68px; }
}

@media print {
    body { background: white; }
    .page { width: 100%; padding: 0; }
    .hero, .chart-card { box-shadow: none; break-inside: avoid; }
    .chart-card { break-after: page; }
}
