body {
  background: #001a1d;
  color: #f5fbfa;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
header { background: #001a1d; border-bottom: 1px solid #b9964c; }
.brand { font-size: 1.8rem; letter-spacing: -.055em; }
.brand span, a { color: #76eee1; }
.lookup-nav a { color: #dcecea; font-size: .9rem; }
main.finder-page { padding-block: clamp(12px,3vw,34px) 52px; }
.results-hero { margin: 0 0 22px; padding-bottom: clamp(30px,5vw,60px); border-width: 1px; }
.results-hero::before { width: 32%; height: 90%; }
.results-hero::after { height: 9%; }
.results-hero .back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 10px; }
.results-hero h1 { max-width: 72%; font-size: clamp(2.1rem,5vw,3.9rem); letter-spacing: -.045em; text-wrap: balance; }
.results-hero p { max-width: min(61ch,70%); color: #cce8e4; margin: 12px 0 0; }
.finder-page .lookup-panel { background: #082b2e; border-color: #376761; }
.lookup-result-heading, #restartSearch h2 { letter-spacing: -.025em; }
.civic-rep-grid { gap: 14px; }
.address-offices { grid-template-columns: repeat(2,minmax(0,1fr)); }
.town-lookup-card, .civic-rep-card {
  background: linear-gradient(145deg,#0d3c3e,#062a2c);
  border: 1px solid #45726e;
}
.office-card { display: flex; flex-direction: column; padding: clamp(16px,2.2vw,24px); }
.office-card h3 { margin: 0; font-size: 1.05rem; color: #dff9f4; }
.office-card .seat { color: #f3d488; font-size: .92rem; margin: 0 0 14px; }
.office-card h4 { font-size: clamp(1.25rem,2vw,1.6rem); line-height: 1.18; margin: 0; }
.office-card h4 a { color: white; text-decoration: none; }
.office-card h4 a:hover { text-decoration: underline; }
.office-card .party { color: #c6ded9; margin: 4px 0; }
.officeholder + .officeholder { margin-top: 16px; padding-top: 14px; border-top: 1px solid #386260; }
.profile-action, .primary-action {
  align-self: start; display: inline-flex; align-items: center; min-height: 44px;
  padding: 8px 15px; margin: 8px 0; background: #f5d079; border-radius: 9px;
  color: #182320; text-decoration: none; font-weight: 750;
}
.profile-action:hover, .primary-action:hover { background: #ffe4a6; }
.card-contacts { display: flex; flex-wrap: wrap; column-gap: 16px; }
.card-contacts a, .verify-seat, .restart-actions > a { display: inline-flex; align-items: center; min-height: 44px; }
.verify-seat { align-self: flex-start; margin-top: auto; font-size: .88rem; }
.restart-actions, .result-resources { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.result-resources { margin: 20px 0; }
.result-resources a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid #476e68; border-radius: 9px; text-decoration: none; }
.result-resources a:hover { border-color: #f5d079; }
#resultsStatus:empty { display: none; }
#hubCity { min-height: 44px; margin: 8px; padding: 6px; font: inherit; }
@media (max-width: 700px) {
  .address-offices { grid-template-columns: 1fr; }
  .results-hero::before { opacity: .48; width: 32%; height: 60%; }
  .results-hero h1 { max-width: 91%; }
  .results-hero p { max-width: 94%; }
  .lookup-nav { gap: 0 10px; }
}
@media (max-width: 420px) {
  .representative-lookup header nav { gap: 0 12px; }
  .lookup-nav a { font-size: .8rem; }
  .results-hero { border-radius: 18px; }
  .result-resources { gap: 8px; }
}
.nearby-location { padding-block: 12px; border-top: 1px solid #426765; }
.nearby-location small { display: block; color: #f3d488; }
.nearby-location p { color: #d3e8e4; margin: 4px 0; }
.nearby-location a, #localCouncil a { display: inline-flex; align-items: center; min-height: 44px; margin: 0 16px 0 0; }
#mappedPollingPlace .primary-action { display: flex; width: fit-content; }
#addressLocal .municipal-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
#localCouncil { margin-bottom: 14px; }
#matchedMunicipality > .civic-rep-card { margin-top: 0 !important; }

.hub-ready:not(.town-guide) [data-hub-panel]:not(.hub-active) { display:none; }
.hub-hero-top { display:flex; gap:12px 20px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.hub-hero-top .back { font-size:.9rem; margin:0; }
.results-hero { padding:clamp(18px,3.8vw,40px); padding-bottom:clamp(26px,4.8vw,53px); }
.results-hero h1 { font-size:clamp(2rem,5.6vw,3.8rem); }
#hubOverview { scroll-margin-top:14px; }
#hubOverviewHeading { font-size:clamp(1.35rem,2.3vw,1.8rem); margin:26px 0 14px; letter-spacing:-.025em; }
.hub-tiles { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.hub-tile { display:grid; grid-template-columns:1fr auto; grid-template-rows:auto 1fr; align-content:start; gap:16px 8px; min-width:0; min-height:150px; padding:clamp(15px,2.2vw,24px); border:1px solid #42746e; border-radius:15px; background:linear-gradient(135deg,#103c3d,#06292c); color:#f4faf8; text-decoration:none; }
.hub-tile:hover, .hub-tile:focus-visible { border-color:#f7d181; background:#123f40; }
.hub-icon { display:grid; place-items:center; width:41px; height:41px; border-radius:12px; background:#1b5050; color:#8bf0df; }
.hub-icon svg { width:24px; height:24px; }
#votingJump .hub-icon,#hubJump .hub-icon { color:#ffdb91; background:#434331; }
.hub-arrow { grid-area:1/2; color:#e9c979; font-size:1.3rem; }
.hub-tile-copy { grid-column:1/-1; }
.hub-tile-copy strong { display:block; font-size:clamp(1.07rem,1.8vw,1.38rem); line-height:1.22; }
.hub-summary { display:block; margin-top:6px; font-size:.91rem; line-height:1.4; color:#c0d8d4; }
.topic-bar { display:flex; align-items:center; flex-wrap:wrap; gap:10px 20px; scroll-margin-top:12px; border-bottom:1px solid #355f5c; }
.topic-bar a,.topic-return a { display:inline-flex; align-items:center; min-height:46px; font-weight:700; }
.topic-bar span { color:#b9d3cc; font-size:.95rem; }
.hub-issues { display:flex; flex-wrap:wrap; gap:12px; }
.hub-issues a { background:#164342; border:1px solid #497d71; border-radius:8px; text-decoration:none; padding:12px 16px; color:#f1d694; font-weight:700; }
.hub-active:focus { outline:none; }
.topic-return { margin-top:12px; }
#mappedPollingPlace:not(:empty) { background:#0d3839; border-left:3px solid #e9c979; padding:14px 18px; margin:16px 0; }
#mappedPollingPlace h3 { margin:0 0 7px; }
.nearby-location small { font-variant-numeric:tabular-nums; font-weight:700; }
@media(max-width:850px){ .hub-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px){
 .hub-tiles { grid-template-columns:1fr; gap:9px; }
 .hub-tile { grid-template-columns:39px 1fr auto; grid-template-rows:auto; align-items:center; min-height:78px; padding:12px 14px; gap:12px; }
 .hub-tile-copy,.hub-arrow { grid-area:auto; }
 .hub-icon { width:38px;height:38px; }
 .hub-summary { margin-top:3px; }
 .hub-hero-top { gap:0 14px; margin-bottom:4px; }
}

.distance-track { height:5px; margin:6px 0 9px; background:#244c4c; border-radius:4px; }
.distance-track span { display:block; height:100%; background:#78dcc9; border-radius:inherit; }

/* Resident Hub landscape and six topic entrances. The lookup determines available topics. */
body.representative-lookup {
  background: radial-gradient(ellipse at 50% 65%, #064144, transparent 75%), #002529;
}
.representative-lookup header { padding: .4rem 0; border-bottom: 1px solid #52bfb9; }
.representative-lookup header nav { width: min(88rem, 92%); }
.representative-lookup .brand { font-size: clamp(1.75rem, 3vw, 2.75rem); line-height: 1.2; }
.lookup-nav { align-items: center; }
.lookup-nav a { text-decoration: none; }
.lookup-nav a:hover { text-decoration: underline; }
.lookup-nav .hub-current { display: none; }
.hub-ready .hub-current { display: inline-flex; color: #ffda79; font-weight: 750; box-shadow: inset 0 -3px #f4bf53; }
.representative-lookup main.finder-page { width: 100%; padding-top: 0; }
main.finder-page > :not(.results-hero) { width: min(84rem, 91%); margin-inline: auto; }
main.finder-page > .results-hero {
  margin: 0; padding: clamp(2rem, 3.5vw, 3.8rem) max(6%, calc((100% - 65rem) / 2)) clamp(4rem, 6vw, 6rem);
  border: 0; border-radius: 0; box-shadow: none;
  background: linear-gradient(90deg, #00292c12, #00252bda 27%, #00252be6 58%, #00252b14 83%),
    url("images/resident-hub/shoreline.webp") center 48% / cover no-repeat, #00272c;
}
.results-hero::before {
  inset: 18% 12% auto auto; width: clamp(6.5rem, 12vw, 13rem); height: 52%;
  background: url("images/resident-hub/connecticut.svg") center / contain no-repeat;
  mask-image: none; filter: drop-shadow(0 0 5px #00c2c1); opacity: .86;
}
.results-hero::after {
  inset: auto 0 -1px; height: clamp(2rem, 4.5vw, 4.5rem);
  background: url("images/resident-hub/wave.svg") bottom / 100% 100% no-repeat; mask-image: none;
}
.results-hero .hub-wordmark { color: #fff; font-size: clamp(.78rem, 1.1vw, 1rem); letter-spacing: .13em; }
.results-hero .hub-wordmark span { color: #ffcc59; }
.results-hero .hub-wordmark::after { display: inline-block; content: ""; width: 3.5rem; height: 2px; margin: 0 0 .25em .7em; background: linear-gradient(90deg,#ffd05d,transparent); }
.results-hero h1 {
  margin: .35rem 0; max-width: min(70vw, 57rem); color: white;
  font-size: clamp(2.25rem, 4.45vw, 4.75rem); line-height: 1.05; letter-spacing: -.05em;
}
.results-hero h1 span { color: #6ff5ef; }
.results-hero #resultScope { max-width: min(54ch, 60vw); margin: .55rem 0; font-size: clamp(1rem, 1.4vw, 1.23rem); color: #eefaf9; }
.hub-location { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.4rem; }
#hubPlace { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border: 1px solid #79c3bb; border-radius: 3rem; background: #003033db; color: #fff; font-weight: 700; }
#hubPlace svg { width: 1.1em; height: 1.1em; color: #ffd068; }
.results-hero .back { margin: 0; color: #8ff6ec; font-weight: 650; }
#hubOverviewHeading { margin: 0 0 1.1rem; font-size: clamp(1.65rem, 2.5vw, 2.6rem); }
#hubOverviewHeading::after { display: block; content: ""; width: 4rem; height: 4px; margin-top: .3rem; border-radius: 4px; background: #ffc753; }
.hub-tiles { gap: clamp(.75rem, 1.3vw, 1.4rem); }
#localJump { --scene: url("images/resident-hub/local.webp"); }
#votingJump { --scene: url("images/resident-hub/voting.webp"); }
#driverJump { --scene: url("images/resident-hub/driving.webp"); }
#repJump { --scene: url("images/resident-hub/officials.webp"); }
#hubJump { --scene: url("images/resident-hub/services.webp"); }
#issueJump { --scene: url("images/resident-hub/issues.webp"); }
.hub-tile {
  position: relative; isolation: isolate; overflow: hidden; display: grid;
  grid-template: "icon copy" auto / auto minmax(0, 1fr); align-items: start; align-content: center;
  gap: clamp(.6rem, 1vw, 1rem); min-height: clamp(8.8rem, 10vw, 11rem);
  padding: clamp(.9rem, 1.5vw, 1.55rem); padding-right: clamp(2.7rem, 3.2vw, 3.5rem);
  background: #00373b; border: 1px solid #5ce3db; border-radius: 1.05rem;
  box-shadow: inset 0 -2px 0 #21abac, 0 .4rem 1rem #001b2080;
}
.hub-tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(95deg, #00373b 4%, #002c30fa 25%, #002629e6 51%, #00262978 75%, #00262917),
    linear-gradient(0deg, #002c30b8, transparent 65%), var(--scene) right center / auto 110% no-repeat;
}
.hub-tile:hover, .hub-tile:focus-visible { background: #00373b; border-color: #ffe39c; box-shadow: 0 0 0 1px #ffe39c; }
.hub-tile .hub-icon, #votingJump .hub-icon, #hubJump .hub-icon {
  grid-area: icon; width: clamp(2rem, 3vw, 3.4rem); height: auto; color: #ffd16c; background: none;
}
.hub-icon svg { width: 100%; height: auto; }
.hub-tile-copy { grid-area: copy; min-width: 0; }
.hub-tile-copy strong { font-size: clamp(1.15rem, 1.65vw, 1.65rem); color: white; line-height: 1.14; }
.hub-summary { color: #f1f7f5; font-size: clamp(.88rem, 1vw, 1rem); line-height: 1.35; }
.hub-arrow {
  position: absolute; inset: auto .8rem .8rem auto; display: grid; place-items: center;
  width: 1.9rem; height: 1.9rem; border: 2px solid #ffc75a; border-radius: 50%;
  color: #ffd269; background: #00262bdb; font-size: 1.2rem; line-height: 1;
}
.hub-updates {
  display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1rem; margin-top: clamp(1rem, 2vw, 2rem);
  padding: 1rem clamp(1rem, 2vw, 2rem); border: 1px solid #70e5df; border-radius: 1rem;
  background: linear-gradient(110deg, #03474c, #002c30 60%, #004046); color: white; text-decoration: none;
}
.hub-updates > svg { width: 2rem; height: 2rem; }
.hub-updates strong { font-size: clamp(1.1rem, 1.7vw, 1.6rem); }
.updates-summary { padding-inline-start: 1rem; border-inline-start: 1px solid #a0c0bb; }
.updates-button { margin-inline-start: auto; padding: .55rem 1.15rem; border-radius: 2rem; background: linear-gradient(#ffe4a2,#f0b840); color: #142322; font-weight: 750; }
.hub-updates:hover .updates-button, .hub-updates:focus-visible .updates-button { background: #ffe6a5; }
@media (max-width: 850px) {
  .updates-summary { display: none; }
  .results-hero::before { right: 5%; }
}
@media (max-width: 560px) {
  .representative-lookup header nav { align-items: flex-start; gap: .2rem; }
  .lookup-nav { gap: .2rem .85rem; }
  .lookup-nav a { font-size: .8rem; }
  main.finder-page > .results-hero {
    padding: 1.8rem 5% 3.35rem;
    background-image: linear-gradient(90deg,#00252bef,#002d32d9 55%,#00252b66),url("images/resident-hub/shoreline.webp");
  }
  .results-hero::before { display: none; }
  .results-hero h1, .results-hero #resultScope { max-width: 100%; }
  .hub-tile { min-height: 6.25rem; align-items: center; padding: .9rem 3.3rem .9rem 1rem; }
  .hub-arrow { top: 50%; bottom: auto; transform: translateY(-50%); }
  .hub-updates { gap: .5rem; }
  .hub-updates > svg { width: 1.4rem; height: 1.4rem; }
  .updates-button { padding: .45rem .65rem; font-size: .86rem; }
}

/* Town browsing is an open directory. Matched-address hubs use the topic cards. */
body.town-guide { background: #08282b; }
.town-guide main.finder-page > .results-hero {
  width: min(77rem, 92%); margin: 1.25rem auto; padding: clamp(1.3rem, 3.4vw, 3rem);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(16rem, .85fr);
  align-content: center; gap: .35rem 2rem; border: 1px solid #366266; border-top: 3px solid #eac567;
  border-radius: 1rem; background: linear-gradient(100deg, #0c3638 36%, #064245); 
}
.town-guide .results-hero::before, .town-guide .results-hero::after, .town-guide #hubPlace,
.town-guide .address-voting-intro { display: none; }
.town-guide .results-hero > :not(.town-address-offer) { grid-column: 1; }
.town-guide .results-hero h1 { font-size: clamp(2rem, 4vw, 3.8rem); max-width: none; }
.town-guide .results-hero #resultScope { max-width: 42ch; margin: .2rem 0 0; }
.town-address-offer { grid-column: 2; grid-row: 1 / span 4; align-self: center; padding: 1rem 1.25rem; border-left: 3px solid #eac567; background: #002c2f; }
.town-address-offer h2 { margin: 0; font-size: 1.2rem; }
.results-hero .town-address-offer p { margin: .4rem 0; max-width: 48ch; font-size: .95rem; line-height: 1.45; }
.town-address-offer small { display: block; color: #c7dcd7; }
.town-guide main.finder-page > :not(.results-hero) { width: min(77rem, 92%); }
.town-guide #hubOverviewHeading { font-size: 1.25rem; margin-bottom: .75rem; }
.town-guide #hubOverviewHeading::after { display: none; }
.town-guide .hub-tiles { display: flex; flex-wrap: wrap; gap: .5rem; }
.town-guide .hub-tile { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .55rem .9rem; border: 1px solid #4e7c7a; border-radius: .45rem; background: #103d40; box-shadow: none; }
.town-guide .hub-tile::before, .town-guide .hub-arrow, .town-guide .hub-summary { display: none; }
.town-guide .hub-tile .hub-icon { width: 1.25rem; }
.town-guide .hub-tile strong { font-size: .97rem; }
.town-guide .lookup-panel { border: 0; border-top: 1px solid #467674; border-radius: 0; padding-inline: 0; background: transparent; scroll-margin-top: 1rem; }
.town-guide #inlineTownResults .civic-rep-results { margin-top: .75rem; }
.town-guide .municipal-profile-top { align-items: center; }
.town-guide .municipal-portrait { width: 4rem; height: 4.5rem; flex-basis: 4rem; }
@media (max-width: 760px) {
  .town-guide main.finder-page > .results-hero { display: block; padding: 1.2rem; }
  .town-address-offer { margin-top: .65rem; }
  .town-guide .hub-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#townSeats { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr)); align-items:start; gap:1rem; }
#townSeats .civic-rep-card { padding:0; overflow:hidden; border-radius:16px; }
#townSeats h3 { margin:0; padding:.8rem 1rem; background:#0d393b; font-size:1rem; color:#f7dd95; }
#townSeats ul { display:block; list-style:none; margin:0; padding:0; }
#townSeats li { margin:0; padding:0; border-top:1px solid #335958; }
#townSeats .town-person { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:.8rem; align-items:center; padding:.65rem .9rem; color:#f5faf8; text-decoration:none; }
#townSeats a.town-person:hover, #townSeats a.town-person:focus-visible { background:#15494a; }
#townSeats a:focus-visible { outline:2px solid #ffe098; outline-offset:-3px; }
.town-portrait { display:grid; place-items:center; position:relative; width:48px; height:48px; overflow:hidden; border-radius:50%; background:#205352; color:#bcf3e8; font-weight:700; }
.town-portrait img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 22%; }
.town-person strong, .town-person small { display:block; overflow-wrap:anywhere; }
.town-person strong { font-size:1.05rem; line-height:1.25; }
.town-person small { margin-top:.2rem; color:#c1dbd8; font-size:.85rem; line-height:1.3; }
.town-profile-arrow { color:#80e3d2; font-size:1.5rem; }

/* The town directory invitation borrows the storefront illustration from Shop Local. */
#townBusinesses .town-market-banner {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr);
  overflow:hidden; border:1px solid #dbbc76; border-radius:1rem;
  background:#fff3d9; color:#103c3e;
}
.town-market-art {
  background:#116466 url('/images/shop-local-poster.webp') no-repeat;
  background-size:auto 270%; background-position:98% 13%;
}
.town-market-copy { padding:clamp(1.1rem,3vw,2rem); }
#townBusinesses .town-market-copy h2 { color:#103c3e; font:bold italic clamp(1.65rem,3vw,2.4rem)/1.08 Georgia,serif; margin:0; }
#townBusinesses .town-market-copy p { color:#204448; max-width:55ch; margin:.65rem 0; }
.town-market-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.3rem 1.2rem; }
.town-market-actions a { display:inline-flex; align-items:center; min-height:44px; color:#134f50; font-weight:700; }
#townBusinessRegister { gap:.5rem; border-radius:2rem; padding:.2rem 1rem; background:#ffcb58; color:#172f30; text-decoration:none; }
.town-market-actions a:focus-visible { outline:3px solid #21746f; outline-offset:2px; }
.town-market-copy small { display:block; margin-top:.45rem; color:#375554; }
#townBusinessSample { border-left:3px solid #e4c16d; padding:.4rem 1rem; }
#townBusinessSample span { display:block; margin-top:.25rem; }
#townBusinessSample p { margin:.25rem 0; }
@media(max-width:640px) {
  #townBusinesses .town-market-banner { grid-template-columns:1fr; }
  .town-market-art { height:clamp(5rem,22vw,8rem); background-size:220% auto; background-position:right 26%; }
}

.bristol-decisions { padding: clamp(.9rem, 2vw, 1.6rem); }
.bristol-decisions .decision-groups { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap:1rem; margin-top:1rem; }
.bristol-decisions .decision-groups > section { min-width:0; padding:.85rem; border:1px solid #568c88; border-radius:.75rem; background:#063236; }
.bristol-decisions .decision-groups h3 { margin:0 0 .8rem; color:#ffde84; }
.bristol-decisions article + article { margin-top:1rem; padding-top:1rem; border-top:1px solid #557a79; }
.bristol-decisions article h4 { margin:.35rem 0; color:#fff; font-size:1.1rem; line-height:1.25; }
.bristol-decisions article p { margin:.5rem 0; }
.bristol-decisions article a { display:inline-block; padding:.45rem .65rem .45rem 0; }
