[hidden] {
  display: none !important;
}

:root {
  --bg: #f4fbf8;
  --paper: #ffffff;
  --ink: #10231f;
  --muted: #5d716b;
  --line: #d7e7e1;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #d5f2ed;
  --warning: #b7791f;
  --unknown: #64748b;
  --danger: #b91c1c;
  --shadow: 0 18px 60px rgba(8, 42, 36, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #d7fbf2 0, rgba(215, 251, 242, 0) 35rem), var(--bg);
  min-height: 100vh;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 0.8rem;
  background: var(--ink);
  color: white;
  border-radius: 0.5rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(244, 251, 248, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(215, 231, 225, 0.8);
}

.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 1.3rem;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  margin-top: 0.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: #fff;
}

.view {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero-view {
  padding-top: clamp(2rem, 7vw, 6rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy h1,
.sidebar h1,
.detail-card h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0 0 1rem;
}

.sidebar h1,
.detail-card h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.lede {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 66ch;
}

.eyebrow {
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.hero-actions,
.admin-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.05rem;
  min-height: 2.75rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.22);
}

.button.secondary,
.icon-button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.trust-row,
.area-chip-list,
.filters,
.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.status-pill,
.area-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  font-size: 0.84rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-pill.confirmed {
  color: #064e3b;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.status-pill.likely {
  color: #854d0e;
  background: #fef3c7;
  border-color: #fde68a;
}

.status-pill.unknown {
  color: #334155;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.status-pill.no_aircon,
.status-pill.no-aircon {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #fecaca;
}

.hero-panel,
.panel,
.detail-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 231, 225, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1.25rem;
}

.hero-panel h2 {
  margin: 0 0 0.75rem;
}

.area-chip {
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-decoration: none;
}

.area-chip:hover {
  background: #b9ebe3;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 1rem;
  width: min(1500px, calc(100% - 1rem));
  min-height: calc(100vh - 7rem);
}

.sidebar {
  min-width: 0;
}

.panel {
  padding: 1rem;
}

.sticky-search {
  position: sticky;
  top: 5.5rem;
  z-index: 2;
}

.search-label {
  display: block;
  font-weight: 800;
  margin: 1rem 0 0.45rem;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.85rem;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.filters {
  margin-top: 1rem;
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

.filters input {
  width: auto;
}

.result-count,
.form-status {
  color: var(--muted);
  font-weight: 700;
}

.venue-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.venue-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: 0 8px 26px rgba(8, 42, 36, 0.07);
}

.venue-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.venue-card p {
  margin: 0.25rem 0;
  color: var(--muted);
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.card-actions a,
.text-link {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.map-stage {
  position: sticky;
  top: 5rem;
  min-height: calc(100vh - 6rem);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #dbece8;
}

.map {
  position: absolute;
  inset: 0;
}

.map-fallback {
  position: absolute;
  inset: 1rem;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.marker {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.25), 0 8px 22px rgba(0, 0, 0, 0.18);
}

.marker.likely {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.22), 0 8px 22px rgba(0, 0, 0, 0.18);
}

.marker.unknown {
  background: var(--unknown);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.22), 0 8px 22px rgba(0, 0, 0, 0.18);
}

.maplibregl-popup-content {
  border-radius: 14px;
  padding: 0.8rem;
  box-shadow: var(--shadow);
}

.popup-title {
  font-weight: 900;
  margin-bottom: 0.35rem;
}

.detail-view,
.form-view,
.admin-view {
  padding-top: 2.5rem;
}

.detail-card {
  padding: clamp(1.1rem, 3vw, 2rem);
}

.detail-card.narrow {
  max-width: 760px;
  margin: 0 auto;
}

.detail-card h2 {
  margin-top: 1.5rem;
}

.detail-card p {
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.3rem 0;
}

.fact-box {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.fact-box small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.stacked-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stacked-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 800;
}

.stacked-form label input,
.stacked-form label select,
.stacked-form label textarea {
  font-weight: 500;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 1rem;
  margin-top: 1rem;
}

.report-list {
  display: grid;
  gap: 0.75rem;
}

.report-card {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}

.report-card p {
  margin: 0.2rem 0;
}

.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .hero-grid,
  .app-shell,
  .detail-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(var(--max), calc(100% - 1rem));
  }

  .map-stage {
    min-height: 420px;
    position: relative;
    top: auto;
  }

  .sticky-search {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a {
    padding: 0.45rem 0.55rem;
  }

  .view {
    width: min(100% - 1rem, var(--max));
  }

  .hero-copy h1,
  .sidebar h1,
  .detail-card h1 {
    letter-spacing: -0.04em;
  }

  .admin-actions {
    display: grid;
  }
}
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.truthmonkey-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.truthmonkey-link:hover {
  text-decoration: underline;
}

.truthmonkey-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #fff;
}
