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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: #fbfbfb;
  color: #111;
  min-height: 100vh;
}

button,
a {
  font-family: inherit;
}

.page {
  width: 100%;
  max-width: 1536px;
  min-height: 1024px;
  margin: 0 auto;
  padding: 0 56px 8px;
}

/* ---------- Header ---------- */

.site-header {
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid #f2f2f3;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #111;
  width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #efeff0;
  display: grid;
  place-items: center;
  color: #111;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  position: relative;
  padding: 6px 0;
}

.nav-link.is-active {
  font-weight: 600;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: #111;
  border-radius: 1px;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ececee;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 16, 16, 0.04);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-panel {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}

.search-panel[hidden] {
  display: none;
}

.search-input {
  height: 32px;
  width: 196px;
  border: 1px solid #ececee;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(16, 16, 16, 0.04);
  outline: none;
}

.search-input:focus {
  border-color: #d8d8dc;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  min-height: 366px;
  padding-top: 40px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  left: 42%;
  top: 8px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(230, 220, 236, 0.22) 0%, rgba(251, 251, 251, 0) 72%);
  pointer-events: none;
  z-index: 0;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  padding-top: 12px;
  max-width: 520px;
  position: relative;
  z-index: 1;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 0 11px 0 8px;
  border-radius: 999px;
  background: #eef0f2;
  color: #4a4e55;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf7a;
}

.hero-copy h1 {
  margin-top: 18px;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: #0b0b0c;
}

.hero-lede {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.45;
  color: #6b6f76;
  font-weight: 400;
  max-width: 380px;
}

.hero-geo {
  grid-column: 2;
  grid-row: 1 / 3;
  position: relative;
  min-height: 320px;
  margin-right: -56px;
  z-index: 1;
  pointer-events: none;
}

.hero-map-visual {
  position: absolute;
  inset: -8px -8px 8px 0;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: left center;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 78%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
}

/* ---------- Date controls ---------- */

.date-controls {
  --date-control-height: 37px;
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}

.date-control {
  height: var(--date-control-height);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

.date-pill {
  height: var(--date-control-height);
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #e6e6e8;
  background: #fff;
  color: #161616;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 16, 16, 0.03);
}

.date-pill svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
}

.date-pill.is-selected {
  background: #0a0c0e;
  border-color: #0a0c0e;
  color: #fff;
  box-shadow: none;
}

.custom-date-wrap {
  position: relative;
  overflow: visible;
}

.custom-date-wrap .date-pill {
  height: 100%;
}

.custom-date-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}

/* ---------- Workspace ---------- */

.workspace {
  display: block;
  background: #fff;
  border: 1px solid #f0f0f1;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(16, 16, 16, 0.04),
    0 10px 28px rgba(16, 16, 16, 0.045);
  overflow: hidden;
}

.results {
  padding: 28px 36px 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.results-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.results-head h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.count-pill {
  min-width: 22px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ececee;
  color: #5c5f66;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.col-head,
.result-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.15fr) minmax(180px, 1.25fr) minmax(180px, 1.25fr) minmax(140px, 1fr) 108px;
  align-items: center;
  column-gap: 24px;
}

.col-head {
  padding: 0 0 12px;
  border-bottom: 1px solid #f0f0f2;
}

.col-head span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b0b4ba;
}

.col-head span:last-child {
  text-align: right;
}

.result-list {
  list-style: none;
}

.result-empty {
  padding: 28px 0 24px;
  font-size: 13px;
  line-height: 1.45;
  color: #8a8e95;
  font-weight: 400;
}

.service-match {
  padding: 22px 0 24px;
}

.service-match .row-zone {
  font-size: 13px;
  font-weight: 600;
  color: #5a5e64;
}

.result-row {
  min-height: 76px;
  border-bottom: 1px solid #f0f0f2;
}

.row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.row-dot.purple { background: #6f4ec4; }
.row-dot.blue { background: #3b86e0; }
.row-dot.green { background: #3d9a62; }
.row-dot.gray { background: #b0b3b8; }

.row-place {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-left: 18px;
}

.row-city {
  font-size: 11px;
  color: #8a8e95;
  font-weight: 500;
}

.row-zone {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
}

.row-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.meta-label {
  font-size: 10.5px;
  color: #9aa0a8;
  font-weight: 400;
  white-space: nowrap;
}

.meta-value {
  font-size: 13px;
  font-weight: 650;
  color: #161616;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.row-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.status-pill {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill.putout {
  background: #f1ebfc;
  color: #6d4ec2;
}

.status-pill.collection {
  background: #e7f6ec;
  color: #2f9a58;
}

.status-pill.upcoming {
  background: #f1f1f3;
  color: #6d7178;
}

.status-note {
  font-size: 10px;
  color: #9aa0a8;
}

.view-area {
  height: 32px;
  width: auto;
  padding: 0 10px;
  border: 1px solid #e6e6e8;
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #2a2a2c;
  cursor: pointer;
  justify-self: end;
  white-space: nowrap;
}

.view-area svg {
  width: 14px;
  height: 14px;
}

.view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 48px;
  font-size: 13px;
  font-weight: 500;
  color: #5a5e64;
  text-decoration: none;
}

.view-all[hidden] {
  display: none;
}

.view-all svg {
  width: 12px;
  height: 12px;
}

.source-note {
  text-align: center;
  margin-top: 14px;
  font-size: 11.5px;
  color: #b0b4ba;
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .page {
    padding: 0 28px 24px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-geo {
    margin-right: -28px;
  }

  .col-head,
  .result-row {
    grid-template-columns: minmax(140px, 1.1fr) minmax(150px, 1.2fr) minmax(150px, 1.2fr) minmax(120px, 0.9fr) 100px;
    column-gap: 16px;
  }
}

@media (max-width: 980px) {
  .page {
    padding: 0 18px 24px;
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
  }

  .primary-nav {
    gap: 28px;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 28px;
  }

  .hero-copy,
  .hero-geo,
  .date-controls {
    grid-column: 1;
    grid-row: auto;
  }

  .hero-geo {
    min-height: 240px;
    margin: 8px -18px 0;
  }

  .hero-copy h1 {
    white-space: normal;
  }

  .date-controls {
    margin-top: 12px;
  }

  .results {
    padding: 22px 20px 0;
  }

  .col-head {
    display: none;
  }

  .col-head,
  .result-row {
    grid-template-columns: 1fr 1fr auto;
    column-gap: 12px;
  }
}

@media (max-width: 720px) {
  .primary-nav {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .result-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "place view"
      "meta1 view"
      "meta2 view"
      "status view";
    padding: 12px 0;
    min-height: 0;
    gap: 4px 10px;
  }

  .row-place { grid-area: place; }
  .row-meta:nth-of-type(1) { grid-area: meta1; }
  .row-meta:nth-of-type(2) { grid-area: meta2; }
  .row-status { grid-area: status; }
  .view-area { grid-area: view; }
}
