:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9dee7;
  --paper: #fbfcfd;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --warm: #bc5a2c;
  --sky: #3267b0;
  --gold: #b88313;
  --rose: #b53d5b;
  --shadow: 0 16px 36px rgba(15, 23, 42, 0.09);
  --list-columns: minmax(240px, 1.42fr) minmax(128px, 0.48fr) minmax(132px, 0.56fr) minmax(180px, 0.82fr) minmax(66px, 0.24fr) minmax(76px, 0.28fr) 78px;
  --list-gap: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(300deg, rgba(188, 90, 44, 0.08), transparent 28%),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 42px);
  background: rgba(251, 252, 253, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.topbar__meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.layout {
  display: block;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 42px) 42px;
}

.content {
  min-width: 0;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.toolbar-toggle:has(input:disabled) {
  color: var(--muted);
  background: #f1f4f8;
  cursor: not-allowed;
  opacity: 0.72;
}

.toolbar-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.active-place-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: var(--ink);
  background: #eef7f6;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 750;
}

.active-place-filter strong {
  color: var(--accent-dark);
}

.active-place-filter button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--accent-dark);
  background: var(--panel);
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.activity-list-header {
  position: sticky;
  top: 82px;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--list-columns);
  gap: var(--list-gap);
  align-items: center;
  padding: 8px 14px 8px 18px;
  background: rgba(251, 252, 253, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.activity-list-header__button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.activity-list-header__cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.activity-list-header__source {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 30px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.activity-list-header__source-spacer {
  display: block;
  min-height: 30px;
}

.activity-list-header__filter {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.76rem;
  outline: none;
}

.activity-list-header__filter:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.activity-list-header__button[aria-sort="ascending"],
.activity-list-header__button[aria-sort="descending"] {
  color: var(--accent-dark);
}

.sort-indicator,
.sort-arrow {
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 850;
}

.provider-group {
  display: grid;
  gap: 8px;
}

.provider-group__header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 10px 14px;
  color: var(--ink);
  background: #eef7f6;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.provider-group__chevron {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: white;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 900;
}

.provider-group__name {
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.provider-group__count {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.provider-group__list {
  display: grid;
  gap: 8px;
}

.provider-group__list[hidden] {
  display: none;
}

.activity-row {
  display: grid;
  grid-template-columns: var(--list-columns);
  gap: var(--list-gap);
  align-items: center;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--row-color);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.activity-row h3 {
  margin: 0 0 5px;
  font-size: 0.98rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.activity-row__provider,
.activity-row__meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.3;
}

.activity-row__fact {
  min-width: 0;
}

.activity-row__fact span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.activity-row__fact strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.place-button {
  display: block;
  width: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-align: left;
}

.place-button:hover,
.place-button:focus {
  color: var(--accent-dark);
  text-decoration: underline;
}

.activity-row a {
  justify-self: start;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.activity-row a:hover {
  text-decoration: underline;
}

.has-open-listing {
  overflow: hidden;
}

.listing-modal[hidden] {
  display: none;
}

.listing-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.listing-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 32, 42, 0.42);
  border: 0;
  cursor: pointer;
}

.listing-modal__panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.listing-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 32px;
  padding: 0 10px;
  color: var(--accent-dark);
  background: #eef7f6;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 850;
}

.listing-detail {
  display: grid;
  gap: 16px;
  padding-left: 16px;
  border-left: 5px solid var(--row-color);
}

.listing-detail__eyebrow {
  max-width: calc(100% - 80px);
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.listing-detail h2 {
  max-width: calc(100% - 80px);
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.listing-detail__summary {
  margin: 0;
  color: #354052;
  font-size: 0.95rem;
  line-height: 1.5;
}

.listing-detail__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}

.listing-detail__facts div {
  min-width: 0;
}

.listing-detail__facts dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.listing-detail__facts dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.listing-detail__note {
  margin: 0;
  padding: 10px 12px;
  color: var(--accent-dark);
  background: #eef7f6;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.4;
}

.listing-detail__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.listing-detail__links a,
.listing-detail__links button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.listing-detail__links a:hover,
.listing-detail__links button:hover {
  background: var(--accent-dark);
}

.listing-detail__links button[data-copy-status="success"] {
  background: var(--accent-dark);
}

.listing-detail__links button[data-copy-status="error"] {
  background: var(--rose);
}

.listing-detail__permalink {
  display: grid;
  gap: 5px;
}

.listing-detail__permalink span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.listing-detail__permalink input {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  color: var(--ink);
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.78rem;
}

.listing-detail__permalink input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

@media (max-width: 860px) {
  .topbar {
    align-items: start;
  }

  .topbar {
    position: static;
    flex-direction: column;
  }

  .topbar__meta {
    flex-wrap: wrap;
    white-space: normal;
  }

  .results-toolbar {
    justify-content: flex-start;
  }

  .activity-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .activity-list-header {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .provider-group__header {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .provider-group__count {
    grid-column: 2;
  }

  .activity-row a {
    justify-self: start;
  }

  .listing-modal {
    padding: 12px;
  }

  .listing-modal__panel {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .listing-detail__facts {
    grid-template-columns: 1fr;
  }

  .listing-detail__eyebrow,
  .listing-detail h2 {
    max-width: none;
    padding-right: 74px;
  }
}
