*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--blue-950);
  background: var(--white);
  font-family: var(--font-sans);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.shell {
  width: min(100% - 2rem, 88rem);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.site-header-inner {
  display: flex;
  min-height: 4.6rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--blue-800);
  text-decoration: none;
}

.brand-mark {
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-name {
  max-width: 13rem;
  border-left: 1px solid var(--line);
  padding-left: 0.9rem;
  color: #536d79;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.25;
}

.section-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.8rem);
}

.section-nav a {
  position: relative;
  display: grid;
  height: 100%;
  align-items: center;
  color: #344d58;
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: none;
}

.section-nav .nav-search {
  display: flex;
  gap: 0.38rem;
}

.nav-search svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.section-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--blue-700);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.section-nav a:hover::after,
.section-nav a:focus-visible::after,
.section-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.page-intro {
  border-bottom: 1px solid var(--line);
  background: var(--ice);
}

.page-intro-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  padding-block: clamp(2.5rem, 5vw, 4.75rem);
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: var(--white);
  background: var(--orange-dark);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: #607985;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow-dark {
  color: var(--blue-700);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.7vw, 4.75rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  font-weight: 400;
  line-height: 1.08;
}

.main-content {
  padding-block: 3.5rem 5rem;
}

.filter-panel,
.detail-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.filter-panel {
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--line);
  padding: 0 0 2.25rem;
}

.portfolio-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(5.5rem, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0;
}

.portfolio-metrics div {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.portfolio-metrics dt,
.portfolio-metrics dd {
  margin: 0;
}

.portfolio-metrics dt {
  color: #607985;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
}

.portfolio-metrics dd {
  order: -1;
  color: #46616d;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

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

.filter-heading h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
}

.clear-button {
  border: 0;
  padding: 0.45rem 0;
  color: var(--blue-800);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
}

.clear-button:hover,
.clear-button:focus-visible {
  color: var(--blue-950);
}

.filters {
  display: grid;
  grid-template-columns: minmax(13rem, 1.45fr) repeat(3, minmax(10rem, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.38rem;
}

.field span {
  color: #46616d;
  font-size: 0.72rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 2.8rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.65rem 1.5rem 0.65rem 0;
  color: var(--blue-950);
  background-color: transparent;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue-700);
  outline: 0;
  box-shadow: 0 1px 0 var(--blue-700);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3.25rem;
}

.map-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.map-panel {
  min-width: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--blue-950);
  background: var(--ice);
}

.map-summary {
  display: grid;
  grid-template-columns: minmax(10rem, auto) minmax(28rem, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  padding-top: 1.35rem;
}

.result-count {
  color: #607985;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.3;
}

.status-key {
  display: grid;
  gap: 0.55rem;
}

.map-status-key {
  position: absolute;
  z-index: 6;
  bottom: 1rem;
  left: 1rem;
  border-left: 2px solid var(--blue-700);
  padding: 0.75rem 0.9rem;
  background: var(--white);
  pointer-events: none;
}

.status-key > p {
  margin: 0;
  color: #607985;
  font-size: 0.7rem;
  font-weight: 650;
}

.map-status-key > p {
  color: var(--blue-950);
  font-weight: 700;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  color: #46616d;
  font-size: 0.72rem;
  list-style: none;
}

.status-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.legend-active {
  background: var(--orange);
}

.legend-completed {
  background: #42a1bf;
}

.legend-planned {
  background: #d8b24a;
}

.map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1009.5 / 525.733;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}

.map-wrap.is-zoomed {
  cursor: grab;
  touch-action: pan-y;
}

.map-wrap.is-dragging {
  cursor: grabbing;
}

.map-stage {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
  user-select: none;
  will-change: transform;
}

.map-wrap.is-dragging .map-stage {
  transition: none;
}

.world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(87%) sepia(12%) saturate(427%) hue-rotate(151deg) brightness(101%) contrast(91%);
  pointer-events: none;
}

.marker-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.map-pin {
  --marker-color: var(--orange);
  --marker-halo: rgba(198, 106, 69, 0.25);
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  padding: 0;
  background: transparent;
  transform: translate(-50%, -50%);
}

.marker-dot {
  --marker-scale: 1;
  display: block;
  width: 0.66rem;
  height: 0.66rem;
  border: 1px solid var(--white);
  border-radius: 50%;
  background: var(--marker-color);
  box-shadow: 0 0 0 0.14rem var(--marker-halo);
  transform: scale(var(--marker-scale));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.map-pin[data-status="completed"] {
  --marker-color: #42a1bf;
  --marker-halo: rgba(66, 161, 191, 0.25);
}

.map-pin[data-status="planned"] {
  --marker-color: #d8b24a;
  --marker-halo: rgba(216, 178, 74, 0.25);
}

.map-pin::before,
.map-pin::after {
  position: absolute;
  z-index: 4;
  left: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}

.map-pin::before {
  bottom: calc(100% + 0.75rem);
  width: max-content;
  max-width: min(13rem, calc(100vw - 2rem));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
  padding: 0.38rem 0.56rem;
  color: var(--white);
  background: rgba(0, 59, 86, 0.96);
  box-shadow: 0 8px 22px rgba(0, 28, 41, 0.24);
  content: attr(data-tooltip);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  transform: translate(-50%, 0.2rem) scale(0.77);
  transform-origin: bottom center;
  white-space: normal;
}

.map-pin::after {
  bottom: calc(100% + 0.48rem);
  border-top: 0.32rem solid rgba(0, 59, 86, 0.96);
  border-right: 0.3rem solid transparent;
  border-left: 0.3rem solid transparent;
  content: "";
  transform: translateX(-50%) scale(0.77);
}

.map-pin:hover .marker-dot,
.map-pin:focus-visible .marker-dot,
.map-pin.is-active .marker-dot {
  --marker-scale: 1.18;
  box-shadow: 0 0 0 0.4rem var(--marker-halo);
}

.map-pin.is-active .marker-dot {
  box-shadow: 0 0 0 0.26rem rgba(255, 255, 255, 0.9), 0 0 0 0.56rem var(--marker-halo);
}

.map-pin:focus-visible {
  border-radius: 50%;
  outline: 2px solid var(--white);
  outline-offset: 1px;
}

.map-pin:hover::before,
.map-pin:hover::after,
.map-pin:focus-visible::before,
.map-pin:focus-visible::after {
  opacity: 1;
}

.map-pin:hover::before,
.map-pin:focus-visible::before {
  transform: translate(-50%, 0) scale(0.77);
}

.map-pin[hidden] {
  display: none;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.9rem;
}

.map-toolbar > p {
  margin: 0;
  color: #607985;
  font-size: 0.72rem;
}

.map-controls {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
}

.map-controls button {
  min-width: 2.65rem;
  min-height: 2.5rem;
  border: 0;
  padding: 0 0.75rem;
  color: var(--blue-950);
  background: var(--white);
  font-size: 1.25rem;
}

.map-controls button + button {
  border-left: 1px solid var(--line);
}

.map-controls button:hover,
.map-controls button:focus-visible {
  color: var(--blue-700);
  background: var(--ice);
}

.map-controls button:disabled {
  cursor: default;
  opacity: 0.35;
}

.map-controls .reset-control {
  min-width: auto;
  font-size: 0.72rem;
  font-weight: 700;
}

.detail-panel {
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: var(--ice-strong);
  box-shadow: 0 0 0 100vmax var(--ice-strong);
  clip-path: inset(0 -100vmax);
}

.detail-disclosure {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  border: 0;
  padding: 1.35rem 0;
  color: #607985;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.detail-disclosure::after {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--blue-950);
  content: "";
  transform: rotate(45deg);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-panel[data-expanded="true"] > .detail-disclosure::after {
  transform: translateY(0.25rem) rotate(225deg);
}

.detail-disclosure:focus-visible {
  outline: 2px solid var(--blue-700);
  outline-offset: 0.25rem;
}

.detail-disclosure > span {
  font-size: 0.75rem;
  font-weight: 650;
}

.detail-disclosure > strong {
  color: var(--blue-950);
  font-size: 0.9rem;
}

.detail-body {
  display: grid;
  grid-template-rows: 1fr;
  padding: 1rem 0 2.75rem;
  opacity: 1;
  transition: grid-template-rows 650ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 420ms ease,
    padding 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-body-inner {
  min-height: 0;
  overflow: hidden;
}

.detail-panel[data-expanded="false"] .detail-body {
  grid-template-rows: 0fr;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.detail-overview {
  max-width: 42rem;
}

.detail-supporting {
  display: grid;
  gap: 2rem;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0;
  color: var(--blue-950);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 700;
}

.status-badge::before {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

.status-completed::before {
  background: #42a1bf;
}

.status-planned::before {
  background: #d8b24a;
}

.office-type-badge {
  color: #607985;
  font-size: 0.68rem;
  font-weight: 700;
}

.detail-panel h2 {
  margin-bottom: 0.3rem;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
}

.detail-region {
  margin-bottom: 0.85rem;
  color: var(--blue-700);
  font-size: 0.72rem;
  font-weight: 700;
}

.programme-title {
  margin: 1.5rem 0 0.65rem;
  color: var(--blue-950);
  font-family: var(--font-sans);
  font-size: 1.08rem;
  line-height: 1.35;
}

.detail-summary {
  max-width: 40rem;
  margin-bottom: 0;
  color: #46616d;
  font-size: 0.95rem;
  line-height: 1.7;
}

.record-metadata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin: 0;
}

.record-metadata div {
  padding: 0;
}

.record-metadata dt,
.record-metadata dd {
  margin: 0;
}

.record-metadata dt {
  color: #607985;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0;
}

.record-metadata dd {
  margin-top: 0.35rem;
  color: var(--blue-950);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.detail-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.detail-section h3 {
  color: #607985;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
}

.detail-section {
  padding: 0;
}

.detail-section h3 {
  margin: 0 0 0.7rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0;
  color: var(--blue-900);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 650;
}

.tag-list li:not(:last-child)::after {
  margin-left: 0.3rem;
  color: var(--orange);
  content: "·";
}

.partner-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  color: #46616d;
  font-size: 0.78rem;
  line-height: 1.45;
  list-style: none;
}

.page-footer {
  border-top: 1px solid var(--line);
  padding-block: 1rem 1.25rem;
  color: #607985;
  background: var(--ice);
  font-size: 0.72rem;
  line-height: 1.5;
}

.page-footer a {
  color: var(--blue-800);
  font-weight: 700;
}

.portfolio-return {
  position: fixed;
  z-index: 1000;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  left: calc(0.75rem + env(safe-area-inset-left));
  display: inline-flex;
  max-width: calc(100vw - 1.5rem - env(safe-area-inset-left) - env(safe-area-inset-right));
  min-height: 2.25rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.125rem;
  padding: 0.55rem 0.75rem;
  color: var(--white);
  background: var(--blue-950);
  box-shadow: 0 0.25rem 1rem rgba(0, 42, 61, 0.2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.portfolio-return:hover {
  border-color: var(--white);
  background: var(--blue-900);
  box-shadow: 0 0.35rem 1.15rem rgba(0, 42, 61, 0.28);
  transform: translateY(-1px);
}

.portfolio-return:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.portfolio-return > span[aria-hidden="true"] {
  font-size: 0.9rem;
  line-height: 0;
}

.detail-empty {
  display: grid;
  min-height: 10rem;
  align-content: center;
}

.detail-empty[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 64rem) {
  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .map-summary {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 50rem) {
  .page-intro-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    padding-block: 2.75rem;
  }

  .brand-name {
    display: none;
  }

  .main-content {
    padding-block: 2rem 3.5rem;
  }

  .portfolio-metrics {
    grid-template-columns: repeat(2, minmax(6.5rem, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }
}

@media (max-width: 36rem) {
  .shell {
    width: min(100% - 1.2rem, 88rem);
  }

  .main-content {
    padding-block: 1.5rem 3rem;
  }

  .site-header-inner {
    min-height: 4rem;
  }

  .section-nav {
    gap: 0.9rem;
  }

  .section-nav a:last-child {
    display: none;
  }

  .page-intro-inner {
    padding-block: 2.25rem 2.5rem;
  }

  .filter-panel {
    margin-bottom: 2.5rem;
  }

  .filter-heading {
    align-items: baseline;
  }

  .portfolio-metrics {
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .filters {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-color: rgba(0, 59, 86, 0.25) transparent;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .filters::-webkit-scrollbar {
    height: 0.25rem;
  }

  .filters::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 59, 86, 0.25);
  }

  .field {
    min-width: 10.5rem;
    scroll-snap-align: start;
  }

  .field-search {
    min-width: 16rem;
  }

  .map-wrap {
    height: 24rem;
    aspect-ratio: auto;
  }

  .map-status-key {
    right: 0.6rem;
    bottom: 0.6rem;
    left: 0.6rem;
    padding: 0.65rem 0.75rem;
  }

  .map-stage {
    inset: auto;
    top: 0;
    left: 0;
    width: 56rem;
    height: auto;
    aspect-ratio: 1009.5 / 525.733;
  }

  .status-legend {
    gap: 0.7rem;
    font-size: 0.68rem;
  }

  .map-toolbar {
    display: grid;
    gap: 0.75rem;
    justify-items: start;
  }

  .map-toolbar > p {
    line-height: 1.45;
  }

  .map-controls button {
    min-width: 2.5rem;
    min-height: 2.35rem;
  }

  .detail-disclosure {
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
  }

  .detail-disclosure > span {
    grid-column: 1 / -1;
  }

  .detail-body {
    padding-top: 0.75rem;
  }

  .record-metadata,
  .detail-sections {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .portfolio-return:hover {
    transform: none;
  }
}
