:root {
  --bg-warm: #f2ece0;
  --bg-cool: #dde8f1;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.8);
  --ink: #1c2a38;
  --muted: #5d6b78;
  --line: #d0dbe4;
  --accent: #0b5cad;
  --accent-deep: #073c72;
}

* {
  box-sizing: border-box;
}

body.uk-theme {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(11, 92, 173, 0.16) 0%, transparent 28%),
    radial-gradient(circle at 10% 0%, rgba(220, 176, 96, 0.16) 0%, transparent 24%),
    linear-gradient(164deg, var(--bg-warm), var(--bg-cool));
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
}

.uk-theme .container {
  padding-top: 24px;
  padding-bottom: 30px;
}

.uk-theme .row {
  margin-bottom: 16px;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  box-shadow: 0 10px 26px rgba(22, 32, 44, 0.08);
  animation: uk-fade-up 500ms ease both;
}

.uk-theme .row:nth-of-type(2) {
  animation-delay: 70ms;
}

.uk-theme .row:nth-of-type(3) {
  animation-delay: 140ms;
}

.uk-theme h1 {
  margin-top: 2px;
  margin-bottom: 8px;
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.uk-theme h2 {
  margin-top: 6px;
  color: #344759;
  font-size: 1.34rem;
}

.uk-theme h3 {
  color: var(--muted);
}

.uk-theme h4 {
  margin-top: 0;
  color: #2d4559;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.uk-theme .small-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.uk-theme .breadcrumb-row {
  margin-top: -4px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.uk-theme .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #3f5468;
}

.uk-theme .breadcrumbs .crumb-sep {
  color: #768da2;
}

.uk-theme .breadcrumbs .crumb-current {
  color: #2c4153;
  font-weight: 600;
}

.uk-theme .breadcrumb-ad-row {
  margin-top: -8px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.uk-theme .breadcrumb-adsense {
  max-width: 540px;
  margin: 0 auto;
}

.uk-theme a {
  color: var(--accent);
  text-decoration: none;
}

.uk-theme a:hover,
.uk-theme a:focus {
  color: var(--accent-deep);
  text-decoration: underline;
}

.uk-theme #cse-search-box div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uk-theme .header-search-col {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.uk-theme .header-search-compact {
  width: 100%;
  max-width: 320px;
}

.uk-theme .header-search-compact input[type="text"] {
  padding: 8px 10px;
}

.uk-theme .header-search-compact input[type="submit"] {
  padding: 7px 13px;
  min-width: 96px;
}

.uk-theme .header-search-compact .gcse-searchbox-only {
  max-width: 320px;
  margin-left: auto;
}

.uk-theme input[type="text"] {
  width: 100%;
  border: 1px solid #bacada;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fcfdff;
}

.uk-theme input[type="submit"] {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(94deg, var(--accent), #2079d4);
  color: #fff;
  padding: 8px 15px;
  font-weight: 700;
  width: fit-content;
  min-width: 110px;
}

.uk-theme #codes {
  line-height: 1.9;
  padding: 4px 2px;
}

.uk-theme .code-list-scroll {
  overflow: auto;
  max-height: 320px;
}

.uk-theme .locations-search-wrap {
  margin-bottom: 10px;
}

.uk-theme #outward-search,
.uk-theme #postcode-search {
  width: 100%;
  border: 1px solid #bacada;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fcfdff;
}

.uk-theme .location-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.uk-theme .location-card {
  display: block;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid #c6d5e3;
  background: #f7fbff;
  font-size: 0.88rem;
  line-height: 1.2;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.uk-theme .location-card:hover,
.uk-theme .location-card:focus {
  border-color: #9db6cc;
  box-shadow: 0 5px 12px rgba(22, 32, 44, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.uk-theme #codes a,
.uk-theme .postcode-links a,
.uk-theme.page-index .col-md-12 > a {
  display: inline-block;
  margin: 3px 5px 3px 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #c6d5e3;
  background: #f7fbff;
  font-size: 13px;
}

.uk-theme .map-wrap {
  border-radius: 14px;
  border: 1px solid #c6d4e1;
  overflow: hidden;
  background: #edf3fb;
}

.uk-theme .embed-responsive,
.uk-theme #map {
  border-radius: 12px;
  overflow: hidden;
}

.uk-theme #map {
  min-height: 360px;
}

.uk-theme .leaflet-container {
  border: 1px solid #c6d4e1;
}

.uk-theme .utility-links {
  font-size: 0.97rem;
}

.uk-theme .utility-links a {
  display: inline;
  margin: 0 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-size: inherit;
}

@keyframes uk-fade-up {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1280px) {
  .uk-theme.page-code .container,
  .uk-theme.page-town .container,
  .uk-theme.page-index .container {
    max-width: 980px;
  }

  .uk-theme.page-code > .row,
  .uk-theme.page-town > .row,
  .uk-theme.page-index > .row {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .uk-theme .container {
    padding-top: 14px;
    padding-bottom: 20px;
  }

  .uk-theme .row {
    margin-bottom: 10px;
    border-radius: 12px;
    padding: 14px 8px;
  }

  .uk-theme #map {
    min-height: 320px;
  }
}
