/* Village Square Timeline View (v2) — visual refresh
   Layout/grid unchanged; warmer, more local energy. */

.mv-square-v2 {
  --sq2-green-deep: #064e2a;
  --sq2-green: #0f7a3a;
  --sq2-green-bright: #22a34a;
  --sq2-cream: #f7f3ea;
  --sq2-cream-deep: #efe6d4;
  --sq2-leaf: #d8f3dc;
  --sq2-ink: #1a2e22;
  --sq2-muted: #5c6f62;
  --sq2-border: rgba(15, 122, 58, 0.14);
  --sq2-shadow: 0 2px 8px rgba(6, 78, 42, 0.07);
  --sq2-shadow-hover: 0 10px 28px rgba(6, 78, 42, 0.12);
  --sq2-radius: 1.15rem;
  color: var(--sq2-ink);
}

/* —— Hero —— */
.mv-square-v2-hero {
  background:
    radial-gradient(ellipse 80% 120% at 10% 0%, rgba(255, 255, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 80% at 90% 100%, rgba(34, 163, 74, 0.35), transparent 50%),
    linear-gradient(125deg, var(--sq2-green-deep) 0%, var(--sq2-green) 48%, #1a9b4a 100%);
  color: #ffffff !important;
  position: relative;
}

.mv-square-v2-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 0.6px, transparent 0.7px);
  background-size: 14px 14px;
}

.mv-square-v2-hero__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.35rem 1rem 1.15rem;
  position: relative;
  z-index: 1;
  color: #ffffff;
}

@media (min-width: 1024px) {
  .mv-square-v2-hero__inner {
    padding: 1.65rem 1rem 1.35rem;
  }
}

.mv-square-v2-hero__inner > p,
.mv-square-v2-hero__meta,
.mv-square-v2-hero__meta span {
  color: rgba(255, 255, 255, 0.9) !important;
}

.mv-square-v2-hero__title {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.95rem, 4.2vw, 2.55rem);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.mv-square-v2-hero__accent {
  color: #fef08a !important;
  font-style: italic;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.mv-square-v2-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.85rem;
}

.mv-square-v2-hero .sq-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.85rem;
}

.mv-square-v2-hero .sq-toggle-row nav {
  margin: 0;
}

.mv-square-v2-hero__link {
  font-size: 0.875rem;
  font-weight: 700;
  color: #064e2a !important;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  background: #f7fee7 !important;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s ease, transform 0.15s ease;
}

.mv-square-v2-hero__link:hover {
  background: #ffffff !important;
  color: #064e2a !important;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Browse toggle — slightly livelier active chip */
.mv-square-v2-hero .sq-browse-toggle__list {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mv-square-v2-hero .sq-browse-toggle__chip {
  color: rgba(255, 255, 255, 0.92) !important;
}

.mv-square-v2-hero .sq-browse-toggle__chip--active {
  color: #064e2a !important;
  background: #f7fee7 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

/* —— Body / grid (structure unchanged) —— */
.mv-square-v2-body {
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(216, 243, 220, 0.55), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(247, 243, 234, 0.9), transparent 50%),
    linear-gradient(180deg, var(--sq2-cream) 0%, #f3efe6 100%);
  min-height: 60vh;
}

.mv-square-v2-grid {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .mv-square-v2-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    padding-top: 1.25rem;
    align-items: start;
  }
}

.mv-square-v2-feed {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.mv-square-v2-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--sq2-border);
  border-radius: var(--sq2-radius);
  position: sticky;
  top: 4.5rem;
  z-index: 20;
  box-shadow: var(--sq2-shadow);
  backdrop-filter: blur(8px);
}

.mv-square-v2-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.mv-square-v2-toolbar h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--sq2-green-deep) !important;
  letter-spacing: -0.01em;
}

.mv-square-v2-borough-select {
  min-width: 10rem;
  max-width: 100%;
}

.mv-square-v2-sort a {
  font-size: 0.8125rem;
  color: var(--sq2-muted);
  text-decoration: none;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.mv-square-v2-sort a.is-active {
  font-weight: 700;
  color: var(--sq2-green-deep);
  background: var(--sq2-leaf);
}

.mv-square-v2-sort a:hover {
  color: var(--sq2-green);
  background: rgba(216, 243, 220, 0.55);
}

.mv-square-v2-panel {
  background: #fffef9;
  border: 1px solid var(--sq2-border);
  border-radius: var(--sq2-radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--sq2-shadow);
}

.mv-square-v2-qp-strip {
  background:
    linear-gradient(135deg, var(--sq2-green-deep) 0%, var(--sq2-green) 70%, #169a45 100%);
  border-radius: var(--sq2-radius);
  padding: 0.95rem 1.1rem;
  box-shadow: 0 6px 18px rgba(6, 78, 42, 0.22);
}

.mv-square-v2-details {
  background: #fffef9;
  border: 1px solid var(--sq2-border);
  border-radius: var(--sq2-radius);
  overflow: hidden;
  box-shadow: var(--sq2-shadow);
}

.mv-square-v2-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--sq2-green-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: linear-gradient(180deg, #f7fbf6 0%, #fffef9 100%);
}

.mv-square-v2-details > summary::-webkit-details-marker {
  display: none;
}

.mv-square-v2-details > summary::after {
  content: "▾";
  font-size: 0.75rem;
  color: var(--sq2-green);
  transition: transform 0.15s ease;
}

.mv-square-v2-details[open] > summary::after {
  transform: rotate(180deg);
}

.mv-square-v2-details__body {
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(15, 122, 58, 0.08);
}

/* Explore search — readable even when site theme is dark */
.mv-square-v2 #search .input,
.mv-square-v2 #search .select,
.mv-square-v2 .mv-square-v2-details__body .input,
.mv-square-v2 .mv-square-v2-details__body .select {
  background: #ffffff !important;
  color: #1a2e22 !important;
  border: 1px solid rgba(15, 122, 58, 0.28) !important;
  box-shadow: none;
}

.mv-square-v2 #search .input::placeholder {
  color: #6b7c70 !important;
  opacity: 1;
}

.mv-square-v2 #search .input:focus,
.mv-square-v2 #search .select:focus {
  outline: 2px solid rgba(15, 122, 58, 0.45);
  outline-offset: 1px;
  border-color: #0f7a3a !important;
}

.mv-square-v2-explore-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.65rem;
}

.mv-square-v2-explore-links a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sq2-green);
  text-decoration: none;
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  background: rgba(216, 243, 220, 0.45);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.mv-square-v2-explore-links a:hover {
  text-decoration: none;
  background: var(--sq2-leaf);
  border-color: rgba(15, 122, 58, 0.18);
  transform: translateY(-1px);
}

.mv-square-v2-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

@media (max-width: 1023px) {
  .mv-square-v2-feed {
    order: 1;
  }
  .mv-square-v2-sidebar {
    order: 2;
  }
}

.mv-square-v2-brief-details > summary {
  font-size: 0.875rem;
}

/* —— Feed cards (existing article markup; visual only) —— */
.mv-square-v2-feed > article {
  border-radius: var(--sq2-radius) !important;
  border-color: var(--sq2-border) !important;
  background: #fffef9 !important;
  box-shadow: var(--sq2-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.mv-square-v2-feed > article:hover {
  box-shadow: var(--sq2-shadow-hover) !important;
  border-color: rgba(15, 122, 58, 0.28) !important;
  transform: translateY(-2px);
}

.mv-square-v2-feed > article .badge,
.mv-square-v2-feed > article [class*="rounded-full"][class*="border"] {
  letter-spacing: 0.01em;
}

.mv-square-v2-feed > article img[class*="rounded"],
.mv-square-v2-feed > article img.object-cover {
  border-radius: 0.85rem;
}

/* Composer affordance */
.mv-square-v2-panel .bg-stone-100,
.mv-square-v2-panel .bg-stone-100:hover {
  background: var(--sq2-cream) !important;
  border: 1px dashed rgba(15, 122, 58, 0.28);
  color: var(--sq2-muted) !important;
}

.mv-square-v2-panel .btn-primary {
  box-shadow: 0 4px 12px rgba(15, 122, 58, 0.25);
}

/* Pinned notice */
.mv-square-v2-feed > .bg-amber-50 {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%) !important;
  border-color: #f59e0b !important;
  border-radius: var(--sq2-radius) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .mv-square-v2-feed > article,
  .mv-square-v2-explore-links a,
  .mv-square-v2-hero__link {
    transition: none;
  }
  .mv-square-v2-feed > article:hover,
  .mv-square-v2-explore-links a:hover {
    transform: none;
  }
}
