/* Landing & content pages, clean & simple */

/* ===== Home (public landing) ===== */
.home-page {
  --home-display: "Outfit", var(--font);
  --home-body: "Figtree", var(--font);
  --home-ink: #163028;
  --home-mist: #e7f2ea;
  --home-field: #1f6b45;
  font-family: var(--home-body);
  color: var(--home-ink);
  background: #f6faf7;
}
.home-page h1,
.home-page h2,
.home-page h3 {
  font-family: var(--home-display);
  color: var(--home-ink);
  letter-spacing: -0.03em;
}
.home-header {
  background: rgba(246, 250, 247, 0.88);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(30, 80, 55, 0.08);
}
.home-header .btn-ghost { color: var(--home-ink); }

.home-hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 3.5rem;
  overflow: hidden;
  isolation: isolate;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(86, 183, 120, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 45% at 85% 75%, rgba(60, 150, 224, 0.12), transparent 50%),
    linear-gradient(180deg, #eef7f1 0%, #f6faf7 48%, #e8f3ec 100%);
}
.home-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%232E7A48' stroke-opacity='0.08' stroke-width='1'%3E%3Cpath d='M0 40h120M0 80h120M40 0v120M80 0v120'/%3E%3C/g%3E%3C/svg%3E");
  animation: homeGridDrift 28s linear infinite;
}
.home-hero-inner {
  width: min(100%, 640px);
  margin-inline: auto;
  text-align: center;
  animation: homeRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.home-hero-brand {
  width: auto;
  height: clamp(120px, 26vw, 188px);
  max-width: min(360px, 82vw);
  margin: 0 auto 1.35rem;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(46, 122, 72, 0.18));
  animation: homeBrandFloat 5.5s ease-in-out infinite;
}
.home-hero-title {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 auto 0.85rem;
  max-width: 14ch;
}
.home-hero-lead {
  max-width: 34ch;
  margin: 0 auto 1.75rem;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.55;
  color: #3d564a;
}
.home-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.home-page .btn-lg {
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  font-size: 0.95rem;
  border-radius: 999px;
}
.home-page .btn-outline {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(46, 122, 72, 0.28);
  color: var(--home-field);
}
.home-page .btn-outline:hover {
  background: #fff;
  border-color: var(--green-dark);
  color: var(--green-deep);
}

.home-section {
  padding: clamp(3rem, 7vw, 4.75rem) 0;
}
.home-section--alt {
  background:
    linear-gradient(180deg, rgba(231, 242, 234, 0.55), rgba(246, 250, 247, 0.2));
  border-block: 1px solid rgba(46, 122, 72, 0.08);
}
.home-section-head {
  text-align: center;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}
.home-section-head h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin-bottom: 0.45rem;
}
.home-section-head p {
  max-width: 36ch;
  margin-inline: auto;
  color: #4a6358;
  font-size: 1rem;
}

.home-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  counter-reset: none;
  position: relative;
}
.home-steps::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 122, 72, 0.28), transparent);
  z-index: 0;
}
.home-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 0 0.75rem;
  animation: homeRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.home-step:nth-child(1) { animation-delay: 0.05s; }
.home-step:nth-child(2) { animation-delay: 0.12s; }
.home-step:nth-child(3) { animation-delay: 0.19s; }
.home-step:nth-child(4) { animation-delay: 0.26s; }
.home-step-num {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--home-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--home-field);
  box-shadow: 0 8px 18px rgba(31, 107, 69, 0.25);
}
.home-step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.home-step p {
  font-size: 0.9rem;
  color: #4a6358;
  max-width: 16ch;
  margin-inline: auto;
}

.home-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 1.75rem);
  max-width: 820px;
  margin-inline: auto;
}
.home-role {
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: 20px;
  border: 1px solid transparent;
  min-width: 0;
}
.home-role--producer {
  background: linear-gradient(160deg, #ffffff 0%, #eef8f1 100%);
  border-color: rgba(86, 183, 120, 0.28);
}
.home-role--farmer {
  background: linear-gradient(160deg, #ffffff 0%, #eef5fb 100%);
  border-color: rgba(60, 150, 224, 0.28);
}
.home-role h3 {
  margin: 0.75rem 0 0.4rem;
  font-size: 1.2rem;
}
.home-role p {
  font-size: 0.95rem;
  color: #4a6358;
  margin-bottom: 1rem;
}
.home-role-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--home-field);
}
.home-role--farmer .home-role-link { color: var(--blue-dark); }
.home-role-link:hover { text-decoration: underline; }

.home-learn { max-width: 640px; }
.home-learn-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.home-learn-list a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(46, 122, 72, 0.12);
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.home-learn-list a:hover {
  transform: translateY(-2px);
  border-color: rgba(86, 183, 120, 0.45);
  box-shadow: 0 10px 24px rgba(31, 107, 69, 0.08);
  color: inherit;
}
.home-learn-list a > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.home-learn-list strong {
  font-family: var(--home-display);
  font-size: 0.98rem;
  color: var(--home-ink);
}
.home-learn-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--green-soft);
  color: var(--green-deep);
}
.home-learn-list a:nth-child(2) .home-learn-icon {
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.home-learn-list a:nth-child(3) .home-learn-icon {
  background: #fff4e5;
  color: #9a6b12;
}
.home-learn-more {
  text-align: center;
  margin-top: 1.25rem;
}
.home-learn-more a {
  font-weight: 600;
  color: var(--home-field);
}
.home-footer {
  background: linear-gradient(180deg, #eef6f1, #e2efe7);
  color: #3d564a;
  border-top: 1px solid rgba(46, 122, 72, 0.12);
  margin-top: 0;
}
.home-footer .footer-links a,
.home-footer .footer-bottom {
  color: #4a6358;
}
.home-footer .footer-links a:hover { color: var(--home-field); }

@keyframes homeRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes homeBrandFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes homeGridDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-40px, -20px, 0); }
}

@media (max-width: 800px) {
  .home-steps {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 0.75rem;
  }
  .home-steps::before { display: none; }
}
@media (max-width: 640px) {
  .home-roles { grid-template-columns: 1fr; }
  .home-hero { min-height: auto; padding-top: 2rem; padding-bottom: 2.75rem; }
  .home-hero-title { max-width: none; }
}
@media (max-width: 420px) {
  .home-steps { grid-template-columns: 1fr; }
  .home-hero-cta { flex-direction: column; }
  .home-hero-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-inner,
  .home-step,
  .home-hero-brand,
  .home-hero-bg::after {
    animation: none !important;
  }
}

.hero {
  padding: 2.5rem 0 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  width: min(100% - 1.5rem, var(--container));
  margin-inline: auto;
  text-align: center;
}
.hero-logo {
  width: auto;
  height: clamp(110px, 22vw, 160px);
  max-width: min(320px, 78vw);
  margin: 0 auto 1.35rem;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
}
.hero h1 {
  max-width: 520px;
  margin: 0 auto 0.75rem;
  font-weight: 600;
}
.hero h1 .accent-g { color: var(--green-dark); }
.hero h1 .accent-b { color: var(--blue-dark); }
.hero-lead {
  max-width: 480px;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.hero-help {
  font-size: 0.82rem;
  color: var(--text-light);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto;
}
.quick-link {
  display: block;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}
.quick-link:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-deep);
}
.quick-link span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
@media (max-width: 520px) {
  .quick-links { grid-template-columns: 1fr; }
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.flow-step {
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.flow-step h3 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.flow-step p { font-size: 0.85rem; }
@media (max-width: 768px) {
  .flow-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .flow-steps { grid-template-columns: 1fr; }
}

.role-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  height: 100%;
}
.role-panel h3 { margin: 0.5rem 0 0.35rem; font-size: 1rem; }
.role-panel p { font-size: 0.88rem; margin-bottom: 0; }
.role-panel ul { margin-bottom: 1rem; list-style: none; padding-left: 0; }
.role-panel li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
  list-style: none;
}
.role-panel li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.article-hero {
  background: var(--green-deep);
  color: #fff;
  padding: 2rem 0;
  margin-bottom: 1.5rem;
}
.article-hero h1 { color: #fff; font-size: 1.5rem; }
.article-hero p { color: rgba(255,255,255,0.9); margin-top: 0.4rem; font-size: 0.95rem; }
.article-body { max-width: 640px; margin: 0 auto; }
.article-body h2 { margin: 1.5rem 0 0.5rem; font-size: 1.15rem; }
.article-body p { margin-bottom: 0.85rem; font-size: 0.95rem; }
.article-body ul { margin: 0 0 1rem 1.1rem; list-style: disc; }
.article-body li { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.35rem; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
}
.sticky-card { position: sticky; top: 72px; }

.progress-bar {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 999px;
}

.content-list {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 0.5rem;
}
.content-list a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
}
.content-list a:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: inherit;
}
.content-list .cl-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.content-list .cl-icon svg {
  width: 22px;
  height: 22px;
}
.content-list .cl-list { background: var(--blue-soft); color: var(--blue-dark); }
.content-list .cl-sort { background: #F3EEF8; color: #5E4A8A; }
.content-list .cl-tag { background: #FFF4E5; color: #9A6B12; }
.content-list .cl-plant { background: var(--green-soft); color: var(--green-deep); }
.content-list .cl-shop { background: #FFF4E5; color: #9A6B12; }
.content-list h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.content-list p { font-size: 0.82rem; margin-top: 0.15rem; }

.category-card { text-align: center; padding: 1.15rem 0.85rem; }
.category-card h3 { font-size: 0.95rem; }
.category-card p { font-size: 0.82rem; }

.sdg-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1.5rem;
}
.sdg-badge {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
}
.sdg-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}
.sdg-strip strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.sdg-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #A66F1E;
  margin-bottom: 0.2rem;
}
@media (max-width: 520px) {
  .sdg-strip {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* Messages */
.msg-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 768px) {
  .msg-layout { grid-template-columns: 1fr; }
}
.msg-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: 520px;
}
.msg-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
  background: transparent;
}
.msg-item:hover,
.msg-item.active { background: var(--green-soft); }
.msg-item strong { display: block; font-size: 0.9rem; color: var(--text); }
.msg-item span { font-size: 0.78rem; color: var(--text-muted); }
.msg-item .msg-preview {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-thread {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.msg-thread-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.msg-thread-body {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--bg);
  overflow-y: auto;
}
.bubble {
  max-width: 75%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.bubble.them {
  background: var(--surface);
  border: 1px solid var(--border);
  align-self: flex-start;
  color: var(--text);
}
.bubble.me {
  background: var(--green);
  color: #fff;
  align-self: flex-end;
}
.msg-compose {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.msg-compose .form-control { margin: 0; }

/* Contact / farmer cards */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}
.contact-card .who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.contact-card .who .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.contact-meta span {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.35;
}
.who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.who .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.deal-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.method-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
@media (max-width: 560px) {
  .method-picks { grid-template-columns: 1fr; }
}
.method-pick {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.method-pick:hover { border-color: var(--green); background: var(--green-soft); }
.method-pick.active {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--green);
}
.method-pick strong { display: block; margin: 0.35rem 0 0.2rem; font-size: 0.92rem; }
.method-pick p { font-size: 0.8rem; margin: 0; }
.method-pick .icon { width: 22px; height: 22px; color: var(--green-deep); }

.data-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.data-chip {
  padding: 0.55rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.data-chip strong { display: block; font-size: 1.05rem; color: var(--text); }

/* Admin analysis charts */
.analysis-page {
  flex: 0 1 auto;
  padding-bottom: 0.75rem;
}
.app-topbar .pill-row { margin-bottom: 0; }
.analysis-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.analysis-stack > .text-sm { margin: 0; }
.analysis-kpis { margin: 0; }
.analysis-kpis .stat-card { height: auto; }
.analysis-page .grid-4,
.analysis-page .analysis-charts {
  gap: 0.75rem;
  align-items: start;
}
.chart-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem 0.9rem;
  height: auto;
}
.chart-panel h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.chart-panel .chart-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  line-height: 1.4;
}
.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 200px;
}
.chart-wrap--compact {
  min-height: 160px;
}
.chart-wrap canvas {
  width: 100% !important;
  height: 200px !important;
  display: block;
}
.chart-wrap--compact canvas {
  height: 160px !important;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}
.analysis-page .impact-note {
  margin: 0;
  padding: 0.75rem 0.9rem;
  background: var(--green-soft);
  border: 1px solid #C8E6D3;
  border-radius: var(--radius);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--green-deep);
}
.impact-note strong { color: var(--green-deep); }

/* Unified listing connect, left / right professional layout */
.listing-connect {
  max-width: 1080px;
  margin: 0 auto;
}
.listing-connect > .text-sm {
  margin: 0 0 0.85rem;
  max-width: 52rem;
}
.listing-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: start;
}
.listing-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}
.listing-col--action {
  position: sticky;
  top: 64px;
}
.listing-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.listing-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.listing-panel-head .who { min-width: 0; }
.listing-panel-head .who strong {
  font-size: 1.1rem;
  display: block;
  line-height: 1.3;
}
.listing-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}
.listing-panel .listing-section-title + .text-sm,
.listing-panel .chart-desc,
.listing-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}
.listing-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  line-height: 1.45;
}
.listing-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.listing-facts > div {
  padding: 0.45rem 0.55rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.listing-facts .text-xs {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--text-light);
  font-weight: 500;
}
.listing-facts strong {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}
.listing-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.listing-map {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 16 / 11;
  min-height: 220px;
}
.listing-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  min-height: 220px;
}
.match-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 0.15rem;
  padding-right: 0.15rem;
}
.match-pick {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.match-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.match-pick-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.match-pick-body strong { font-size: 0.9rem; }
.match-pick-body .text-sm { font-size: 0.78rem; color: var(--text-muted); }
.match-pick:hover { border-color: var(--border-strong); background: var(--bg); }
.assign-col--producer .match-pick:hover,
.assign-col--producer .match-pick.active {
  border-color: var(--green);
  background: var(--green-soft);
}
.assign-col--farmer .match-pick:hover,
.assign-col--farmer .match-pick.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.match-pick.active {
  box-shadow: inset 0 0 0 1px currentColor;
}
.assign-col--producer .match-pick.active { color: var(--green-deep); }
.assign-col--farmer .match-pick.active { color: var(--blue-dark); }

.assign-page { max-width: 1100px; }
.assign-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.85rem;
  align-items: stretch;
  margin-bottom: 1rem;
}
.assign-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.assign-col--producer {
  box-shadow: 0 0 0 1px rgba(86, 183, 120, 0.08);
}
.assign-col--farmer {
  box-shadow: 0 0 0 1px rgba(60, 150, 224, 0.08);
}
.assign-col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.assign-col-head h2 {
  font-size: 1.05rem;
  margin: 0;
}
.assign-col-head .text-xs {
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.assign-search {
  margin-bottom: 0.75rem;
  width: 100%;
}
.assign-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4.5rem;
}
.assign-bridge-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.assign-bridge-icon .icon { width: 18px; height: 18px; }
.assign-pick-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
}
.assign-pick-avatar--prod {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
}
.assign-pick-avatar--farm {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}
.assign-list-empty {
  padding: 1rem 0.5rem;
  text-align: center;
  color: var(--text-muted);
}
.assign-action {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
}
.assign-summary-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.assign-summary-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
}
.assign-party strong { display: block; margin-top: 0.3rem; font-size: 0.95rem; }
.assign-party .text-sm { margin: 0.2rem 0 0; color: var(--text-muted); }
.assign-party-arrow {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 700;
}
.assign-action-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.assign-action-fields .btn { width: 100%; }
.assign-action-fields .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.assign-matches-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.assign-matches-head h2 { font-size: 1.05rem; margin: 0; }
.assign-match-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  min-width: 0;
}
.assign-match-side {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.assign-match-side strong { font-size: 0.92rem; }
.assign-match-link {
  color: var(--text-muted);
  font-weight: 700;
}
@media (max-width: 900px) {
  .assign-split {
    grid-template-columns: 1fr;
  }
  .assign-bridge {
    padding: 0;
    transform: rotate(90deg);
  }
  .assign-action {
    grid-template-columns: 1fr;
  }
  .assign-summary-pair {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .assign-party-arrow { display: none; }
}
.listing-connect-form .form-group { margin-bottom: 0.7rem; }
.listing-connect-form .form-group:last-of-type { margin-bottom: 0.85rem; }
.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.listing-actions .btn { flex: 1 1 auto; min-width: 7.5rem; }
.board-cta {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-deep);
}
.find-search {
  max-width: 480px;
}
.find-search .search-box {
  width: 100%;
}
.find-search-empty {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Browse knowledge feed */
.browse-wrap { max-width: 640px; margin: 0 auto; }
.browse-composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
}
.browse-composer textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  min-height: 72px;
  resize: vertical;
  background: var(--bg);
  margin-bottom: 0.65rem;
}
.browse-composer textarea:focus {
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--green);
}
.browse-composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.browse-composer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.browse-photo-preview {
  display: none;
  margin-bottom: 0.65rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  min-height: 140px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 1rem;
}
.browse-photo-preview.is-on { display: flex; }
.browse-photo-preview .icon { width: 28px; height: 28px; color: var(--green-deep); }
.browse-feed { display: flex; flex-direction: column; gap: 0.85rem; }
.feed-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
}
.feed-post-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.feed-post-head .who { flex: 1; min-width: 0; }
.feed-post-head .text-xs { color: var(--text-light); }
.feed-post-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.feed-post-image {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--green-soft), var(--blue-soft));
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--green-deep);
  font-size: 0.85rem;
  font-weight: 600;
  gap: 0.4rem;
}
.feed-post-image .icon { width: 22px; height: 22px; }
.feed-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}
.feed-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 0.72rem;
  font-weight: 600;
}
.feed-tag--offer {
  background: #e8f5e9;
  color: #1b5e20;
}
.feed-tag--need {
  background: #fff3e0;
  color: #e65100;
}
.feed-post--listing .feed-post-body { margin-bottom: 0.35rem; }
.feed-post-cta {
  display: inline-flex;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-deep);
  text-decoration: none;
}
.feed-post-cta:hover { text-decoration: underline; }

/* ===== Profile ===== */
.profile-page {
  max-width: 640px;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  min-width: 0;
}
.profile-hero--producer {
  background: linear-gradient(145deg, #f7fbf8, #eef7f1);
  border-color: rgba(86, 183, 120, 0.22);
}
.profile-hero--farmer {
  background: linear-gradient(145deg, #f7fafc, #eef5fb);
  border-color: rgba(60, 150, 224, 0.22);
}
.profile-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 6px 16px rgba(86, 183, 120, 0.28);
}
.profile-hero--farmer .profile-avatar {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 6px 16px rgba(60, 150, 224, 0.28);
}
.profile-hero-text {
  min-width: 0;
  flex: 1;
}
.profile-hero-text h2 {
  margin: 0.35rem 0 0.2rem;
  font-size: 1.15rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-hero-text p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.profile-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem 1.15rem 0.35rem;
}
.profile-block h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}
.profile-block .form-group { margin-bottom: 0.9rem; }
.profile-block .form-control {
  border-radius: 11px;
  background: var(--bg);
}
.profile-block .form-control:focus { background: #fff; }
.profile-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.15rem;
}
.profile-actions .btn {
  min-width: 140px;
  border-radius: 999px;
}
@media (max-width: 600px) {
  .profile-hero {
    align-items: flex-start;
  }
  .profile-actions .btn {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .listing-split {
    grid-template-columns: 1fr;
  }
  .listing-col--action {
    position: static;
  }
  .listing-map {
    min-height: 180px;
    aspect-ratio: 16 / 10;
  }
}
@media (max-width: 480px) {
  .listing-facts { grid-template-columns: 1fr; }
}
