/* app.css: what this app adds to the styles it shares with the phone app: the wide-screen layout (the phone's column becomes a
   full page with centred reading widths), the hub's aerial hero and feature cards, the ward, size and business screens, the map's
   own chrome (MapLibre). Loaded last, so it wins over the copied sheets. */

:root {
  --status-h: 0px; /* no sandbox strip: this is its own app */
  --page-w: 1120px; /* the hub and the top bar */
  --read-w: 880px; /* lists, a permit's page and the analysis screens */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --glass: rgba(255, 255, 255, 0.86);
  --navy-0: #020b1c;
  --navy-1: #06204a;
  --navy-2: #12458f;
}

/* ------------------------------------------------------------------ the page: full width, no phone column */
html {
  background: var(--background);
  scroll-behavior: smooth;
}
@media (min-width: 520px) {
  html {
    background: var(--background);
  }
  .app {
    box-shadow: none;
  }
}
.app {
  width: 100%;
}
.app-bar {
  padding-inline: max(0px, calc((100% - var(--page-w)) / 2));
  background: color-mix(in srgb, var(--background) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--outline-variant) 35%, transparent);
}
.ins-fabwrap {
  right: max(16px, calc((100vw - var(--read-w)) / 2 + 16px));
}
.ins-list,
.ins-permit,
.ins-analysis {
  width: 100%;
  max-width: var(--read-w);
  margin-inline: auto;
}
.ins-list__sticky {
  top: calc(var(--safe-top) + var(--topbar-h));
}
a.ins-pcard,
button.ins-pcard,
.ins-pic,
.ins-mapcard,
.ins-wardcard,
.ins-biz {
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out), border-color 0.2s;
}
@media (hover: hover) {
  a.ins-pcard:hover,
  button.ins-pcard:hover,
  .ins-wardcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px -14px rgba(0, 32, 69, 0.45);
    border-color: color-mix(in srgb, var(--primary) 30%, var(--outline-variant));
  }
  .ins-pic:hover,
  .ins-mapcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px -16px rgba(0, 20, 45, 0.6);
  }
}
.ins-pic img {
  transition: transform 0.9s var(--ease-out);
}
@media (hover: hover) {
  .ins-pic:hover img {
    transform: scale(1.05);
  }
}

/* ------------------------------------------------------------------ the hub: aerial hero */
.ins-hero--city {
  min-height: 360px;
  isolation: isolate;
  background: radial-gradient(120% 90% at 82% 0%, var(--navy-2) 0%, var(--navy-1) 46%, var(--navy-0) 100%);
}
.ins-hero__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s ease;
}
.ins-hero--photo .ins-hero__photo {
  opacity: 1;
  animation: hero-drift 54s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.24) translate3d(-2.5%, -3%, 0);
  }
}
.ins-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(2, 11, 28, 0.5) 0%, rgba(2, 11, 28, 0.12) 28%, rgba(2, 11, 28, 0.7) 66%, rgba(2, 11, 28, 0.95) 100%),
    linear-gradient(100deg, rgba(4, 26, 64, 0.78), rgba(4, 26, 64, 0) 72%);
}
.ins-hero__credit {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  line-height: 14px;
  opacity: 0;
  transition: opacity 1s ease 0.6s;
}
.ins-hero--photo .ins-hero__credit {
  opacity: 1;
}
.ins-hero--city .ins-hero__body {
  max-width: var(--page-w);
  margin-inline: auto;
  padding-top: 72px;
  animation: rise-in 0.9s var(--ease-out) both;
}
.ins-hero--city .ins-hero__body h1 {
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.ins-hero--city .ins-search {
  max-width: 680px;
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.55);
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
.ins-hub__body {
  width: 100%;
  max-width: var(--page-w);
  margin-inline: auto;
}
.ins-hub__preview:empty {
  display: none;
}

/* the reading skeleton */
.ins-skel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.ins-skel__bar {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--sc-high) 0%, var(--sc-low) 40%, var(--sc-high) 80%);
  background-size: 220% 100%;
  animation: skel 1.4s linear infinite;
}
.ins-skel__bar--short {
  width: 58%;
}
@keyframes skel {
  to {
    background-position: -220% 0;
  }
}

/* new since the last visit */
.ins-newcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 10px 14px 18px;
  border-radius: 18px;
  border: 1px solid #b9e6cf;
  background: linear-gradient(115deg, #e3f7ec 0%, #f5fcf8 70%);
  color: inherit;
  text-decoration: none;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out);
}
.ins-newcard > svg {
  flex: none;
  color: var(--secondary);
}
.ins-newcard__pulse {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 169, 113, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 14px rgba(31, 169, 113, 0);
  }
}
@media (hover: hover) {
  .ins-newcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -16px rgba(10, 108, 68, 0.7);
  }
}

/* the ways in: gradient cards */
.ins-featrow {
  display: flex;
  gap: 12px;
  margin: 0 -16px;
  padding: 2px 16px 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.ins-featrow::-webkit-scrollbar {
  display: none;
}
.ins-featrow__item {
  flex: 0 0 min(76vw, 268px);
  display: flex;
  scroll-snap-align: start;
}
.ins-feat {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 204px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(140deg, var(--from), var(--to));
  box-shadow: 0 14px 26px -18px var(--to);
  color: #fff;
  text-decoration: none;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.ins-feat::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(90% 70% at 0% 0%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%);
}
/* the picture across the top of a card: it fades out downwards into the card's own colour, and the icon disc sits on the fade */
.ins-feat__media {
  position: relative;
  z-index: -1;
  flex: 0 0 auto;
  height: 108px;
  margin: -16px -16px -22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 56%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 56%, rgba(0, 0, 0, 0) 100%);
}
.ins-feat__media.is-empty {
  visibility: hidden;
}
.ins-feat__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transition: transform 0.7s var(--ease-out);
}
.ins-feat__credit {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  line-height: 14px;
}
.ins-feat--pic .ins-feat__disc {
  background: color-mix(in srgb, var(--from) 62%, rgba(255, 255, 255, 0.3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 6px 14px -6px rgba(0, 0, 0, 0.5);
}
.ins-feat__ghost {
  position: absolute;
  right: -24px;
  bottom: -28px;
  z-index: -1;
  color: rgba(255, 255, 255, 0.13);
  line-height: 0;
  transition: transform 0.7s var(--ease-out);
}
.ins-feat__disc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.ins-feat__go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}
.ins-feat__go svg {
  transition: transform 0.35s var(--ease-out);
}
@media (hover: hover) {
  .ins-feat:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 34px -18px var(--to);
  }
  .ins-feat:hover .ins-feat__ghost {
    transform: scale(1.12) rotate(-6deg);
  }
  .ins-feat:hover .ins-feat__img {
    transform: scale(1.06);
  }
  .ins-feat:hover .ins-feat__go svg {
    transform: translateX(4px);
  }
}

/* ------------------------------------------------------------------ small pieces shared by the new screens */
.ins-caution {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--warn-bg);
  color: #4d2f00;
}
.ins-caution > svg {
  flex: none;
  margin-top: 1px;
  color: var(--warn);
}
.ins-caution .ins-t {
  color: #4d2f00 !important;
}
.ins-reading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--sc-lowest);
  border: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent);
}
.ins-list .ins-reading {
  margin: 8px 0 4px;
  padding: 12px 14px;
}
.ins-reading__track {
  display: block;
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--sc-high);
  overflow: hidden;
}
.ins-reading__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), #2f80ff);
  transition: width 0.4s ease;
}
.ins-chiprow--scroll {
  padding-bottom: 2px;
}
.ins-chiprow--inset {
  margin: 0;
  padding: 0 16px 10px;
}
.ins-hiddenline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 16px;
}
.ins-minilist {
  display: flex;
  flex-direction: column;
  padding: 0 10px 10px;
}
.ins-secgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.ins-storeys {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #eceff1;
  color: #546e7a;
}
.ins-storeys--open {
  background: #e3efff;
  color: #1565c0;
}
.ins-lensdot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.ins-lensbar {
  display: block;
  height: 5px;
  margin-top: 5px;
  border-radius: 3px;
  background: var(--sc);
  overflow: hidden;
}
.ins-lensbar__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.ins-mapsheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

/* a skyline of towers */
.ins-skyline__scroll {
  margin: 0 -16px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.ins-skyline {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-width: min-content;
  padding-top: 18px;
}
.ins-skyline__year {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ins-skyline__year > .ins-skyline__bars {
  border-bottom: 2px solid var(--outline-variant);
}
.ins-skyline__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}
.ins-skyline__tower {
  position: relative;
  flex: none;
  width: 16px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to bottom, #b0bec5, #90a4ae);
  text-decoration: none;
  transform-origin: bottom;
  animation: tower-up 0.9s var(--ease-out) both;
  transition: filter 0.2s, transform 0.2s;
}
.ins-skyline__tower::after {
  /* windows */
  content: '';
  position: absolute;
  inset: 4px 3px 2px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px 6px);
  opacity: 0.55;
}
.ins-skyline__tower--open {
  background: linear-gradient(to bottom, #5ea2ff, #1565c0);
}
.ins-skyline__n {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  padding-bottom: 2px;
  color: var(--on-surface-variant);
  font-size: 9px;
  line-height: 11px;
  font-weight: 700;
}
@media (hover: hover) {
  .ins-skyline__tower:hover {
    filter: brightness(1.12);
    transform: scaleY(1.04);
  }
}
@keyframes tower-up {
  from {
    transform: scaleY(0);
  }
}

/* a dot map */
.ins-dotmap {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.ins-dotmap__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ins-dotmap__label {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--on-surface);
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.ins-dotmap__label--ward {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--navy-1);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22), 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s var(--ease-out);
}
@media (hover: hover) {
  .ins-dotmap__label--ward:hover {
    transform: translate(-50%, -50%) scale(1.22);
  }
}

/* ------------------------------------------------------------------ wards */
.ins-wardhero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: radial-gradient(120% 100% at 72% 0%, #173a73 0%, #081a36 55%, #040b18 100%);
  color: #fff;
}
.ins-wardhero__text {
  padding: 20px 20px 0;
}
.ins-wardhero__text h1 {
  margin: 0;
}
.ins-wardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.ins-wardcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent);
  background: var(--sc-lowest);
  color: inherit;
  text-decoration: none;
}
.ins-wardcard__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ins-wardcard__head > svg {
  flex: none;
  color: var(--on-surface-variant);
}
.ins-wardcard__no {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.ins-wardcard .ins-dotmap {
  border-radius: 12px;
  background: var(--sc-low);
}
.ins-wardcard__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* ------------------------------------------------------------------ project sizes and values */
.ins-sizegrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.ins-sizehead {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ins-sizehead h2 {
  margin: 0;
}
.ins-sizehead__tile,
.ins-biz__tile {
  flex: none;
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
}
.ins-sizefigs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.ins-sizefig {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sc-low);
}
.ins-commonline {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  color: var(--on-surface-variant);
}
.ins-commonline > svg {
  flex: none;
}
.ins-sizeyears {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 0.5px solid var(--hairline);
}

/* ------------------------------------------------------------------ businesses in the permits */
.ins-bizlist {
  display: flex;
  flex-direction: column;
}
.ins-biz {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-top: 0.5px solid var(--hairline);
  color: inherit;
  text-decoration: none;
}
.ins-biz > svg {
  flex: none;
  color: var(--on-surface-variant);
}
@media (hover: hover) {
  .ins-biz:hover,
  a.ins-lead:hover {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
  }
}

/* ------------------------------------------------------------------ about */
.ins-insHero {
  box-shadow: 0 18px 34px -24px rgba(0, 24, 47, 0.9);
  background: radial-gradient(120% 120% at 85% 0%, #12458f 0%, #06204a 48%, #020b1c 100%);
}
.ins-about p {
  margin: 0;
}
.ins-about__list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--on-surface);
  font-size: 14px;
  line-height: 20px;
}
.ins-about__list li + li {
  margin-top: 6px;
}
.ins-about a {
  color: var(--primary);
  font-weight: 600;
}

/* ------------------------------------------------------------------ a permit's page */
.ins-hero2 {
  position: relative;
}
.ins-hero2__btn--still {
  cursor: default;
}

/* ------------------------------------------------------------------ the map screen (MapLibre) */
.mp-wrap {
  position: fixed;
  inset: 0;
  z-index: 45;
  overflow: hidden;
  background: #dfe7ee;
}
.mp-wrap > .mp-map {
  position: absolute;
  inset: 0;
}
.mp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mp-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.mp-controls {
  position: absolute;
  top: calc(var(--mp-top, 16px) + var(--safe-top));
  right: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: top 0.25s ease;
}
.mp-btngroup {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: 0 6px 18px -6px rgba(0, 20, 45, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.mp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.mp-btn--tall {
  flex-direction: column;
  gap: 1px;
  width: 52px;
  height: 56px;
}
.mp-btn__label {
  font-size: 10px;
  line-height: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.mp-btn + .mp-btn {
  border-top: 1px solid rgba(0, 32, 69, 0.1);
}
.mp-btn:hover {
  background: rgba(0, 32, 69, 0.08);
}
.mp-btn--on,
.mp-btn--on:hover {
  background: var(--primary);
  color: #fff;
}
.mp-status {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.mp-status:empty {
  display: none;
}
.mp-status__spin {
  display: flex;
  padding: 14px;
  border-radius: 50%;
  background: var(--glass);
  box-shadow: 0 6px 18px -6px rgba(0, 20, 45, 0.5);
}
.mp-status__card {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  margin: 16px;
  padding: 20px;
  border-radius: 18px;
  background: var(--m-surface);
  box-shadow: 0 12px 34px -10px rgba(0, 20, 45, 0.55);
  text-align: center;
}
.mp-status__title {
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}
.mp-status__text {
  margin-top: 2px;
  color: var(--on-surface-variant);
  font-size: 14px;
  line-height: 19px;
}
/* MapLibre's own corner pieces keep clear of the bottom sheet */
.mp-wrap .maplibregl-ctrl-bottom-left,
.mp-wrap .maplibregl-ctrl-bottom-right {
  bottom: calc(var(--mp-bottom, 0px) + var(--safe-bottom));
  transition: bottom 0.25s ease;
}
.mp-wrap .maplibregl-ctrl-scale {
  border-color: rgba(0, 32, 69, 0.7);
  background: rgba(255, 255, 255, 0.72);
  color: var(--on-surface);
  font-size: 10px;
}
.ins-mapscreen .ins-maphead {
  padding-top: calc(12px + var(--safe-top));
}
.ins-maphead__pill,
.ins-mapsummary,
.ins-mapsheet {
  background: color-mix(in srgb, var(--m-surface) 90%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 8px 24px -8px rgba(0, 20, 45, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.ins-mapbottom {
  padding-bottom: calc(12px + var(--safe-bottom));
}
.ins-mapsheet {
  overflow-y: auto;
  animation: sheet-up 0.45s var(--ease-out) both;
}
@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

/* ------------------------------------------------------------------ wider screens */
@media (min-width: 620px) {
  .ins-secgrid,
  .ins-sizegrid {
    grid-template-columns: 1fr 1fr;
  }
  .ins-hub .ins-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .ins-permit {
    padding-top: 12px;
  }
  .ins-permit .ins-hero2__box {
    border-radius: 22px;
    box-shadow: 0 22px 40px -24px rgba(0, 20, 45, 0.7);
  }
  .ins-permit > div > .ins-hero2 {
    margin-inline: 16px;
  }
  .ins-wardhero {
    flex-direction: row;
    align-items: center;
  }
  .ins-wardhero__text {
    flex: 0 0 42%;
    padding: 24px 8px 24px 28px;
  }
  .ins-wardhero > .ins-dotmap {
    flex: 1;
    min-width: 0;
  }
}
@media (min-width: 760px) {
  .ins-mapscreen .ins-maphead {
    right: auto;
    width: 480px;
    padding-left: 14px;
  }
  .ins-mapbottom {
    right: auto;
    width: 452px;
    padding: 14px;
  }
  .mp-controls {
    top: 16px;
    right: 16px;
  }
  .mp-wrap .maplibregl-ctrl-bottom-right {
    bottom: 0;
  }
  .mp-wrap .maplibregl-ctrl-bottom-left {
    left: 452px;
    bottom: 6px;
  }
}
@media (min-width: 900px) {
  .ins-hero--city {
    min-height: 480px;
  }
  .ins-hero--city .ins-hero__body {
    gap: 10px;
    padding: 96px 32px 36px;
  }
  .ins-hero--city .ins-hero__body h1 {
    font-size: 54px !important;
    line-height: 58px !important;
    letter-spacing: -1px;
  }
  .ins-hero--city .ins-hero__body > .ins-t:not(h1):nth-child(3) {
    max-width: 640px;
    font-size: 18px !important;
    line-height: 25px !important;
  }
  .ins-hero__credit {
    top: 16px;
    right: 20px;
    font-size: 11px;
  }
  .ins-hub__body {
    gap: 26px;
    padding: 28px 32px 48px;
  }
  .ins-hub .ins-stat {
    padding: 14px 16px;
  }
  .ins-hub .ins-stat > .ins-t:first-child {
    font-size: 36px !important;
    line-height: 42px !important;
    letter-spacing: -0.5px;
  }
  .ins-hub .ins-stat__label .ins-t {
    font-size: 13px !important;
    line-height: 17px !important;
  }
  .ins-featrow {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .ins-featrow__item {
    flex: none;
    min-width: 0;
  }
  .ins-feat {
    min-height: 236px;
    padding: 18px;
  }
  .ins-feat__media {
    height: 132px;
    margin: -18px -18px -22px;
  }
  .ins-lensgrid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .ins-mapcard {
    min-height: 170px;
    padding: 28px;
  }
  .ins-analysis {
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 56px;
  }
  .ins-insHero {
    padding: 28px;
    border-radius: 26px;
  }
  .ins-insHero h1 {
    font-size: 34px !important;
    line-height: 40px !important;
  }
}

/* ------------------------------------------------------------------ open jobs (the home card and the Jobs screen) */
.ins-jobcard {
  position: relative;
  isolation: isolate;
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #06204a, #0f3d6e);
  box-shadow: 0 16px 30px -22px rgba(0, 24, 47, 0.9);
  color: #fff;
}
.ins-jobcard__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 82% 40%;
}
.ins-jobcard__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(3, 14, 32, 0.97) 0%, rgba(3, 14, 32, 0.9) 50%, rgba(3, 14, 32, 0.42) 100%);
}
.ins-jobcard__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding-top: 64px;
}
.ins-jobcard h2 {
  margin: 0;
}
.ins-jobcard__chips {
  display: flex;
  gap: 8px;
  align-self: stretch;
  margin: 14px -18px 0;
  padding: 0 18px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ins-jobcard__chips::-webkit-scrollbar {
  display: none;
}
.ins-jobchip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s var(--ease-out);
}
.ins-jobchip > svg {
  flex: none;
}
.ins-jobchip b {
  font-size: 12px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}
.ins-jobcard__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  margin-top: 14px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  color: #06204a;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out);
}
@media (hover: hover) {
  .ins-jobchip:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
  }
  .ins-jobcard__go:hover {
    transform: translateY(-1px);
  }
  .ins-jobcard__go:hover svg {
    transform: translateX(3px);
  }
}
.ins-jobcard__go svg {
  transition: transform 0.2s var(--ease-out);
}

.job {
  gap: 14px;
}
.job-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 200px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #06204a, color-mix(in srgb, var(--job) 70%, #06204a));
  box-shadow: 0 18px 34px -24px rgba(0, 24, 47, 0.9);
  color: #fff;
}
.job-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--job);
}
.job-hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.job-hero--wide .job-hero__img {
  object-position: 82% 40%;
}
.job-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(3, 14, 32, 0.95) 0%, rgba(3, 14, 32, 0.8) 40%, rgba(3, 14, 32, 0.2) 80%, rgba(3, 14, 32, 0.05) 100%);
}
.job-hero__body {
  display: flex;
  flex-direction: column;
  max-width: 600px;
}
.job-hero h1 {
  margin: 0;
}
.job-tradegrid .ins-pic__img {
  object-position: 50% 30%;
}
.job-tradebar {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 6px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.job-tradebar::-webkit-scrollbar {
  display: none;
}
.job-trade {
  flex: 0 0 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.job-trade__pic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--sc-high);
  color: var(--job);
  outline: 3px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.2s, transform 0.25s var(--ease-out);
}
.job-trade__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.job-trade.is-on .job-trade__pic {
  outline-color: var(--job);
}
.job-trade:not(.is-on) .job-trade__pic img {
  opacity: 0.9;
}
@media (hover: hover) {
  .job-trade:hover .job-trade__pic {
    transform: translateY(-2px);
  }
}
.job-figure {
  display: flex;
  align-items: center;
  gap: 14px;
}
.card.ins-pcard > .job-chips {
  margin: 12px -16px 0;
  padding: 0 16px;
}
.card.ins-pcard > .job-chips + .job-chips {
  margin-top: 8px;
}
.job-list {
  display: flex;
  flex-direction: column;
}
.job-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 0.5px solid var(--hairline);
}
.job-row__main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 4px 12px 8px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.job-row__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.job-row__tick {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 4px;
  border-radius: 50%;
  border: 1.5px solid var(--outline-variant);
  background: transparent;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.job-row__tick:active {
  transform: scale(0.92);
}
.job-row__tick.is-on {
  border-color: #0a6c44;
  background: #0a6c44;
  color: #fff;
}
.job-row.is-ticked .job-row__main {
  opacity: 0.66;
}
@media (hover: hover) {
  .job-row__main:hover {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
  }
  .job-row__tick:not(.is-on):hover {
    border-color: #0a6c44;
    background: color-mix(in srgb, #0a6c44 10%, transparent);
    color: #0a6c44;
  }
}
.job-fold {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 2px 10px;
  color: var(--on-surface-variant);
}
.job-fold > svg {
  flex: none;
}
.job-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.job-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.job-step__n {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
/* "About these jobs": the sheet behind the info button, the only place the job board explains itself */
.job-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
}
.job-info h3 {
  margin: 0;
}
.job-info .job-steps {
  margin: 8px 0;
  gap: 10px;
}
.job-info__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
@media (min-width: 900px) {
  .ins-jobcard {
    padding: 28px;
    border-radius: 26px;
  }
  .ins-jobcard__img {
    object-position: 100% 45%;
  }
  .ins-jobcard__shade {
    background: linear-gradient(90deg, rgba(3, 14, 32, 0.96) 0%, rgba(3, 14, 32, 0.86) 42%, rgba(3, 14, 32, 0.3) 66%, rgba(3, 14, 32, 0) 86%);
  }
  .ins-jobcard__body {
    max-width: 64%;
    padding-top: 0;
  }
  .ins-jobcard h2 {
    font-size: 30px !important;
    line-height: 36px !important;
  }
  .ins-jobcard__chips {
    flex-wrap: wrap;
    margin: 16px 0 0;
    padding: 0;
    overflow: visible;
  }
  .job-hero {
    min-height: 250px;
    padding: 28px;
    border-radius: 26px;
  }
  .job-hero h1 {
    font-size: 34px !important;
    line-height: 40px !important;
  }
  .job-hero--wide .job-hero__img {
    object-position: 100% 45%;
  }
  .job-hero--wide .job-hero__shade {
    background: linear-gradient(90deg, rgba(3, 14, 32, 0.95) 0%, rgba(3, 14, 32, 0.82) 40%, rgba(3, 14, 32, 0.25) 66%, rgba(3, 14, 32, 0) 86%);
  }
  .job-tradebar {
    margin: 0;
    padding: 6px 4px 4px;
    justify-content: space-between;
  }
  .job-trade {
    flex: 1 1 0;
  }
  .job-trade__pic {
    width: 76px;
    height: 76px;
    border-radius: 24px;
  }
}

/* ------------------------------------------------------------------ less motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ins-hero--photo .ins-hero__photo,
  .ins-hero--city .ins-hero__body,
  .ins-newcard__pulse,
  .ins-skel__bar,
  .ins-skyline__tower,
  .ins-mapsheet {
    animation: none;
  }
}

/* ------------------------------------------------------------------ small screens: fixes */
/* The status pill keeps its word; the sentence beside it wraps instead. */
.ins-permit__status > .ins-pill {
  flex: 0 0 auto;
}
