/* Finalized BlueGreen Guide UI refinement */

:root {
  --ui-blue: #176f8f;
  --ui-blue-deep: #0f4f67;
  --ui-blue-soft: #dceff5;
  --ui-green: #6f8f63;
  --ui-green-deep: #4f7047;
  --ui-green-soft: #e8f0e4;
  --ui-bg: #eef6f8;
  --ui-panel: #fbfdff;
  --ui-text: #10252e;
  --ui-muted: #5a6f78;
  --ui-line: #c9dce4;
  --ui-neutral: #f4f7f8;
  --ui-warning: #d9a15c;
  --ui-warning-soft: #fff7eb;
}

.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  color: currentColor;
}

.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, var(--ui-bg) 100%);
}

.brand {
  display: block;
  border-bottom: 1px solid var(--ui-line);
  padding: 4px 2px 16px;
}

.brand-stack {
  display: grid;
  gap: 7px;
  justify-items: start;
}

.brand-logo-link {
  display: block;
  width: 100%;
}

.brand-logo-image {
  display: block;
  width: min(340px, 100%);
  height: auto;
}

.documentation-link {
  display: inline;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--ui-blue-deep);
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.documentation-link:hover {
  background: transparent;
  color: var(--ui-blue);
}

.wayfinding-key,
.collections-panel,
.controls {
  border: 1px solid var(--ui-line);
  border-radius: 6px;
  background: rgba(251, 253, 255, .98);
  box-shadow: none;
}

.wayfinding-key,
.collections-panel {
  gap: 12px;
}

.wayfinding-key h2,
.collections-heading h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.wayfinding-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wayfinding-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border: 1px solid var(--ui-line);
  border-radius: 5px;
  padding: 9px;
  background: #fff;
  font-size: 11px;
  line-height: 1.15;
}

.wayfinding-symbol {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #fff;
}

.wayfinding-symbol .ui-icon {
  width: 19px;
  height: 19px;
}

.wayfinding-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wayfinding-copy strong {
  font-size: 11px;
  font-weight: 700;
}

.wayfinding-copy small {
  color: var(--ui-muted);
  font-size: 9px;
  font-weight: 500;
}

.wayfinding-water {
  border-color: rgba(23, 111, 143, .28);
  background: var(--ui-blue-soft);
  color: var(--ui-blue-deep);
}

.wayfinding-water .wayfinding-symbol {
  border-color: var(--ui-blue);
  background: #fff;
  color: var(--ui-blue);
}

.wayfinding-land {
  border-color: rgba(111, 143, 99, .32);
  background: var(--ui-green-soft);
  color: var(--ui-green-deep);
}

.wayfinding-land .wayfinding-symbol {
  border-radius: 6px;
  border-color: var(--ui-green);
  background: #fff;
  color: var(--ui-green-deep);
}

.wayfinding-neutral {
  background: #fff;
  color: var(--ui-text);
}

.wayfinding-neutral .wayfinding-symbol {
  border-color: var(--ui-line);
  color: var(--ui-blue-deep);
}

.collections-list {
  grid-template-columns: 1fr;
  gap: 7px;
}

.collection-button {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  border: 1px solid var(--ui-line);
  border-radius: 5px;
  padding: 10px 11px;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}

.collection-button:hover {
  border-color: var(--ui-blue);
  background: #f8fcfd;
  transform: none;
}

.collection-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ui-line);
  border-radius: 50%;
  background: #fff;
  color: var(--ui-blue-deep);
}

.collection-water .collection-icon {
  border-color: var(--ui-blue);
  color: var(--ui-blue);
}

.collection-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.collection-copy strong {
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
}

.collection-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ui-muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collection-count {
  justify-self: end;
  border: 1px solid var(--ui-line);
  border-radius: 4px;
  padding: 4px 6px;
  background: var(--ui-neutral);
  color: var(--ui-muted);
  font-size: 9px;
  font-weight: 700;
}

.collection-button.is-active {
  border-color: var(--ui-blue);
  background: var(--ui-blue-soft);
  box-shadow: inset 3px 0 0 var(--ui-blue);
}

.collection-clear {
  border-radius: 0;
  color: var(--ui-blue-deep);
}

.field span {
  margin-bottom: 4px;
  color: var(--ui-blue-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

input,
select {
  border-radius: 4px;
  border-color: #c8d8df;
  background: #fff;
  box-shadow: none;
}

.button,
.card-button {
  min-height: 44px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
}

.button-primary,
.card-button {
  border: 1px solid var(--ui-blue-deep);
  background: var(--ui-blue);
}

.button-primary:hover,
.card-button:hover {
  background: var(--ui-blue-deep);
  transform: none;
}

.button-secondary {
  border-color: var(--ui-blue);
  background: #fff;
  color: var(--ui-blue-deep);
}

.button-secondary:hover {
  background: var(--ui-blue-soft);
}

.button-tertiary {
  border-color: #d4dfe3;
  background: var(--ui-neutral);
  color: var(--ui-text);
}

.launch-card {
  border-radius: 6px;
  background: var(--ui-panel);
  box-shadow: none;
  overflow: hidden;
}

.launch-card:hover {
  border-color: var(--ui-blue);
  box-shadow: none;
  transform: none;
}

.launch-image {
  border-radius: 0;
}

.photo-badge {
  border-radius: 3px;
}

.launch-heading h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 25px;
}

.pill {
  border-radius: 4px;
  border-color: rgba(111, 143, 99, .34);
  background: var(--ui-green-soft);
  color: var(--ui-green-deep);
  text-transform: none;
  letter-spacing: 0;
}

.verification-line {
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 3px solid var(--ui-warning);
  padding: 7px 8px;
  background: var(--ui-warning-soft);
  color: var(--ui-muted);
  font-size: 11px;
}

.rating-row {
  gap: 8px;
}

.rating {
  border-color: #dbe5e8;
  border-radius: 4px;
  background: #fff;
  font-size: 11px;
}

.tag-row {
  gap: 7px;
}

.tag {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
}

.tag.tag-water {
  border-color: rgba(23, 111, 143, .25);
  background: var(--ui-blue-soft);
  color: var(--ui-blue-deep);
}

.tag.tag-land {
  border-color: rgba(111, 143, 99, .3);
  background: var(--ui-green-soft);
  color: var(--ui-green-deep);
}

.tag.tag-neutral {
  border-color: #d8e1e4;
  background: #fff;
  color: var(--ui-muted);
}

.launch-marker {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid #fff;
  background: var(--ui-blue);
  box-shadow: 0 4px 10px rgba(15, 79, 103, .22);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.launch-marker.marker-water {
  border-radius: 50%;
}

.launch-marker.marker-land {
  border-radius: 6px;
  background: var(--ui-green);
}

.launch-marker.marker-neutral {
  border-radius: 50%;
  border-color: var(--ui-line);
  background: #fff;
  color: var(--ui-text);
}

.leaflet-popup-content-wrapper,
.leaflet-control-zoom,
.map-label {
  border-radius: 5px;
  box-shadow: none;
}

.popup-title {
  margin-bottom: 5px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
}

.detail-card {
  border: 1px solid rgba(201, 220, 228, .85);
  border-radius: 6px;
  background: var(--ui-panel);
  box-shadow: none;
}

.detail-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ui-line);
  border-radius: 4px;
  background: #fff;
  color: var(--ui-blue-deep);
  font-size: 24px;
}

.detail-kicker {
  color: var(--ui-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.detail-card h2 {
  font-size: clamp(34px, 6vw, 50px);
}

.detail-photo img,
.detail-status,
.detail-grid div {
  border-radius: 5px;
}

.detail-status {
  border: 1px solid rgba(111, 143, 99, .25);
  background: var(--ui-green-soft);
}

.detail-status.needs-verification {
  border-color: rgba(217, 161, 92, .45);
  border-left: 4px solid var(--ui-warning);
  background: var(--ui-warning-soft);
}

.detail-grid {
  gap: 10px;
}

.detail-grid div {
  background: #fff;
}

.detail-section {
  border-top: 1px solid var(--ui-line);
  padding-top: 18px;
}

.detail-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ui-blue-deep);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.source-list a {
  color: var(--ui-blue-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 860px) {
  .brand {
    padding: 14px 14px 12px;
  }

  .brand-logo-image {
    width: min(360px, 86vw);
  }
}

@media (max-width: 520px) {
  .wayfinding-items {
    grid-template-columns: 1fr;
  }

  .wayfinding-item {
    min-height: 50px;
  }

  .collection-button {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .brand-logo-image {
    width: min(330px, 88vw);
  }

  .launch-heading h2 {
    font-size: 23px;
  }
}
