html {
  font-size: 16px;
  min-height: 100%;
  position: relative;
}

body {
  background: #f5f7f8;
  color: #17201b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
}

a {
  color: #0c6b58;
}

.btn {
  border-radius: 8px;
}

.btn-primary {
  background: #0c6b58;
  border-color: #0c6b58;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #084d40;
  border-color: #084d40;
}

.site-nav {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dfe6e3;
  margin-bottom: 1.5rem;
}

.navbar-brand {
  color: #17201b;
  letter-spacing: 0;
}

.nav-link {
  font-weight: 650;
}

.page-shell {
  max-width: 1180px;
}

.guide-hero,
.directory-header,
.section-band {
  border-radius: 8px;
  margin-bottom: 2rem;
}

.guide-hero {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(11, 22, 20, 0.86), rgba(11, 22, 20, 0.42)),
    url("https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Penarth_seafront%2C_Vale_of_Glamorgan%2C_Wales..%2C%2C.jpg/1280px-Penarth_seafront%2C_Vale_of_Glamorgan%2C_Wales..%2C%2C.jpg") center/cover;
  color: #fff;
  display: flex;
  min-height: 520px;
  overflow: hidden;
  padding: clamp(2rem, 7vw, 5rem);
}

.guide-hero__content {
  max-width: 760px;
}

.guide-hero h1,
.directory-header h1 {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.02;
  margin-bottom: 1rem;
}

.guide-hero p,
.directory-header p {
  font-size: 1.15rem;
  max-width: 680px;
}

.eyebrow {
  color: #b8324a;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.guide-hero .eyebrow {
  color: #ffd166;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-link {
  color: #fff;
  font-weight: 800;
}

.search-panel,
.filter-panel {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.search-panel {
  grid-template-columns: 1fr auto;
  max-width: 760px;
}

.filter-panel {
  align-items: end;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
}

.filter-panel label {
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.filter-panel__context {
  align-items: center;
  background: #f6f7f3;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  color: #17201b;
  display: flex;
  font-weight: 800;
  min-height: 38px;
  padding: 0.375rem 0.75rem;
}

.form-control,
.form-select {
  border-radius: 8px;
}

.directory-header,
.section-band {
  background: #fff;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.local-focus {
  align-items: center;
  background: #162c2a;
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.local-focus h2 {
  font-weight: 850;
  margin: 0 0 0.35rem;
}

.local-focus p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-weight: 800;
  margin: 0;
}

.pill-grid,
.business-grid {
  display: grid;
  gap: 1rem;
}

.pill-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.business-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.news-filter {
  grid-template-columns: 1fr 1fr auto;
}

.directory-pill,
.business-card,
.news-card {
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #fff;
}

.directory-pill {
  color: #17201b;
  display: flex;
  flex-direction: column;
  min-height: 88px;
  padding: 1rem;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.directory-pill:hover,
.directory-pill:focus {
  border-color: #0c6b58;
  box-shadow: 0 10px 22px rgba(23, 32, 27, 0.08);
  color: #17201b;
  transform: translateY(-2px);
}

.directory-pill span {
  font-weight: 800;
}

.directory-pill small,
.business-card__meta {
  color: #62706a;
}

.business-card {
  padding: 1.2rem;
  box-shadow: 0 12px 28px rgba(23, 32, 27, 0.06);
}

.business-card--listing {
  display: flex;
  flex-direction: column;
}

.news-list {
  display: grid;
  gap: 1rem;
}

.news-card {
  padding: 1.2rem;
}

.news-card h3,
.news-article h1 {
  font-weight: 800;
}

.source-line {
  color: #62706a;
  font-size: 0.95rem;
}

.news-body {
  line-height: 1.75;
  max-width: 780px;
}

.business-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.business-card h3 a {
  color: #17201b;
  text-decoration: none;
}

.business-card h3 a:hover,
.business-card h3 a:focus {
  color: #0c6b58;
  text-decoration: underline;
}

.business-card__meta {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.business-card__summary {
  color: #425048;
  line-height: 1.55;
  margin-bottom: 0;
}

.business-card__link {
  display: inline-flex;
  font-weight: 800;
  margin-top: auto;
  padding-top: 0.8rem;
}

.category-browse__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-browse__group {
  border-top: 3px solid #0c6b58;
  display: grid;
  gap: 0.8rem;
  padding-top: 0.9rem;
}

.category-browse__group h3 {
  font-size: 1rem;
  font-weight: 850;
  margin: 0;
}

.category-browse__group h3 a {
  color: #17201b;
  text-decoration: none;
}

.category-browse__group h3 a:hover,
.category-browse__group h3 a:focus {
  color: #0c6b58;
  text-decoration: underline;
}

.category-browse__group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-browse__link {
  border: 1px solid #dce3dd;
  border-radius: 999px;
  color: #425048;
  font-size: 0.9rem;
  font-weight: 750;
  padding: 0.4rem 0.65rem;
  text-decoration: none;
}

.category-browse__link:hover,
.category-browse__link:focus,
.category-browse__link--active {
  background: #0c6b58;
  border-color: #0c6b58;
  color: #fff;
}

.directory-results-shell {
  align-items: start;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 42%);
  margin-bottom: 2rem;
}

.directory-results-list {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.directory-results-heading,
.business-result-section,
.directory-map-card {
  background: #fff;
  border: 1px solid #dce3dd;
  border-radius: 8px;
}

.directory-results-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.25rem;
}

.directory-results-heading h2 {
  font-size: 1.85rem;
  font-weight: 850;
  line-height: 1.15;
  margin: 0;
}

.business-result-section {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.business-result-section__heading {
  align-items: center;
  background: #f6f7f3;
  border-bottom: 1px solid #dce3dd;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
}

.business-result-section__heading h3 {
  font-size: 1rem;
  font-weight: 850;
  margin: 0;
}

.business-result-section__heading span {
  color: #62706a;
  font-size: 0.88rem;
  font-weight: 800;
}

.business-result-list {
  display: grid;
}

.business-result-card {
  display: grid;
  gap: 1rem;
  grid-template-columns: 34px 156px minmax(0, 1fr);
  padding: 1rem 1.1rem;
  scroll-margin-top: 1rem;
}

.business-result-card + .business-result-card {
  border-top: 1px solid #edf1ee;
}

.business-result-card:hover,
.business-result-card:focus-within {
  background: #fbfcfb;
}

.business-result-card--further {
  background: #fffdf8;
}

.business-result-number {
  align-items: center;
  background: #d32323;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(23, 32, 27, 0.18);
  color: #fff;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.business-result-media {
  align-self: start;
  aspect-ratio: 4 / 3;
  background: #eef4ef;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  display: grid;
  min-height: 116px;
  overflow: hidden;
  place-items: center;
}

.business-result-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.business-result-media span {
  color: #62706a;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0.8rem;
  text-align: center;
}

.business-result-body {
  min-width: 0;
}

.business-result-body h3 {
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

.business-result-body h3 a {
  color: #17201b;
  text-decoration: none;
}

.business-result-body h3 a:hover,
.business-result-body h3 a:focus {
  color: #0c6b58;
  text-decoration: underline;
}

.business-result-rating {
  color: #b8324a;
  font-size: 0.92rem;
  font-weight: 850;
  margin: 0 0 0.35rem;
}

.business-result-address {
  color: #425048;
  font-size: 0.94rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
}

.business-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.business-result-tags a {
  border: 1px solid #dce3dd;
  border-radius: 999px;
  color: #425048;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
}

.business-result-tags a:hover,
.business-result-tags a:focus {
  border-color: #0c6b58;
  color: #0c6b58;
}

.directory-map-sticky {
  align-self: start;
  position: sticky;
  top: 1rem;
}

.directory-map-card {
  box-shadow: 0 14px 32px rgba(23, 32, 27, 0.08);
  overflow: hidden;
}

.directory-map-card__header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}

.directory-map-card__header strong {
  font-weight: 850;
}

.directory-map-card__header span {
  color: #62706a;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.directory-map-panel {
  overflow: hidden;
}

.directory-map-panel__count {
  background: #eef4ef;
  border: 1px solid #d6e3da;
  border-radius: 999px;
  color: #425048;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.45rem 0.7rem;
  white-space: nowrap;
}

.directory-map-panel__layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 250px);
}

.directory-map {
  border: 1px solid #dce3dd;
  border-radius: 8px;
  height: clamp(330px, 46vw, 520px);
  min-height: 330px;
  overflow: hidden;
  width: 100%;
}

.directory-map--sticky {
  border: 0;
  border-radius: 0;
  border-top: 1px solid #dce3dd;
  height: calc(100vh - 190px);
  min-height: 480px;
}

.directory-map-legend {
  align-content: start;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem;
}

.directory-map-legend__item {
  align-items: center;
  color: #425048;
  display: grid;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.55rem;
  grid-template-columns: 30px minmax(0, 1fr);
}

.directory-map-panel__empty {
  margin-top: 1rem;
}

.directory-map-icon-wrapper {
  background: transparent;
  border: 0;
}

.directory-map-marker {
  align-items: center;
  background: #0c6b58;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(23, 32, 27, 0.24);
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
  text-align: center;
  width: 34px;
}

.directory-map-marker--legend {
  box-shadow: none;
  font-size: 0.65rem;
  height: 28px;
  width: 28px;
}

.directory-map-marker--education {
  background: #3d5afe;
}

.directory-map-marker--health {
  background: #b8324a;
}

.directory-map-marker--food {
  background: #9a5b00;
}

.directory-map-marker--motor {
  background: #2f3a45;
}

.directory-map-marker--leisure {
  background: #287c3e;
}

.directory-map-marker--civic {
  background: #6a3d9a;
}

.directory-map-marker--services {
  background: #006d8f;
}

.directory-map-marker--business {
  background: #0c6b58;
}

.leaflet-popup-content {
  display: grid;
  gap: 0.18rem;
  line-height: 1.35;
  margin: 0.75rem 0.85rem;
}

.leaflet-popup-content strong {
  font-size: 0.98rem;
}

.directory-popup-result {
  color: #b8324a;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
  text-transform: uppercase;
}

.directory-popup-result:hover,
.directory-popup-result:focus {
  text-decoration: underline;
}

.leaflet-popup-content span,
.leaflet-popup-content small {
  color: #425048;
}

.town-map {
  min-height: 420px;
}

.town-map-icon-wrapper {
  background: transparent;
  border: 0;
}

.town-map-marker {
  background: #0c6b58;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(23, 32, 27, 0.24);
  display: inline-flex;
  height: 18px;
  width: 18px;
}

.town-map-marker--hub {
  border-width: 3px;
  height: 26px;
  width: 26px;
}

.town-map-marker--region {
  border-width: 3px;
  height: 34px;
  width: 34px;
}

.town-map-marker--legend {
  box-shadow: none;
  height: 18px;
  width: 18px;
}

.town-map-marker--penarth {
  background: #006d8f;
}

.town-map-marker--barry {
  background: #0c6b58;
}

.town-map-marker--cowbridge {
  background: #9a5b00;
}

.town-map-marker--llantwit {
  background: #b8324a;
}

.town-map-marker--inland {
  background: #6a3d9a;
}

.town-map-marker--other {
  background: #425048;
}

.town-group {
  border-top: 1px solid #dce3dd;
  padding: 1.25rem 0 0;
}

.town-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.town-group + .town-group {
  margin-top: 1.25rem;
}

.town-group h3 {
  font-size: 1.25rem;
  font-weight: 850;
  margin: 0 0 0.75rem;
}

.town-group h3 a {
  color: #17201b;
  text-decoration: none;
}

.town-group h3 a:hover,
.town-group h3 a:focus {
  color: #0c6b58;
  text-decoration: underline;
}

.town-group__header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.town-group__header h3 {
  margin: 0;
}

.town-group__header > a {
  font-weight: 800;
  white-space: nowrap;
}

.town-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.town-link {
  align-items: center;
  border: 1px solid #d6e3da;
  border-radius: 999px;
  color: #17201b;
  display: inline-flex;
  font-weight: 800;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
}

.town-link:hover,
.town-link:focus {
  border-color: #0c6b58;
  color: #0c6b58;
}

.town-link--hub {
  background: #17201b;
  border-color: #17201b;
  color: #fff;
}

.town-link--hub:hover,
.town-link--hub:focus {
  background: #0c6b58;
  border-color: #0c6b58;
  color: #fff;
}

.region-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.region-card {
  border: 1px solid #dce3dd;
  border-radius: 8px;
  color: #17201b;
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  text-decoration: none;
}

.region-card:hover,
.region-card:focus {
  border-color: #0c6b58;
  box-shadow: 0 10px 22px rgba(23, 32, 27, 0.08);
  color: #17201b;
}

.region-card strong {
  font-size: 1.1rem;
}

.region-card > span:last-child {
  color: #425048;
}

.region-legend-link {
  color: #425048;
  text-decoration: none;
}

.region-legend-link:hover,
.region-legend-link:focus {
  color: #0c6b58;
}

.lesley-says {
  background: #f6f7f3;
  border-left: 4px solid #b8324a;
  border-radius: 8px;
  display: grid;
  gap: 0.25rem;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
}

.lesley-says strong {
  color: #b8324a;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.social-links a {
  font-weight: 700;
}

.business-profile-hero {
  align-items: start;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.business-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.business-profile-status {
  background: #f6f7f3;
  border: 1px solid #dde5df;
  border-radius: 8px;
  display: grid;
  gap: 0.45rem;
  min-width: 180px;
  padding: 1rem;
}

.business-profile-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.business-profile-main,
.business-profile-sidebar {
  align-self: start;
}

.category-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.category-chip-list a {
  background: #eef4ef;
  border: 1px solid #d6e3da;
  border-radius: 999px;
  color: #17201b;
  font-weight: 800;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
}

.category-chip-list a:hover,
.category-chip-list a:focus {
  border-color: #0c6b58;
  color: #0c6b58;
}

.manage-business-form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.business-details {
  display: grid;
  gap: 0.2rem 0.75rem;
  grid-template-columns: auto 1fr;
}

.business-details--compact {
  margin-bottom: 0.1rem;
}

.business-details dt {
  color: #62706a;
}

.business-details dd {
  margin: 0;
}

.empty-state {
  background: #f6f7f3;
  border: 1px dashed #c9d3cb;
  border-radius: 8px;
  margin: 0;
  padding: 1rem;
}

.address-image-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.address-image {
  background: #fff;
  border: 1px solid #dde5df;
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.address-image img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.address-image figcaption {
  color: #425048;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
}

.address-image figcaption span {
  color: #62706a;
  font-size: 0.9rem;
}

.address-history-list {
  display: grid;
  gap: 0.75rem;
}

.address-history-item {
  align-items: start;
  background: #fff;
  border: 1px solid #dde5df;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
}

.address-history-item h3,
.address-history-item p {
  margin: 0;
}

.status-badge {
  background: #eef4ef;
  border-radius: 999px;
  color: #425048;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.45rem;
  padding: 0.35rem 0.55rem;
}

.status-badge--closed {
  background: #f4e8e8;
  color: #9a2f2f;
}

.footer {
  background: #fff;
  line-height: 1.4;
  margin-top: 2rem;
  padding: 1.25rem 0;
  width: 100%;
}

@media (max-width: 980px) {
  .directory-results-shell {
    grid-template-columns: 1fr;
  }

  .directory-map-sticky {
    order: -1;
    position: static;
  }

  .directory-map--sticky {
    height: 420px;
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .guide-hero {
    min-height: 400px;
    padding: 2rem 1.2rem;
  }

  .search-panel,
  .filter-panel,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .guide-hero h1,
  .directory-header h1 {
    font-size: 2.55rem;
  }

  .local-focus {
    align-items: start;
    flex-direction: column;
  }

  .business-profile-hero {
    flex-direction: column;
  }

  .business-profile-layout {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .directory-results-heading,
  .business-result-section__heading,
  .directory-map-card__header {
    align-items: start;
    flex-direction: column;
  }

  .business-result-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .business-result-media,
  .business-result-body {
    grid-column: 2;
  }

  .business-result-media {
    max-width: 280px;
    min-height: 0;
    width: min(100%, 280px);
  }

  .directory-map-panel__layout {
    grid-template-columns: 1fr;
  }

  .directory-map {
    height: 360px;
  }

  .directory-map-legend {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .address-history-item {
    flex-direction: column;
  }
}
