/* Cost guide pages (includes/costs/) — /resources/costs/* */

.costs-content {
    padding: 40px 20px 72px;
}

.costs-container {
    max-width: 820px;
    margin: 0 auto;
    color: #1e1e1e;
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* Breadcrumb */
.costs-breadcrumb {
    font-size: 0.85rem;
    color: #777;
    margin: 0 0 18px;
}

.costs-breadcrumb a {
    color: #0f7d40;
    text-decoration: none;
}

.costs-breadcrumb a:hover {
    text-decoration: underline;
}

.costs-breadcrumb__sep {
    margin: 0 8px;
    color: #c4c4c4;
}

.costs-title {
    font-size: 2.25rem;
    line-height: 1.2;
    font-weight: 800;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

.costs-intro {
    font-size: 1.1875rem;
    line-height: 1.65;
    color: #333;
    margin: 0 0 28px;
}

.costs-section {
    margin: 32px 0;
}

.costs-section h2,
.costs-faq h2,
.costs-cite h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 14px;
}

.costs-container p {
    margin: 0 0 16px;
}

.costs-container ul,
.costs-container ol {
    margin: 0 0 16px;
    padding-left: 1.4em;
}

.costs-container li {
    margin-bottom: 8px;
}

.costs-container a {
    color: #0f7d40;
    text-decoration: underline;
    font-weight: 600;
}

.costs-container a:hover {
    color: #0a5c2f;
}

/* Hero stat card */
.costs-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    align-items: center;
    background: #f0faf3;
    border: 1px solid #cdeed8;
    border-radius: 16px;
    padding: 24px 26px;
    margin: 0 0 16px;
}

.costs-hero__figure {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.costs-hero__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4a7a59;
    font-weight: 600;
}

.costs-hero__median {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.05;
    color: #0f7d40;
}

.costs-hero__range {
    font-size: 1rem;
    color: #333;
}

.costs-hero__chart {
    flex: 1 1 300px;
}

.costs-hero__meta {
    font-size: 0.85rem;
    color: #555;
    margin: 6px 0 0;
}

.costs-badge {
    display: inline-block;
    background: #fff3d6;
    color: #8a6100;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Price-distribution histogram SVG */
.costs-hist {
    display: block;
    width: 100%;
    height: auto;
}

.costs-hist__iqr {
    fill: #cdeed8;
    opacity: 0.7;
}

.costs-hist__bar {
    fill: #7cc698;
}

.costs-hist__bar--overflow {
    fill: #bcd9c6;
}

.costs-hist__axis {
    stroke: #d7e3da;
    stroke-width: 1;
}

.costs-hist__median {
    stroke: #0f7d40;
    stroke-width: 2.5;
}

.costs-hist__medlabel {
    font: 700 15px 'Inter', system-ui, sans-serif;
    fill: #0f7d40;
}

.costs-hist__xlabel {
    font: 500 13px 'Inter', system-ui, sans-serif;
    fill: #8a8a8a;
}

/* CTA buttons */
.costs-cta-row {
    margin: 8px 0 28px;
}

.costs-cta {
    display: inline-block;
    background: #0f7d40;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.0625rem;
    padding: 14px 28px;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.costs-cta:hover {
    background: #0a5c2f;
    color: #fff !important;
}

/* Category / hub comparison grid */
.costs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 8px 0 36px;
}

.costs-card {
    display: block;
    border: 1px solid #e2e7e3;
    border-radius: 14px;
    padding: 18px 18px 14px;
    text-decoration: none !important;
    color: #1e1e1e !important;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.costs-card:hover {
    border-color: #bfe6cc;
    box-shadow: 0 4px 16px rgba(15, 125, 64, 0.1);
}

.costs-card__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.costs-card__name {
    font-size: 1.1rem;
    font-weight: 700;
}

.costs-card__median {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f7d40;
}

.costs-card__meta {
    display: block;
    font-size: 0.82rem;
    color: #666;
    margin-top: 2px;
}

.costs-card--category {
    padding: 24px 20px;
}

.costs-card--category .costs-card__name {
    font-size: 1.3rem;
}

/* Regional price map (geographic choropleth + pins) */
.costs-usmap {
    position: relative;
    margin: 10px 0 14px;
}

.costs-usmap svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Hide the source SVG's small-state callout boxes + their leader lines */
.costs-usmap [id^="rect3123"],
.costs-usmap [id^="path41"] {
    display: none;
}

.costs-usmap__pin {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 2px 7px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.costs-usmap__pin-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: #555;
}

.costs-usmap__pin-val {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e1e1e;
}

/* Hover/tap tooltip */
.costs-usmap__tip {
    position: absolute;
    z-index: 5;
    transform: translate(-50%, calc(-100% - 14px));
    min-width: 150px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #1e1e1e;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}

.costs-usmap__tip.is-visible {
    opacity: 1;
    visibility: visible;
}

.costs-usmap__tip-region {
    font-weight: 700;
    font-size: 0.92rem;
}

.costs-usmap__tip-stat {
    color: #555;
}

.costs-usmap__tip-stat strong {
    color: #0f7d40;
    font-weight: 800;
}

.costs-usmap__tip-link {
    margin-top: 6px;
    color: #0f7d40;
    font-weight: 700;
    text-decoration: none;
    min-height: 24px;
}

.costs-usmap__tip-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .costs-usmap__tip {
        font-size: 0.9rem;
        max-width: 200px;
    }
    .costs-usmap__tip-link {
        min-height: 30px;
        padding: 4px 0;
    }
}

.costs-map__legend {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #555;
}

.costs-map__scale {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.costs-map__ramp {
    display: inline-block;
    width: 160px;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #57b894, #3fa3a8, #3f74c0);
}

.costs-map__nodata {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.costs-map__nodata i {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: #dfe3e7;
    display: inline-block;
}

.costs-map__callout {
    font-size: 0.95rem;
    color: #444;
    margin-top: 10px;
}

/* Cost hub — category sections */
.costs-cat {
    margin: 0 0 30px;
}

.costs-cat__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.costs-cat__head h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.costs-cat__head h2 a {
    color: #1e1e1e;
    text-decoration: none;
}

.costs-cat__head h2 a:hover {
    color: #0f7d40;
}

.costs-cat__meta {
    font-size: 0.9rem;
    color: #666;
}

.costs-guidegrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.costs-guide {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border: 1px solid #e2e7e3;
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none !important;
    color: #1e1e1e !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.costs-guide:hover {
    border-color: #bfe6cc;
    box-shadow: 0 4px 14px rgba(15, 125, 64, 0.1);
}

.costs-guide__name {
    font-weight: 700;
    font-size: 1.02rem;
}

.costs-guide__price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f7d40;
}

.costs-guide__cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f7d40;
    margin-top: 2px;
}

/* Cost hub — value props */
.costs-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 36px 0;
}

.costs-value h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.costs-value p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

/* Cite / embed */
.costs-cite {
    margin: 36px 0;
}

.costs-cite__code {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: #333;
    background: #f5f7f6;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 12px;
    resize: vertical;
}

.costs-cite__source {
    font-size: 0.85rem;
    color: #666;
}

/* FAQ */
.costs-faq {
    margin: 40px 0;
}

.costs-faq-item {
    border-bottom: 1px solid #e2e2e2;
    padding: 4px 0;
}

.costs-faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.0625rem;
    padding: 14px 28px 14px 0;
    list-style: none;
    position: relative;
}

.costs-faq-item summary::-webkit-details-marker {
    display: none;
}

.costs-faq-item summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 12px;
    font-size: 1.4rem;
    font-weight: 400;
    color: #0f7d40;
    line-height: 1;
}

.costs-faq-item[open] summary::after {
    content: "\2212";
}

.costs-faq-answer {
    padding: 0 0 16px;
    color: #444;
}

/* Final CTA */
.costs-final-cta {
    background: #f0faf3;
    border: 1px solid #cdeed8;
    border-radius: 14px;
    padding: 28px 24px;
    text-align: center;
    margin: 40px 0 28px;
}

.costs-final-cta p {
    font-size: 1.1875rem;
    font-weight: 600;
    margin: 0 0 18px;
}

/* Related links */
.costs-related {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 24px 0;
}

/* Disclaimer */
.costs-disclaimer {
    font-size: 0.85rem;
    color: #757575;
    font-style: italic;
    border-top: 1px solid #ececec;
    padding-top: 20px;
    margin-top: 24px;
}

@media (max-width: 600px) {
    .costs-content {
        padding: 24px 16px 56px;
    }
    .costs-title {
        font-size: 1.75rem;
    }
    .costs-intro {
        font-size: 1.0625rem;
    }
    .costs-hero__median {
        font-size: 2.25rem;
    }
    .costs-section h2,
    .costs-faq h2,
    .costs-cite h2 {
        font-size: 1.3rem;
    }
}
