/* Interactive homepage hero. Scoped to avoid altering the site's content cards. */
.nh-hero {
    grid-column: 1; grid-row: 1; position: relative; z-index: 4;
    width: min(100%, 570px); min-width: 0; justify-self: end;
    box-sizing: border-box; padding: clamp(20px, 2.5vw, 30px); border-radius: 28px;
    border: 1px solid rgba(255,255,255,.88);
    background: var(--nh-card-bg);
    box-shadow: 0 24px 65px rgba(24,61,104,.16), inset 0 1px 0 #fff;
    backdrop-filter: none; color: var(--nh-home-text, var(--blue-dark)); font: 15px/1.5 "Segoe UI", sans-serif;
}
.nh-hero *, .nh-hero *::before, .nh-hero *::after { box-sizing: border-box; }
.nh-hero [hidden] { display: none !important; }
.nh-hero-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.nh-hero .nh-hero-kicker { margin: 0 0 7px; color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.nh-hero .nh-hero-heading h2 { margin: 0; color: var(--nh-home-text, var(--blue-dark)); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.18; letter-spacing: -.7px; text-align: left; }
.nh-hero-emblem { display: grid; align-content: center; flex: 0 0 42px; height: 42px; border-radius: 14px; background: #e4eefc; color: var(--blue-dark); font-size: 21px; font-weight: 800; line-height: .78; text-align: center; }
.nh-hero-emblem span { color: var(--purple-medium); font-size: 14px; margin: 3px 0 0 9px; }
.nh-hero-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; border: 1px solid #d9e5f0; background: #eaf1f8; border-radius: 13px; }
.nh-hero button, .nh-hero a, .nh-hero input, .nh-hero select, .nh-hero textarea { -webkit-tap-highlight-color: transparent; }
.nh-hero-tabs button { flex: 1; min-width: 0; border: 0; border-radius: 9px; padding: 10px 6px; background: transparent; color: var(--nh-home-text-secondary, var(--blue-dark)); font: 600 12px/1.3 "Segoe UI", sans-serif; cursor: pointer; transition: background .2s, box-shadow .2s; }
.nh-hero-tabs button[aria-selected="true"] { background: white; color: var(--nh-home-text, var(--blue-dark)); box-shadow: 0 2px 8px #233b5814; }
.nh-hero-content { min-height: 260px; animation: nhHeroEnter .3s ease-out; }
.nh-hero-content:focus { outline-offset: 5px; }
.nh-hero .nh-hero-overline { color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 10px; font-weight: 700; letter-spacing: 1.7px; margin: 0 0 12px; }
.nh-hero h3 { color: var(--nh-home-text, var(--blue-dark)); font-size: 22px; line-height: 1.3; letter-spacing: -.35px; margin: 13px 0; text-align: left; overflow-wrap: anywhere; }
.nh-hero .nh-hero-description { color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 14px; margin: 0 0 16px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nh-hero-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--green-dark); }
.nh-hero-badge { display: inline-block; max-width: 80%; border: 1px solid #d0e4f6; border-radius: 20px; padding: 5px 11px; color: var(--blue-dark); background: #e9f3fc; font-weight: 600; }
.nh-hero .nh-hero-source { margin: 10px 0; color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 11px; line-height: 1.5; }
.nh-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 15px; margin-top: 16px; }
.nh-hero .nh-hero-link { display: inline-flex; gap: 8px; color: var(--blue-dark); font-size: 13px; font-weight: 650; text-decoration: none; padding: 5px 0; }
.nh-hero .nh-hero-link:hover { text-decoration: underline; }
.nh-hero .nh-hero-button, .nh-hero .nh-hero-primary { border: 1px solid #ccddeb; border-radius: 11px; padding: 10px 13px; color: var(--nh-home-text, var(--blue-dark)); background: #ffffffbf; font: 600 12px/1.3 "Segoe UI", sans-serif; cursor: pointer; transition: transform .15s, background .15s; }
.nh-hero .nh-hero-primary { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; padding: 12px 18px; box-shadow: 0 5px 12px #367ebf24; }
.nh-hero .nh-hero-button:hover:not(:disabled), .nh-hero .nh-hero-primary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(.96); }
.nh-hero button:disabled { opacity: .65; cursor: default; }
.nh-hero-count { padding: 2px 6px; margin-left: 4px; border-radius: 6px; background: #ddecf6; }
.nh-hero-pager { display: flex; justify-content: flex-end; align-items: center; gap: 6px; border-top: 1px solid #dce7ef; padding-top: 13px; margin-top: 19px; }
.nh-hero-pager > span { margin-right: auto; color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 11px; font-variant-numeric: tabular-nums; }
.nh-hero-pager .nh-hero-button { padding: 6px 13px; font-size: 17px; }
.nh-hero-feedback { font-size: 12px; color: var(--green-dark); margin: 10px 0 0; overflow-wrap: anywhere; }
.nh-hero-feedback:empty { display: none; }
.nh-hero .nh-hero-field { display: flex; flex-direction: column; gap: 5px; color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 11px; font-weight: 600; margin-bottom: 12px; }
.nh-hero select, .nh-hero textarea { width: 100%; border: 1px solid #cfdeeb; border-radius: 9px; background: #fff; color: var(--nh-home-text, var(--blue-dark)); padding: 9px 10px; font: 13px "Segoe UI", sans-serif; }
.nh-hero textarea { resize: vertical; }
.nh-hero input[type="range"] { width: 100%; accent-color: #367ebf; }
.nh-hero :is(button,a,input,select,textarea):focus-visible { outline: 3px solid #7661c6; outline-offset: 3px; }
.nh-hero-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; border: 0; margin: 16px 0; padding: 0; max-height: 180px; overflow-y: auto; }
.nh-hero-options label { cursor: pointer; display: block; position: relative; min-width: 0; text-align: center; line-height: 1.45; padding: 10px 12px; border: 1px solid #d5e1ed; border-radius: 10px; background: #fff; color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 13px; }
.nh-hero-options label:has(input:checked) { background: #e6f1fc; border-color: #619bd0; color: var(--nh-home-text, var(--blue-dark)); }
.nh-hero-options input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.nh-hero-results { display: grid; gap: 9px; max-height: 220px; overflow-y: auto; padding: 4px 0; }
.nh-hero-result { display: grid; grid-template-columns: 1fr auto; gap: 5px; color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 13px; }
.nh-hero-result i { grid-column: 1 / -1; display: block; height: 7px; border-radius: 5px; background: linear-gradient(90deg,#4a95e0 var(--result-width),#dfebf5 var(--result-width)); }
.nh-hero-budget-controls { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.nh-hero-budget-visual { display: flex; align-items: center; gap: 20px; margin: 9px 0 20px; }
.nh-hero-donut { width: 145px; height: 145px; flex: 0 0 145px; border-radius: 50%; padding: 15px; box-shadow: 0 8px 18px #294f7510; }
.nh-hero-donut > div { width: 100%; height: 100%; border-radius: 50%; background: #f6faff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.nh-hero-donut strong { font-size: 24px; color: var(--nh-home-text, var(--blue-dark)); }
.nh-hero-donut span { max-width: 85px; color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 9px; }
.nh-hero-budget-detail { min-width: 0; }
.nh-hero-budget-detail h3 { font-size: 17px; margin: 0 0 7px; }
.nh-hero-amount { font-size: clamp(18px,2.1vw,26px); color: var(--nh-home-text, var(--blue-dark)); letter-spacing: -.8px; }
.nh-hero-budget-bars { display: grid; gap: 9px; margin: 15px 0; }
.nh-hero-budget-bars button { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; border: 0; padding: 5px 0; background: transparent; text-align: left; color: var(--nh-home-text-secondary, var(--blue-dark)); font: 11px "Segoe UI",sans-serif; cursor: pointer; }
.nh-hero-budget-bars button[aria-pressed="true"] { color: var(--nh-home-text, var(--blue-dark)); }
.nh-hero-budget-bars button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nh-hero-budget-bars button i { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: linear-gradient(90deg,var(--bar-color) var(--bar-width),#e1eaf3 var(--bar-width)); }
.nh-hero-map { height: 225px; width: 100%; border-radius: 13px; overflow: hidden; background: #eaf1f8; border: 1px solid #d6e2ed; position: relative; isolation: isolate; }
.nh-hero-map .nh-hero-empty { padding: 30px 15px; }
.nh-hero-map .leaflet-control-attribution { font-size: 9px; }
.nh-hero-map-pin span { display: block; height: 18px; width: 18px; border: 3px solid white; border-radius: 50%; box-shadow: 0 2px 9px #163f6855; }
.nh-hero-map + .nh-hero-source { margin: 6px 0 10px; }
.nh-hero-map ~ #nh-hero-map-detail h3 { font-size: 17px; }
.nh-hero-map ~ #nh-hero-map-detail .nh-hero-description { -webkit-line-clamp: 2; font-size: 12px; }
.nh-hero .nh-hero-empty { text-align: left; padding: 20px 0; }
.nh-hero-empty p { color: var(--nh-home-text-secondary, var(--blue-dark)); font-size: 13px; }
.nh-hero-empty-icon { font-size: 35px; color: #8db4d8; }
.nh-hero-skeleton { display: grid; gap: 16px; padding: 20px 0; }
.nh-hero-skeleton span { display: block; height: 40px; border-radius: 9px; background: linear-gradient(90deg,#e4eef8,#f6faff,#e4eef8); background-size: 200% 100%; animation: nhHeroShimmer 1.4s linear infinite; }
.nh-hero-skeleton span:nth-child(2) { height: 90px; }
.nh-hero-skeleton span:last-child { width: 65%; }
.nh-hero-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.landing .landing-copy { grid-row: 1; }
@keyframes nhHeroShimmer { to { background-position: -200% 0; } }
@keyframes nhHeroEnter { from { opacity: .7; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) {
    .nh-hero { padding: 20px; }
    .nh-hero-budget-visual { gap: 12px; }
    .nh-hero-donut { width: 115px; height: 115px; flex-basis: 115px; padding: 12px; }
    .nh-hero-tabs button { font-size: 11px; }
}
@media (max-width: 760px) {
    html .landing { grid-template-columns: minmax(0,1fr) !important; padding: 35px 18px; gap: 28px; }
    .landing .landing-copy { grid-column: 1; grid-row: 1; width: 100%; max-width: 570px; justify-self: center; }
    .nh-hero { grid-column: 1; grid-row: 2; justify-self: center; width: 100%; }
    .nh-hero .nh-hero-heading h2 { font-size: 25px; }
    .nh-hero-tabs button { font-size: 12px; }
}
@media (max-width: 380px) {
    .nh-hero { padding: 17px; border-radius: 20px; }
    .nh-hero-heading { gap: 7px; }
    .nh-hero .nh-hero-heading h2 { font-size: 22px; }
    .nh-hero-tabs button { font-size: 10px; padding: 10px 4px; }
    .nh-hero-budget-visual { gap: 10px; }
    .nh-hero-amount { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .nh-hero *, .nh-hero *::before, .nh-hero *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 900px) {
    html .landing { grid-template-columns: minmax(0,1fr) !important; grid-template-rows: auto auto; padding: 30px 18px; gap: 25px; }
    .landing .landing-copy { grid-column: 1; grid-row: 1; min-height: 0; width: 100%; max-width: 570px; justify-self: center; display: block; padding: 0; }
    .landing .landing-copy > h1 { transform: none; font-size: clamp(1.8rem,6vw,3.2rem); line-height: 1.1; }
    .landing .landing-copy > .share { transform: none; margin-top: 16px; font-size: 1.05rem; line-height: 1.5; }
    .nh-hero { grid-column: 1; grid-row: 2; justify-self: center; }
}
html .landing { height: auto; }

.home-primary-action{display:inline-block;margin-top:1rem;padding:.85rem 1.2rem;border-radius:.6rem;background:#164c76;color:#fff!important;font-weight:700;text-decoration:none}.home-primary-action:focus-visible,.home-explore-links a:focus-visible{outline:3px solid #e5ad24;outline-offset:4px}.home-explore-links{display:flex;flex-wrap:wrap;gap:.65rem 1rem;margin-top:1rem;line-height:1.5}.home-explore-links a{color:inherit;text-decoration:underline}.home-explore-links span{opacity:.85}.home-explore-links small{display:block;font-size:.75em}

.nh-hero-options label:focus-within { outline: 2px solid #367ebf; outline-offset: -2px; }
.nh-hero-options label:hover { border-color: #619bd0; }

.nh-hero #nh-hero-poll-form .nh-hero-primary {
    font-size: 14px;
    font-weight: 700;
}
