/* AgriPricePH — the one public footer (markup: public/js/public-shell.js → buildFooter).
   Self-contained colours so it looks the same on every page, whatever page stylesheet is loaded. */
footer.site-footer {
  --sf-950: #0d2117;
  --sf-700: #2a5c3f;
  --sf-400: #52b07a;
  --sf-300: #78ca97;
  --sf-200: #aae0be;
  position: relative;
  background:
    radial-gradient(ellipse 70% 80% at 8% 0%, rgba(82, 176, 122, 0.12), transparent 55%),
    var(--sf-950);
  padding: 0 28px;
  border-top: 1px solid rgba(120, 202, 151, 0.16);
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.58);
}

footer.site-footer::before {
  content: '';
  display: block;
  height: 3px;
  margin: 0 -28px;
  background: linear-gradient(90deg, transparent, var(--sf-400) 22%, var(--sf-200) 50%, var(--sf-400) 78%, transparent);
  opacity: 0.7;
}

.site-footer .footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 0 36px;
  display: grid;
  grid-template-columns: 1.45fr 0.75fr 0.75fr 1.05fr;
  gap: 40px 32px;
  align-items: start;
}

.site-footer .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
}

.site-footer .footer-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--sf-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(120, 202, 151, 0.25);
}

.site-footer .footer-logo-icon svg { width: 20px; height: 20px; display: block; }

.site-footer .footer-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #f3faf6;
  letter-spacing: -0.3px;
}

.site-footer .footer-tagline {
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.48);
  max-width: 320px;
  margin: 0 0 16px;
}

/* "Last updated" pill */
.site-footer .footer-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(120, 202, 151, 0.1);
  border: 1px solid rgba(120, 202, 151, 0.22);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
}
.site-footer .footer-updated b { color: #fff; font-weight: 700; }
.site-footer .footer-updated .dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--sf-300);
  box-shadow: 0 0 0 3px rgba(120, 202, 151, 0.18);
}
.site-footer .footer-updated.is-offline .dot { background: #94a3b8; box-shadow: none; }

.site-footer .footer-col h3 {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sf-300);
  margin: 6px 0 16px;
}

.site-footer .footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer .footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  transition: color 0.18s;
}
.site-footer .footer-col a:hover { color: #fff; }

.site-footer .footer-source-copy {
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.48);
  margin: 0;
}

/* ── "Where the data comes from": the home page's footer opens with it (public-shell.js → buildSources).
   It used to be a separate light band between the green call-to-action and this dark footer, so the
   home page ended in three clashing bands; now it is part of the footer and always dark like it. ── */
.site-sources {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 0 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-sources-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.site-sources-head h2 {
  margin: 0;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.3px;
  color: #f3faf6;
}
.site-sources-head p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.48); }

.site-sources .source-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.site-sources .source-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 202, 151, 0.14);
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
  min-width: 0;
}
.site-sources .source-chip:hover {
  border-color: rgba(120, 202, 151, 0.45);
  background: rgba(120, 202, 151, 0.07);
  transform: translateY(-1px);
}
.site-sources .source-chip:focus-visible { outline: 2px solid var(--sf-300); outline-offset: 2px; }
.site-sources .source-chip.is-primary { border-color: rgba(120, 202, 151, 0.4); }
.site-sources .source-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.site-sources .source-logo--icon {
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-sources .source-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.site-sources .source-text b { font-size: 13px; font-weight: 700; line-height: 1.3; color: #f3faf6; }
.site-sources .source-text span { font-size: 11.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.5); }

/* Where the price figure comes from, and DA's covered markets (B5) */
.site-sources .footer-price-source { margin: 16px 0 0; }
.site-sources .footer-price-source p { margin: 0; font-size: 12.5px; line-height: 1.7; color: rgba(255, 255, 255, 0.5); max-width: 920px; }
.site-sources .footer-price-source b { color: rgba(255, 255, 255, 0.82); }
.site-sources .footer-markets { margin-top: 8px; }
.site-sources .footer-markets[hidden] { display: none; }
.site-sources .footer-markets summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sf-300);
  list-style: none;
}
.site-sources .footer-markets summary::-webkit-details-marker { display: none; }
.site-sources .footer-markets summary::before { content: '▸'; transition: transform 0.18s; }
.site-sources .footer-markets[open] summary::before { transform: rotate(90deg); }
.site-sources .footer-markets summary:focus-visible { outline: 2px solid var(--sf-300); outline-offset: 2px; border-radius: 4px; }
.site-sources .footer-markets ol {
  margin: 12px 0 0;
  padding: 0 0 0 22px;
  columns: 4 200px;
  column-gap: 28px;
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.62);
}
.site-sources .footer-markets li { break-inside: avoid; }
.site-sources .footer-markets li::marker { color: var(--sf-300); font-size: 11px; }

/* The links block under the sources needs a little less top space than a footer that starts with it. */
.site-footer.has-sources .footer-inner { padding-top: 40px; }

.site-footer .footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.site-footer .footer-bottom p { font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, 0.34); margin: 0; }

@media (max-width: 1100px) {
  .site-sources .source-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .site-footer .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Phones: Explore and Help side by side, brand and contact full width, sources two-up. */
@media (max-width: 640px) {
  footer.site-footer { padding: 0 16px; }
  footer.site-footer::before { margin: 0 -16px; }
  .site-footer .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px 16px; padding: 36px 0 24px; }
  .site-footer .footer-brand-col,
  .site-footer .footer-inner > .footer-col:last-child { grid-column: 1 / -1; }
  .site-footer .footer-col h3 { margin: 0 0 12px; }
  .site-footer .footer-col ul { gap: 9px; }
  .site-footer .footer-col a { font-size: 13.5px; }
  .site-footer .footer-tagline { font-size: 13px; margin-bottom: 14px; }
  .site-footer .footer-updated { font-size: 12px; border-radius: 14px; }
  .site-footer .footer-bottom { flex-direction: column; align-items: flex-start; padding: 16px 0 24px; }
  .site-footer .footer-bottom p { font-size: 11.5px; }
  .site-footer.has-sources .footer-inner { padding-top: 28px; }
  .site-sources { padding: 32px 0 26px; }
  .site-sources-head { margin-bottom: 14px; }
  .site-sources-head h2 { font-size: 21px; }
  .site-sources-head p { font-size: 12px; }
  /* One compact row per source: two-up left the descriptions three lines deep. */
  .site-sources .source-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .site-sources .source-chip { padding: 8px 10px; gap: 10px; border-radius: 10px; }
  .site-sources .source-logo { width: 30px; height: 30px; }
  .site-sources .source-logo--icon svg { width: 17px; height: 17px; }
  .site-sources .source-text b { font-size: 12px; }
  .site-sources .source-text span { font-size: 10.5px; }
  .site-sources .footer-price-source p { font-size: 12px; }
  .site-sources .footer-markets ol { columns: 1; font-size: 12px; }
}

/* "DA prices updated: <day>" stamp, placed next to the prices on each page (public-shell.js renderDaStamps).
   Built from currentColor so it reads on the dark hero bands and on light cards alike. */
.da-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  background: color-mix(in srgb, currentColor 7%, transparent);
}
.da-stamp:empty { display: none; }
.da-stamp b { font-weight: 700; }
.da-stamp-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #4caf6e;
  box-shadow: 0 0 0 3px rgba(76, 175, 110, 0.2);
}
.da-stamp.is-offline .da-stamp-dot { background: #94a3b8; box-shadow: none; }
.da-stamp-sep { opacity: 0.55; }
@media (max-width: 480px) { .da-stamp { font-size: 12px; border-radius: 14px; } }
