:root {
  --brand-green: #2E7D58;
  --brand-sage: #8FBF9F;
  --brand-bg: #F4F6F5;
  --brand-cream: #F2EBDD;
  --brand-orange: #FFB86B;
  --brand-charcoal: #1E293B;
  --brand-muted: #94A3B8;
  --brand-danger: #EF4444;
  --brand-white: #FFFFFF;
  --brand-soft: #E8F5EF;
  --brand-border: #E2E8F0;
  --brand-secondary: #64748B;
  --radius: 16px;
  --shadow: 0 4px 12px rgba(30, 41, 59, 0.08);
  --font-sans: "Poppins", system-ui, sans-serif;
  --font-script: "Caveat", cursive;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--brand-charcoal);
  background-color: #EDE6D8;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.18) 42%, rgba(255, 255, 255, 0.08) 100%),
    url("../images/app-background.png");
  background-position: center 28%;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--brand-green); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(1.1);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-green);
  font-weight: 700;
  text-decoration: none;
}

.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand span { font-size: 1.15rem; letter-spacing: -0.02em; }

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  flex: 1;
}

.nav-main a {
  color: var(--brand-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 6px 0;
}

.nav-main a.active,
.nav-main a:hover { color: var(--brand-green); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background: var(--brand-green); color: #fff; }
.btn-primary:hover { filter: brightness(0.95); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--brand-soft); color: var(--brand-green); }
.btn-secondary:hover { text-decoration: none; }
.btn-danger { background: #fee2e2; color: var(--brand-danger); }
.btn-ghost { background: transparent; color: var(--brand-charcoal); border: 1px solid var(--brand-border); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.hero {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero .script {
  font-family: var(--font-script);
  color: var(--brand-green);
  font-size: 1.6rem;
  font-weight: 700;
}

.hero p { margin: 0; color: var(--brand-secondary); max-width: 40rem; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 800px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-main { display: none; }
}

.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body { padding: 16px 18px; }
.card h2, .card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--brand-secondary); font-size: 0.92rem; }

.tile {
  position: relative;
  min-height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile .tile-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,41,59,0.15), rgba(30,41,59,0.72));
}

.tile .tile-body {
  position: relative;
  z-index: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 140px;
}

.tile strong { font-size: 1.15rem; }
.tile span { opacity: 0.9; font-size: 0.85rem; }
.tile:hover { text-decoration: none; color: #fff; transform: translateY(-2px); transition: transform .15s ease; }

.tile-fallback {
  position: absolute;
  inset: 0;
}

.discover-domain-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  min-height: 160px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.discover-domain-hero-media {
  position: absolute;
  inset: 0;
}

.discover-domain-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-domain-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(18, 54, 40, 0.72), rgba(18, 54, 40, 0.35));
}

.discover-domain-hero-copy {
  position: relative;
  z-index: 1;
  padding: 28px 24px;
  color: #fff;
}

.discover-domain-hero-copy h1 {
  color: #fff;
  margin: 0 0 8px;
}

.discover-domain-hero-copy p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  max-width: 36rem;
}

.discover-subtile {
  min-height: 168px;
}

.discover-subtile .tile-body {
  min-height: 168px;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-success { background: #dcfce7; color: #166534; }

.list { display: grid; gap: 12px; }
.list-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}
.list-item:hover { border-color: var(--brand-sage); text-decoration: none; }
.list-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--brand-cream);
}
.list-item-photo-fallback {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--brand-cream);
}
.place-detail { overflow: hidden; }
.place-detail-hero {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
  background: var(--brand-cream);
}
.list-item h3 { margin: 0 0 4px; font-size: 1rem; }
.list-item p { margin: 0; font-size: 0.85rem; color: var(--brand-secondary); }
.muted { color: var(--brand-secondary); }
.chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-green);
  font-size: 0.75rem;
  font-weight: 600;
}

.form { display: grid; gap: 14px; max-width: 520px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 0.9rem; }
.form input, .form select, .form textarea {
  font: inherit;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--brand-border);
  background: #fff;
}
.form textarea { min-height: 120px; resize: vertical; }

.auth-panel {
  max-width: 420px;
  margin: 40px auto;
  padding: 28px;
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--brand-border);
  text-align: center;
}
.auth-panel h1 { margin: 8px 0 6px; }
.auth-panel .logo { width: 72px; height: 72px; margin: 0 auto; }
.auth-actions { display: grid; gap: 10px; margin-top: 22px; }

.site-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.55);
  padding: 24px 20px 40px;
  text-align: center;
  color: var(--brand-secondary);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}

/* Admin */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--brand-bg); }
.admin-side {
  background: #123628;
  color: #e8f5ef;
  padding: 20px 14px;
}
.admin-side a {
  display: block;
  color: #d7ece1;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-side .brand { color: #fff; margin-bottom: 18px; padding: 0 8px; }
.admin-main { padding: 24px; }
.admin-main h1 { margin-top: 0; }
.table-wrap { overflow: auto; background: #fff; border-radius: 16px; border: 1px solid var(--brand-border); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--brand-border); text-align: left; vertical-align: top; }
table.data th { background: #f8faf9; font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--brand-border);
}
.stat strong { display: block; font-size: 1.4rem; color: var(--brand-green); }
.stat span { font-size: 0.8rem; color: var(--brand-secondary); }

.empty {
  padding: 28px;
  text-align: center;
  color: var(--brand-secondary);
  background: rgba(255,255,255,0.8);
  border-radius: var(--radius);
  border: 1px dashed var(--brand-border);
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { display: flex; flex-wrap: wrap; gap: 4px; }
  body,
  .landing-body {
    background-attachment: scroll;
  }
}

/* Landing: show the town illustration clearly; keep copy on a soft panel */
.landing-body {
  min-height: 100vh;
  background-color: #E8DFD0;
  background-image:
    linear-gradient(180deg, rgba(255, 252, 246, 0.28) 0%, rgba(255, 252, 246, 0.08) 32%, rgba(255, 252, 246, 0) 58%),
    url("../images/app-background.png");
  background-position: center 55%;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.landing-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-hero {
  padding: 36px 20px 20px;
  text-align: center;
}

.landing-hero-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px 30px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(30, 41, 59, 0.12);
  backdrop-filter: blur(10px);
}

.landing-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--brand-charcoal);
}

.landing-lead {
  margin: 0 auto 24px;
  color: var(--brand-secondary);
  font-size: 1.05rem;
  max-width: 34rem;
}

.landing-search {
  display: flex;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 8px 8px 8px 18px;
  box-shadow: var(--shadow);
  align-items: center;
}

.landing-search input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1.05rem;
  background: transparent;
  min-width: 0;
}

.landing-search .btn { border-radius: 999px; padding: 12px 20px; }

.landing-empty { margin-top: 16px; color: var(--brand-danger); }

.landing-towns { padding-top: 8px; padding-bottom: 48px; }
.landing-towns h2 {
  text-align: center;
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--brand-charcoal);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.town-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.town-grid form { margin: 0; }

.town-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 8px 24px rgba(30, 41, 59, 0.12);
  backdrop-filter: blur(6px);
  display: grid;
  gap: 4px;
}

.town-card strong { color: var(--brand-charcoal); font-size: 1.05rem; }
.town-card span { color: var(--brand-secondary); font-size: 0.85rem; }
.town-card:hover {
  border-color: var(--brand-sage);
  transform: translateY(-2px);
  transition: transform .15s ease;
}

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

@media (max-width: 600px) {
  .landing-search { flex-direction: column; border-radius: 20px; padding: 12px; }
  .landing-search input { width: 100%; padding: 8px 4px; }
  .landing-search .btn { width: 100%; }
}

/* Authenticated home: match Expo Home tab sections */
.home-feed {
  display: grid;
  gap: 14px;
  padding-bottom: 40px;
}

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.home-identity:hover { text-decoration: none; }

.home-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-green);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}

.home-greeting {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.home-place {
  display: block;
  font-size: 0.85rem;
  margin-top: 2px;
}

.home-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--brand-border);
  display: grid;
  place-items: center;
  color: var(--brand-charcoal);
}

.home-bell {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 8px 8px 4px 4px;
  position: relative;
  display: block;
}

.home-bell::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 6px;
  height: 3px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 4px 4px;
  transform: translateX(-50%);
}

.home-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--brand-border);
  color: var(--brand-secondary);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.home-search:hover {
  border-color: var(--brand-sage);
  text-decoration: none;
}

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.home-section-head--sub {
  align-items: flex-end;
}

.home-section-head h2,
.home-today-title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--brand-charcoal);
}

.home-section-head--sub h2 {
  font-size: 1.15rem;
}

.home-section-head a {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.home-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-green);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-live-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(46, 125, 88, 0.18);
}

.home-card,
.home-conditions,
.home-post {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.home-conditions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.home-conditions:hover {
  border-color: var(--brand-sage);
  text-decoration: none;
}

.home-conditions-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-secondary);
  margin-bottom: 4px;
}

.home-conditions strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.home-conditions p,
.home-card p,
.home-notice p,
.home-post p {
  margin: 6px 0 0;
  color: var(--brand-secondary);
  font-size: 0.9rem;
}

.home-growth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-growth--just_started {
  background: var(--brand-soft);
  border-color: #C9E5D6;
}

.home-growth h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.home-growth-stage {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.home-chip {
  flex: 0 0 auto;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--brand-border);
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 4px;
}

.home-chip:hover { border-color: var(--brand-sage); text-decoration: none; }
.home-chip strong { font-size: 0.95rem; }
.home-chip span {
  font-size: 0.8rem;
  color: var(--brand-secondary);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-chip--flood {
  background: #DFF3FA;
  border-color: #B9E3F2;
}

.home-chip--holiday {
  background: #FFF4E5;
  border-color: #FFE0B5;
}

.home-notice {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  border-left: 4px solid var(--brand-green);
}

.home-notice:hover { text-decoration: none; border-color: var(--brand-sage); }
.home-notice-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-secondary);
}

.home-notice--warning,
.home-notice--watch { border-left-color: #D97706; }
.home-notice--severe,
.home-notice--emergency { border-left-color: var(--brand-danger); }

.home-services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-service {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--brand-border);
  color: inherit;
  text-decoration: none;
  min-height: 84px;
}

.home-service:hover { border-color: var(--brand-sage); text-decoration: none; }
.home-service span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-secondary);
}
.home-service strong {
  font-size: 0.98rem;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-service.is-watch { background: #FFF8EB; }
.home-service.is-disrupted { background: #FFF1E8; }
.home-service.is-outage { background: #FEECEC; }

.home-neighbours { display: grid; gap: 12px; }

.home-empty-card,
.home-empty-feed {
  text-align: left;
}

.home-empty-feed {
  background: var(--brand-soft);
  border-color: #C9E5D6;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.home-post-list {
  display: grid;
  gap: 12px;
}

.home-post {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.home-post:hover {
  border-color: var(--brand-sage);
  text-decoration: none;
}

.home-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-post h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.home-post-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--brand-cream);
}

.home-post-stats {
  display: flex;
  gap: 14px;
  font-size: 0.82rem;
}

@media (min-width: 900px) {
  .home-services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-conditions {
    grid-template-columns: 1.6fr 1fr;
  }
}

@media (max-width: 600px) {
  .home-conditions {
    grid-template-columns: 1fr;
  }

  .home-growth {
    flex-direction: column;
    align-items: stretch;
  }
}

.chip-danger {
  background: #fee2e2;
  color: var(--brand-danger);
}

/* Feed parity with Expo community feed */
.feed-page {
  display: grid;
  gap: 16px;
  padding-bottom: 40px;
}

.feed-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.feed-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.03em;
}

.feed-hero .script {
  margin: 0;
  font-family: "Caveat", cursive;
  font-size: 1.4rem;
  color: var(--brand-green);
}

.feed-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.feed-filter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--brand-border);
  color: var(--brand-charcoal);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.feed-filter:hover,
.feed-filter.is-active {
  border-color: var(--brand-green);
  background: var(--brand-soft);
  color: var(--brand-green);
  text-decoration: none;
}

.feed-filter-rank {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
}

.feed-hint { margin: 0; font-size: 0.9rem; }

.feed-priority-cta,
.feed-upcoming-card,
.post-card,
.feed-comment {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.feed-priority-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.feed-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.feed-section-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.feed-upcoming-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.feed-upcoming-card {
  flex: 0 0 min(78vw, 280px);
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
}

.feed-upcoming-card:hover {
  border-color: var(--brand-sage);
  text-decoration: none;
}

.feed-post-list {
  display: grid;
  gap: 14px;
}

.post-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.post-card-head,
.post-card-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-card-author {
  justify-content: flex-start;
  min-width: 0;
}

.post-card-author strong,
.post-card-author span {
  display: block;
}

.post-card-author span {
  font-size: 0.82rem;
  margin-top: 2px;
}

.post-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-green);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}

.post-card h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.post-card-body {
  margin: 0;
  color: var(--brand-charcoal);
  white-space: pre-wrap;
  line-height: 1.45;
}

.post-card-media {
  display: grid;
  gap: 6px;
  border-radius: 14px;
  overflow: hidden;
}

.post-card-media img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  background: var(--brand-cream);
  display: block;
}

.post-card-media--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card-media--grid img {
  max-height: 160px;
}

.post-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-top: 4px;
  border-top: 1px solid var(--brand-border);
}

.post-card-actions form { margin: 0; }

.post-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand-secondary);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.post-action:hover { color: var(--brand-green); }
.post-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.post-card-time {
  margin-left: auto;
  font-size: 0.82rem;
}

.post-poll-options {
  display: grid;
  gap: 8px;
}

.post-poll-option {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--brand-border);
  background: #fff;
}

.post-poll-option.is-selected {
  border-color: var(--brand-green);
  background: var(--brand-soft);
}

.post-poll-option button {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.post-poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(46, 125, 88, 0.12);
  z-index: 0;
}

.post-event-rsvp {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.feed-back { margin: 0; }
.feed-comments { display: grid; gap: 12px; }
.feed-comments h2 { margin: 0; font-size: 1.15rem; }
.feed-comment-list { display: grid; gap: 10px; }
.feed-comment { padding: 14px 16px; }
.feed-comment header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.feed-comment p { margin: 0; white-space: pre-wrap; }

.compose-intents {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compose-intent {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-charcoal);
  font-weight: 600;
  text-decoration: none;
}

.compose-intent.is-active,
.compose-intent:hover {
  border-color: var(--brand-green);
  background: var(--brand-soft);
  color: var(--brand-green);
  text-decoration: none;
}

.compose-form { max-width: 640px; }
.compose-audience {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.compose-audience legend {
  font-weight: 600;
  margin-bottom: 4px;
}
.compose-radio {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.compose-options {
  display: grid;
  gap: 8px;
}

@media (max-width: 600px) {
  .feed-priority-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .post-card-actions {
    gap: 10px;
  }

  .post-card-time {
    width: 100%;
    margin-left: 0;
  }
}
