:root {
  --milk-white: #faf9f6;
  /* Main column: wide band (~90% vw), modest side margins; cap on ultra-wide */
  --page-band-max: min(90%, 1540px);
  --content-max: var(--page-band-max);
  /* Long-form copy stays readable inside the band */
  --prose-max: min(78ch, 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}
body {
  background: var(--milk-white);
  color: #212529;
  overflow-x: hidden;
  max-width: 100%;
}
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

header {
  background: #2d5016;
  color: #ffffff;
  padding: 16px 32px;
  position: relative;
}
.header-content {
  width: 100%;
  max-width: var(--page-band-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.logo-section {
  flex-shrink: 0;
}
.logo-section a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.nav-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #2d5016;
  font-size: 16px;
}

h1 {
  font-size: 20px;
  font-weight: 700;
}

.tagline {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

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

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btn-export {
  padding: 8px 16px;
  background: #fff;
  color: #2d5016;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
}

.btn-export:hover {
  background: var(--milk-white);
}
a.btn-export-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-export-wrap {
  position: relative;
}
.export-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 200px;
  background: var(--milk-white);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: none;
  z-index: 100;
  padding: 6px 0;
}
.export-dropdown[hidden] {
  display: none;
}
.export-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  border: none;
  background: none;
  font-size: 13px;
  color: #1f2937;
  cursor: pointer;
}
.export-dropdown button:hover {
  background: #f3f4f6;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
body.nav-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}
body.nav-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.layer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  flex: 1 1 auto;
}
.layer-nav a {
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.layer-nav a.active {
  color: rgba(255,255,255,0.92);
  background: transparent;
}

.hero {
  text-align: center;
  padding: 32px 24px 40px;
  margin-bottom: 32px;
  background: var(--milk-white);
}
/* ========== Home page — academic research professional ========== */
.page-home .container { max-width: 100%; padding: 0; }
.page-home main { padding-bottom: 0; }

.home-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background: #1a2e14 url('./images/lewa.png') center/cover no-repeat;
  z-index: 0;
}
.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,46,20,0.75) 0%, rgba(26,46,20,0.88) 100%);
  z-index: 1;
}
.home-hero-inner {
  position: relative;
  z-index: 2;
  max-width: min(920px, var(--content-max));
  padding: 64px 24px 72px;
}
.home-hero-badge {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin: 0 0 16px 0;
}
.home-hero-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.home-hero-lead {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
  margin: 0 0 12px 0;
}
.home-hero-caption {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0 0 28px 0;
}
.btn-start-survey {
  display: inline-block;
  padding: 14px 28px;
  background: #c9a227;
  color: #1a2e14;
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.btn-start-survey:hover {
  background: #e0b83d;
  color: #1a2e14;
  transform: translateY(-1px);
}
.home-hero-link {
  display: inline-block;
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  padding: 10px 20px;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.home-hero-link:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}

.home-mission {
  background: #fff;
  border-bottom: 1px solid #e8ebe6;
}
.home-mission-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 24px;
}
.home-mission-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: #2d5016;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px 0;
}
.home-mission-text {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #374151;
  margin: 0;
}
.home-mission-text strong {
  color: #1a2e14;
}

.home-team {
  background: #fff;
  border-top: 1px solid #e8ebe6;
  border-bottom: 1px solid #e8ebe6;
}
.home-team-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 22px 16px 26px;
}
.home-team-heading {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: #2d5016;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 6px 0;
}
.home-team-intro {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #495057;
  margin: 0 0 8px 0;
}
.home-team-carousel {
  max-width: 100%;
  width: 100%;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 2px;
}
.home-team-viewport {
  overflow: hidden;
  border-radius: 0;
  width: 100%;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.home-team-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.35s ease;
  width: 100%;
}
.home-team-slide {
  flex: 0 0 50%;
  box-sizing: border-box;
  text-align: center;
  padding: 0 6px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.home-team-card {
  margin: 0;
  padding: 0;
  border-radius: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.home-team-thumb {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  height: 0;
  padding-bottom: 75%;
  overflow: hidden;
  border-radius: 8px;
  background: #e8ece9;
}
.home-team-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.home-team-caption {
  flex: 0 0 auto;
  margin: 8px 0 0;
  padding: 0 4px;
  max-width: none;
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #374151;
  min-height: 4.35em;
  text-align: center;
}
.home-team-controls {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.home-team-nav {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.home-team-nav:hover {
  background: #eef2ff;
  border-color: #cbd5e1;
}
.home-team-dots {
  display: flex;
  gap: 8px;
}
.home-team-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #d1d5db;
  padding: 0;
  cursor: pointer;
}
.home-team-dot.is-active {
  width: 24px;
  background: #0f172a;
}
.home-team-status {
  margin: 4px 0 0;
  text-align: center;
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
}

.home-tools {
  background: #f8f9f7;
}
.home-tools-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 24px 28px;
}
.home-tools-heading {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: #2d5016;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 10px 0;
}
.home-tools-intro {
  font-size: 0.9375rem;
  color: #495057;
  line-height: 1.5;
  margin: 0 0 24px 0;
  max-width: 100%;
}
.home-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}
.home-tool-card {
  display: block;
  padding: 24px;
  background: #fff;
  border: 1px solid #e8ebe6;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-tool-card:hover {
  border-color: #2d5016;
  box-shadow: 0 4px 20px rgba(45,80,22,0.08);
}
.home-tool-card-primary {
  border-color: #2d5016;
  background: linear-gradient(180deg, #fafcf9 0%, #fff 100%);
}
.home-tool-card-primary:hover {
  box-shadow: 0 6px 24px rgba(45,80,22,0.12);
}
.home-tool-card-label {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2d5016;
  display: block;
  margin-bottom: 10px;
}
.home-tool-card-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a2e14;
  margin: 0 0 10px 0;
  line-height: 1.3;
}
.home-tool-card-desc {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #495057;
  margin: 0 0 16px 0;
}
.home-tool-card-action {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2d5016;
}

.home-about {
  background: #fff;
}
.home-about-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px 24px 56px;
}
.home-about-heading {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: #2d5016;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px 0;
}
.home-about p {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #495057;
  margin: 0;
}
.home-about a {
  color: #2d5016;
  font-weight: 600;
  text-decoration: underline;
}
.home-about a:hover {
  color: #1a3a0f;
}

@media (max-width: 768px) {
  .home-hero { min-height: 360px; }
  .home-hero-inner { padding: 48px 20px 56px; }
  .home-tools-grid { grid-template-columns: 1fr; }
}

/* Legacy home classes (other pages may reference) */
.home-content { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
.home-title { font-size: 1.5rem; font-weight: 700; color: #212529; margin: 0 0 8px 0; }
.home-lead { font-size: 1rem; color: #495057; line-height: 1.5; margin: 0; }
.home-heading { font-size: 0.8125rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 12px 0; }
.home-links, .home-about { margin-bottom: 40px; }
.home-list { list-style: none; padding: 0; margin: 0; }
.home-list li { font-size: 0.9375rem; color: #212529; line-height: 1.5; margin-bottom: 10px; }
.home-list a { color: #212529; font-weight: 600; text-decoration: underline; }
.home-list a:hover { color: #2d5016; }

.hero-home {
  padding: 48px 32px 56px;
  margin-bottom: 48px;
  background: var(--milk-white);
  border-radius: 12px;
}
.hero-headline {
  font-size: 1.75rem;
  font-weight: 700;
  color: #212529;
  letter-spacing: -0.03em;
  line-height: 1.3;
  max-width: min(760px, 100%);
  margin: 0 auto 16px;
}
.hero-sub {
  font-size: 1rem;
  color: #495057;
  max-width: min(720px, 100%);
  margin: 0 auto;
  line-height: 1.6;
}
.hero-title {
  font-size: 22px;
  font-weight: 800;
  color: #212529;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.hero-goal {
  font-size: 15px;
  color: #495057;
  max-width: min(820px, 100%);
  margin: 0 auto 14px;
  line-height: 1.55;
}
.hero-goal-alt {
  margin-bottom: 22px;
  font-weight: 600;
  color: #212529;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #212529;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.loop-mini {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #212529;
}
.loop-step {
  padding: 4px 10px;
  background: var(--milk-white);
  border-radius: 4px;
}
.loop-arrow {
  color: #6b7280;
  font-weight: 400;
}

.page-nav-links {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
}
.page-nav-links a {
  color: #212529;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}
.page-nav-links a:hover {
  color: #2d5016;
}

.solution-structure {
  margin-bottom: 48px;
  padding: 0;
  background: transparent;
}
.solution-structure-title {
  font-size: 18px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 24px;
  text-align: center;
}
.solution-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.solution-card {
  padding: 28px 32px;
  background: var(--milk-white);
  border-radius: 10px;
}
.solution-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 12px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.solution-card-desc {
  font-size: 0.9375rem;
  color: #495057;
  line-height: 1.65;
  margin: 0;
}

.loop-section {
  margin-bottom: 48px;
}
.loop-section .section-title {
  margin-bottom: 20px;
}
.loop-intro {
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: min(820px, 100%);
}
.loop-intro:last-of-type {
  margin-bottom: 20px;
}
.loop-steps {
  padding-left: 20px;
  margin: 0;
}
.loop-steps li {
  margin-bottom: 10px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #374151;
}

.evidence-section {
  margin-bottom: 48px;
  padding: 32px 0 0;
  background: transparent;
}
.evidence-section .section-title {
  margin-bottom: 16px;
}
.evidence-section h3 {
  font-size: 17px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 12px;
}
.evidence-intro {
  font-size: 0.9375rem;
  color: #495057;
  line-height: 1.55;
  margin-bottom: 16px;
}
.evidence-intro a {
  color: #212529;
  font-weight: 600;
  text-decoration: underline;
}
.evidence-intro a:hover {
  color: #2d5016;
}
.evidence-dimensions {
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
  padding-left: 22px;
  margin: 0;
}
.evidence-dimensions li {
  margin-bottom: 6px;
}

.layer-section {
  margin-bottom: 40px;
  padding: 20px;
  background: var(--milk-white);
}
.layer-section.layer-1 {
  padding: 20px 24px;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}
/* SCOUT tool — scout-engine.html only */
.layer-section.layer-2 {
  padding: 14px 18px;
  margin-bottom: 24px;
}
.layer-section.layer-2 > h3 {
  margin-bottom: 12px;
}
.layer-section.layer-2 > .layer-intro {
  margin-bottom: 14px;
}
.layer-section.layer-2 .tool-card {
  margin-bottom: 20px;
}
.layer-section.layer-2 .layer-grid {
  gap: 14px;
}
.layer-section.layer-2 .layer-card {
  padding: 14px 16px;
}
.layer-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 20px;
}
.layer-section h4 {
  margin-top: 28px;
  margin-bottom: 12px;
}
.layer-section h4:first-of-type {
  margin-top: 0;
}
.layer-sub {
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
}
.layer-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #2d5016;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.layer-lead {
  font-size: 13px;
  color: #495057;
  margin-bottom: 20px;
  line-height: 1.5;
}
.layer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.layer-card {
  padding: 18px;
  background: var(--milk-white);
}
.layer-card h4 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2d5016;
  margin-bottom: 10px;
}
.layer-card ul {
  font-size: 12px;
  color: #374151;
  line-height: 1.6;
  padding-left: 18px;
}
.layer-card ul.dimensions {
  list-style: none;
  padding-left: 0;
}
.layer-card ul.dimensions li::before {
  content: '• ';
  color: #2d5016;
}
.layer-card p {
  font-size: 12px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 8px;
}
.layer-card.close-loop {
  border-left: 3px solid #2d5016;
}

.tools-channels {
  margin-bottom: 14px;
}
.community-indicators,
.tools-summary {
  margin-bottom: 28px;
}
.tools-channels h4,
.community-indicators h4,
.tools-summary h4 {
  font-size: 13px;
  font-weight: 700;
  color: #2d5016;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 14px;
}
.tools-channels h4 {
  margin-bottom: 8px;
}
.channel-list {
  display: grid;
  gap: 8px;
}
.channel-item {
  padding: 10px 12px;
  background: var(--milk-white);
  border-radius: 8px;
}
.channel-item strong {
  display: block;
  font-size: 12px;
  color: #212529;
  margin-bottom: 4px;
}
.channel-item p {
  font-size: 13px;
  color: #495057;
  line-height: 1.5;
  margin: 0;
}

/* SMS / IVR tab: mockup + controls left; Channels + Process right (wide screens) */
@media (min-width: 960px) {
  .channel-panel-sms .sms-tool-wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 28px 40px;
    align-items: start;
  }
  .channel-panel-sms .sms-tool-col {
    min-width: 0;
  }
  .channel-panel-sms .sms-tool-wide .tool-card {
    margin-bottom: 0;
  }
  .channel-panel-sms .sms-tool-col-copy .tools-channels {
    margin-bottom: 12px;
  }
  .channel-panel-sms .sms-tool-col-copy .scout-flow {
    margin-bottom: 0;
  }
}

/* SMS tab: denser “Process” steps (scout-engine.html keeps default .flow-step spacing) */
.channel-panel-sms .scout-flow h4 {
  margin-bottom: 8px;
}
.channel-panel-sms .flow-steps {
  gap: 10px;
}
.channel-panel-sms .flow-step {
  padding: 12px 12px 12px 44px;
  border-radius: 8px;
}
.channel-panel-sms .flow-step-num {
  left: 10px;
  top: 11px;
  width: 24px;
  height: 24px;
  font-size: 12px;
  border-radius: 6px;
}
.channel-panel-sms .flow-step h5 {
  margin-bottom: 4px;
  font-size: 13px;
}
.channel-panel-sms .flow-step p {
  margin-bottom: 4px;
  line-height: 1.45;
}
.channel-panel-sms .scout-flow {
  margin-bottom: 14px;
}

/* Community Interface page — reduce vertical whitespace (scoped + CI-only blocks) */
.community-interface-page.layer-section.layer-1 {
  padding: 14px 18px;
  margin-bottom: 24px;
}
.community-interface-page.layer-section h3 {
  margin-bottom: 12px;
}
.community-interface-page > .layer-intro {
  margin-bottom: 14px;
}
.community-interface-page.layer-section h4 {
  margin-top: 18px;
  margin-bottom: 8px;
}
.community-interface-page.layer-section h4:first-of-type {
  margin-top: 0;
}
.community-interface-page .community-indicators,
.community-interface-page .tools-summary {
  margin-bottom: 18px;
}
.community-interface-page .community-indicators h4,
.community-interface-page .tools-summary h4 {
  margin-bottom: 10px;
}
.community-interface-page .community-indicators > p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #495057;
  line-height: 1.45;
}
.community-interface-page .indicators-grid {
  gap: 12px;
}
.community-interface-page .indicators-block {
  padding: 12px 14px;
  border-radius: 8px;
}
.community-interface-page .indicators-block strong {
  margin-bottom: 6px;
}
.community-interface-page .layer-grid {
  gap: 14px;
}
.community-interface-page .layer-card {
  padding: 14px 16px;
}
.community-interface-page .tool-card {
  margin-bottom: 24px;
}
.community-interface-page #channel-panel-ussd .layer-lead {
  margin-bottom: 14px;
}
.community-interface-page .ussd-mockup-section {
  margin-bottom: 22px;
  gap: 12px;
}
.community-interface-page .ussd-flows-grid {
  gap: 16px;
  margin-bottom: 22px;
}
.community-interface-page .ussd-flow-card {
  padding: 14px;
}
.community-interface-page .ussd-flow-card h5 {
  margin-bottom: 10px;
}
.community-interface-page .ussd-response-section {
  margin-bottom: 18px;
}
.community-interface-page #channel-panel-ussd .layer-intro {
  margin-bottom: 14px;
}
.community-interface-page .tool-header {
  padding: 14px 18px;
}
.community-interface-page .tool-intro {
  margin: 0 18px 12px;
  max-width: calc(100% - 36px);
}
.community-interface-page .phone-device-toggle {
  margin: 0 18px 12px;
}
.community-interface-page .tool-card-phone .phone-mockup {
  margin: 0 18px 18px;
  padding: 18px;
}

@media (min-width: 960px) {
  .community-interface-page .channel-panel-sms .sms-tool-wide {
    gap: 20px 28px;
  }
}

.indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}
.indicators-block {
  padding: 18px;
  background: var(--milk-white);
  border-radius: 10px;
}
.indicators-block strong {
  font-size: 12px;
  color: #2d5016;
  display: block;
  margin-bottom: 10px;
}
.indicators-block ul {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
  padding-left: 18px;
  margin: 0;
}
.indicators-block ul ul {
  margin-top: 6px;
  padding-left: 20px;
}
.tools-summary p {
  font-size: 13px;
  color: #495057;
  line-height: 1.55;
  margin-bottom: 10px;
}
.tools-summary p:last-child {
  margin-bottom: 0;
}

/* Community interface: intro + simple flowchart */
.layer-intro {
  font-size: 14px;
  color: #495057;
  margin-bottom: 20px;
  line-height: 1.5;
}

.flowchart-block {
  margin-bottom: 22px;
}
.flowchart-header {
  margin-bottom: 12px;
}
.flowchart-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d5016;
  margin: 0 0 6px 0;
  letter-spacing: 0.02em;
}
.flowchart-desc {
  font-size: 15px;
  color: #495057;
  margin: 0;
  line-height: 1.6;
  max-width: none;
  width: 100%;
}
.flowchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 14px;
  background: #f8f9f8;
  border: 1px solid #dee2de;
  border-radius: 8px;
}
.flowchart-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.flowchart-box {
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #2d5016;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #2d5016;
}
.flowchart-box-center {
  background: #2d5016;
  color: #fff;
}
.flowchart-arrow {
  color: #2d5016;
  font-size: 18px;
  line-height: 1;
  margin: 8px 0;
}
.flowchart-arrow-bidi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 8px 0;
  color: #2d5016;
  font-size: 16px;
  font-weight: 700;
}
.flowchart-arrow-down { opacity: 0.9; }
.flowchart-arrow-up { opacity: 0.7; }
.flowchart-subnote {
  display: block;
  font-size: 0.85em;
  font-weight: 500;
  opacity: 0.95;
}

/* Hand-drawn sketch theme */
.flowchart-sketch {
  background: #faf8f5;
  border: 2px dashed #b8a99a;
  border-radius: 4px;
  padding: 18px 16px;
  font-family: "Caveat", cursive;
}
.flowchart-sketch .flowchart-title {
  font-family: inherit;
  font-weight: 600;
  font-size: 1.5rem;
}
.flowchart-sketch .flowchart-desc {
  font-family: inherit;
  font-size: 1.05rem;
  color: #5c5348;
}
.flowchart-explanation {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(45, 80, 22, 0.06);
  border-left: 4px solid #2d5016;
  border-radius: 0 8px 8px 0;
  max-width: var(--prose-max);
}

/* Wide screens: intro line full width; diagram + Aim row share equal height */
@media (min-width: 960px) {
  .flowchart-block {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    column-gap: 28px;
    row-gap: 16px;
  }
  .flowchart-block > .flowchart-header {
    flex: 1 0 100%;
    margin-bottom: 4px;
  }
  .flowchart-block > .flowchart.flowchart-sketch {
    flex: 1 1 0;
    min-width: 280px;
    max-width: 520px;
    margin-top: 0;
    align-self: stretch;
    box-sizing: border-box;
  }
  .flowchart-block > .flowchart-explanation {
    flex: 1 1 0;
    min-width: 280px;
    max-width: none;
    margin-top: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-sizing: border-box;
  }
}

.flowchart-elab-lead {
  font-size: 13px;
  font-weight: 700;
  color: #2d5016;
  margin: 10px 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.flowchart-elab-lead:first-child {
  margin-top: 0;
}
.flowchart-elab-p {
  font-size: 14px;
  color: #374151;
  line-height: 1.55;
  margin: 0 0 8px 0;
}
.flowchart-elab-p strong {
  color: #2d5016;
}
.flowchart-elab-list {
  margin: 0 0 8px 0;
  padding-left: 18px;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}
.flowchart-elab-list li {
  margin-bottom: 4px;
}
.flowchart-elab-list li:last-child {
  margin-bottom: 0;
}
.flowchart-elab-list strong {
  color: #2d5016;
}
.flowchart-elab-note {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
  font-style: italic;
}

.channel-switch-wrap {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #e0e6de;
  width: fit-content;
}
.channel-switch-btn {
  padding: 10px 16px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7c63;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.channel-switch-btn:hover {
  color: #2d5016;
}
.channel-switch-btn.active {
  color: #2d5016;
  border-bottom-color: #2d5016;
}
.channel-panel {
  display: block;
}
.channel-panel[hidden] {
  display: none;
}
.ussd-response-example {
  padding: 16px 20px;
  background: #0a0e0a;
  color: #9ccc65;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 8px;
  margin-top: 12px;
  max-width: 420px;
}
.ussd-response-example p { margin: 0; }
.ussd-response-example strong { color: #c5e1a5; }

.flowchart-combine {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 4px 16px;
}
.flowchart-rugged-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  min-width: 280px;
  min-height: 72px;
  color: #6b5b4f;
  pointer-events: none;
}
.rugged-circle-path {
  stroke-dasharray: 4 3;
  stroke-linecap: round;
}
.flowchart-combine-row {
  position: relative;
  z-index: 1;
  align-items: center;
  gap: 12px;
}
.flowchart-plus {
  font-size: 1.4rem;
  font-weight: 700;
  color: #6b5b4f;
  line-height: 1;
  flex-shrink: 0;
}
.flowchart-box-sketch {
  border: 2px dashed #5c5348;
  border-radius: 3px;
  background: #fffefb;
  font-family: "Caveat", cursive;
  font-size: 1.2rem;
  font-weight: 600;
  color: #3d352a;
  padding: 8px 18px;
  transform: rotate(-0.3deg);
}
.flowchart-box-sketch:nth-child(3) {
  transform: rotate(0.2deg);
}
.flowchart-box-center.flowchart-box-sketch {
  border-style: solid;
  border-color: #3d352a;
  color: #fff;
  background: #4a5c3d;
  transform: rotate(0.4deg);
}
.flowchart-arrow-sketch {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  font-weight: 700;
  color: #5c5348;
  margin: 4px 0 8px;
}
.flowchart-sketch .flowchart-arrow-bidi {
  font-family: "Caveat", cursive;
  font-size: 1.6rem;
  color: #5c5348;
  margin: 4px 0 8px;
}

/* USSD phone mockups (ussd-interface.html) */
.ussd-mockup-section {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.ussd-phone-mockup {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
/* Smaller main menu phone under "1. Options you can access" + no gap before "2" */
#channel-panel-ussd .ussd-mockup-menu {
  margin-bottom: 0;
  /* Pull section 2 up: scale(0.58) leaves empty layout space; negative margin collapses it */
  margin-bottom: -165px;
}
#channel-panel-ussd .ussd-mockup-menu .ussd-phone-mockup {
  transform: scale(0.58);
  transform-origin: top center;
}
#channel-panel-ussd .ussd-step-two {
  margin-top: 0 !important;
  margin-bottom: 12px;
}
.ussd-phone-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 300px;
  padding: 16px 18px 0;
  border-radius: 26px;
  background: linear-gradient(180deg, #353a36 0%, #2c302d 50%, #242826 100%);
  box-shadow: 0 14px 36px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.ussd-phone-small .ussd-phone-frame {
  width: 200px;
  padding: 10px 12px 0;
  border-radius: 18px;
}
.ussd-phone-earpiece {
  width: 44px;
  height: 6px;
  margin-bottom: 10px;
  background: #1a1d1b;
  border-radius: 3px;
}
.ussd-phone-small .ussd-phone-earpiece {
  width: 28px;
  height: 4px;
  margin-bottom: 6px;
}
.ussd-phone-screen {
  width: 100%;
  height: 280px;
  min-height: 280px;
  background: #0a0e0a;
  border-radius: 6px;
  border: 1px solid #1c1c1e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.ussd-phone-small .ussd-phone-screen {
  height: 165px;
  min-height: 165px;
}
.ussd-screen-response .ussd-screen-content {
  padding: 12px 10px;
}
.ussd-screen-content {
  flex: 1;
  padding: 14px 12px;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #8bc34a;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ussd-phone-small .ussd-screen-content {
  padding: 10px 8px;
  font-size: 9px;
  gap: 2px;
}
.ussd-line {
  color: #9ccc65;
  word-break: break-word;
}
.ussd-line-title {
  font-weight: 700;
  color: #c5e1a5;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(139, 195, 74, 0.3);
}
.ussd-phone-small .ussd-line-title {
  margin-bottom: 3px;
  padding-bottom: 3px;
}
.ussd-line-prompt {
  margin-top: 6px;
  color: #7cb342;
  font-size: 11px;
}
.ussd-phone-small .ussd-line-prompt {
  margin-top: 3px;
  font-size: 8px;
}
.ussd-line-input {
  color: #aed581;
  font-style: italic;
}
.ussd-line-data {
  color: #dcedc8;
  font-weight: 600;
}
.ussd-line-meta {
  font-size: 10px;
  color: #689f38;
  margin-top: 6px;
}
.ussd-phone-small .ussd-line-meta {
  font-size: 6px;
}

/* USSD phone nav (soft keys + d-pad) */
.ussd-phone-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  width: 100%;
}
.ussd-phone-nav-small.ussd-phone-nav {
  gap: 8px;
  margin-top: 6px;
}
.ussd-nav-btn {
  width: 40px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(180deg, #424642 0%, #353a36 100%);
  border: 1px solid #282c29;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 0 #282c29, inset 0 1px 0 rgba(255,255,255,0.06);
}
.ussd-phone-nav-small .ussd-nav-btn {
  width: 26px;
  height: 18px;
  border-radius: 5px;
  font-size: 10px;
}
.ussd-nav-dpad {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, #424642 0%, #353a36 100%);
  border: 1px solid #282c29;
  box-shadow: 0 3px 0 #282c29, inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ussd-phone-nav-small .ussd-nav-dpad {
  width: 34px;
  height: 34px;
}
.ussd-dpad-center {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1;
}
.ussd-phone-nav-small .ussd-dpad-center {
  font-size: 8px;
}

/* USSD phone keypad */
.ussd-phone-keypad {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 220px;
  margin-top: 10px;
  padding: 0 4px;
}
.ussd-keypad-small.ussd-phone-keypad {
  max-width: 140px;
  gap: 4px;
  margin-top: 6px;
}
.ussd-keypad-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.ussd-keypad-small .ussd-keypad-row {
  gap: 5px;
}
.ussd-key {
  width: 58px;
  height: 34px;
  border-radius: 18px;
  background: linear-gradient(180deg, #424642 0%, #353a36 100%);
  border: 1px solid #282c29;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 #282c29, inset 0 1px 0 rgba(255,255,255,0.06);
}
.ussd-keypad-small .ussd-key {
  width: 36px;
  height: 22px;
  border-radius: 11px;
  font-size: 10px;
}

/* USSD phone call/end buttons */
.ussd-phone-nav-bottom {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 10px;
  width: 100%;
  padding-bottom: 4px;
}
.ussd-nav-bottom-small.ussd-phone-nav-bottom {
  gap: 18px;
  margin-top: 6px;
  padding-bottom: 2px;
}
.ussd-call-btn,
.ussd-end-btn {
  width: 36px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #424642 0%, #353a36 100%);
  border: 1px solid #282c29;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 #282c29, inset 0 1px 0 rgba(255,255,255,0.06);
}
.ussd-nav-bottom-small .ussd-call-btn,
.ussd-nav-bottom-small .ussd-end-btn {
  width: 24px;
  height: 20px;
  border-radius: 5px;
  font-size: 10px;
}

.ussd-phone-brand {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin: 8px 0 4px;
  font-style: italic;
}
.ussd-phone-small .ussd-phone-brand {
  display: none;
}

.ussd-flows-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.ussd-flow-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: min(900px, 100%);
  padding: 18px;
  background: var(--milk-white);
  border: 1px solid #e5e8e4;
  border-radius: 10px;
}
.ussd-flow-card h5 {
  font-size: 13px;
  font-weight: 700;
  color: #2d5016;
  margin: 0 0 14px 0;
  text-align: center;
}
.ussd-flow-phones {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 12px;
}
.ussd-flow-arrow {
  font-size: 1.2rem;
  color: #2d5016;
  font-weight: 700;
  flex-shrink: 0;
}
.ussd-response-section {
  margin-bottom: 24px;
}
.ussd-response-section.ussd-mockup-section {
  align-items: stretch;
}
/* Caption left of phone (wide); stacked on narrow */
.ussd-response-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .ussd-response-row {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 28px 36px;
  }
  .ussd-response-row .ussd-response-caption {
    flex: 1 1 200px;
    min-width: 0;
    max-width: 42ch;
    text-align: left;
    align-self: center;
  }
  .ussd-response-row .ussd-phone-mockup {
    flex-shrink: 0;
  }
}
.ussd-response-caption {
  font-size: 12px;
  color: #5a6b52;
  line-height: 1.5;
  margin: 0;
  max-width: 42ch;
  text-align: center;
}
/* Section 3: same compact phone as flow mockups (2); allow scroll if reply text is long */
#channel-panel-ussd .ussd-response-section .ussd-phone-small .ussd-screen-response .ussd-screen-content {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

@media (max-width: 600px) {
  .ussd-flow-phones {
    flex-direction: column;
  }
  .ussd-flow-arrow {
    transform: rotate(90deg);
  }
}

.scout-flow,
.empowerment-dimensions {
  margin-bottom: 20px;
}
.scout-flow h4,
.empowerment-dimensions h4 {
  font-size: 13px;
  font-weight: 700;
  color: #2d5016;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 12px;
}
.flow-steps {
  display: grid;
  gap: 14px;
}
.flow-step {
  padding: 16px 18px 16px 52px;
  background: var(--milk-white);
  border-radius: 10px;
  position: relative;
}
.flow-step-num {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 26px;
  height: 26px;
  background: #2d5016;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.flow-step h5 {
  font-size: 14px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 8px;
}
.flow-step p {
  font-size: 13px;
  color: #495057;
  line-height: 1.55;
  margin-bottom: 8px;
}
.flow-step p:last-child {
  margin-bottom: 0;
}
.flow-ref {
  font-size: 12px !important;
  color: #6c757d !important;
  font-style: italic;
}
.flow-ref a {
  color: #2d5016;
  font-weight: 600;
  text-decoration: none;
}
.empowerment-dimensions p {
  font-size: 13px;
  color: #495057;
  line-height: 1.5;
  margin-bottom: 8px;
}
.empowerment-dimensions p a {
  color: #2d5016;
  font-weight: 600;
  text-decoration: none;
}
.dimensions-viz {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 40px;
  margin-bottom: 24px;
}
.dimensions-pie-wrap {
  flex-shrink: 0;
  position: relative;
}
.pie-svg {
  width: 200px;
  height: 200px;
  transform: rotate(-90deg);
  display: block;
}
.pie-center-text {
  font-size: 11px;
  font-weight: 700;
  fill: #6b7280;
  font-family: inherit;
}
.dimensions-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  font-size: 13px;
  color: #374151;
}
.dimensions-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dim-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #2d5016;
  border-radius: 50%;
  flex-shrink: 0;
}
.dim-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.dimensions-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.dimensions-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--milk-white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 3px solid var(--dim-color, #2d5016);
  font-size: 13px;
  font-weight: 600;
  color: #212529;
}
.dimensions-strip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--dim-color, #2d5016);
  border-radius: 6px;
  flex-shrink: 0;
}
.dimensions-strip-label {
  white-space: nowrap;
}
.dimensions-list {
  font-size: 13px;
  color: #374151;
  line-height: 1.55;
  padding-left: 22px;
  margin: 0 0 12px 0;
  list-style: decimal;
}
.dimensions-list li {
  margin-bottom: 5px;
}
.dimensions-list li::marker {
  font-weight: 700;
  color: #2d5016;
}
.dimensions-intro {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  margin: 6px 0 8px 0;
}
.dimensions-list-heading {
  font-size: 12px;
  font-weight: 700;
  color: #2d5016;
  margin: 14px 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.empowerment-dimensions .social-comms-charts-grid {
  margin-bottom: 4px;
}
/* SCOUT page — tighter Process, charts, dimensions, mobile explainer */
.layer-section.layer-2 .scout-flow {
  margin-bottom: 18px;
}
.layer-section.layer-2 .scout-flow h4 {
  margin-bottom: 10px;
}
.layer-section.layer-2 .flow-steps {
  gap: 12px;
}
.layer-section.layer-2 .flow-step {
  padding: 14px 14px 14px 46px;
  border-radius: 8px;
}
.layer-section.layer-2 .flow-step-num {
  left: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  font-size: 12px;
  border-radius: 6px;
}
.layer-section.layer-2 .flow-step h5 {
  margin-bottom: 6px;
  font-size: 13px;
}
.layer-section.layer-2 .flow-step p {
  margin-bottom: 6px;
  line-height: 1.45;
}
.layer-section.layer-2 .empowerment-dimensions {
  margin-bottom: 18px;
}
.layer-section.layer-2 .empowerment-dimensions h4 {
  margin-bottom: 10px;
}
.layer-section.layer-2 .empowerment-dimensions p {
  margin-bottom: 8px;
}
.layer-section.layer-2 .social-comms-charts-grid {
  gap: 14px;
}
.layer-section.layer-2 .social-pie-card {
  padding: 12px 14px;
  border-radius: 10px;
}
.layer-section.layer-2 .social-pie-title {
  margin-bottom: 8px;
  font-size: 12px;
}
.layer-section.layer-2 .social-pie-viz {
  margin-bottom: 8px;
}
.layer-section.layer-2 .dimensions-list-heading {
  margin: 12px 0 6px 0;
}
.layer-section.layer-2 .dimensions-intro {
  margin: 6px 0 8px 0;
}
.layer-section.layer-2 .dimensions-list {
  margin: 0 0 10px 0;
  padding-left: 20px;
}
.layer-section.layer-2 .dimensions-list li {
  margin-bottom: 4px;
}
.layer-section.layer-2 .sdg-badges {
  margin-top: 10px;
  gap: 10px;
}
.layer-section.layer-2 .sdg-badge {
  padding: 8px 12px;
  min-width: 88px;
  font-size: 13px;
}
.scout-flow-mobile {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--milk-white);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}
.scout-flow-mobile h4 {
  font-size: 13px;
  font-weight: 700;
  color: #2d5016;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.scout-flow-mobile p {
  font-size: 13px;
  color: #374151;
  line-height: 1.55;
  margin: 0 0 8px 0;
}
.scout-flow-mobile p:last-child {
  margin-bottom: 0;
}
@media print {
  header .nav-wrap,
  header .header-actions,
  .hamburger,
  .btn-export,
  .header-export-wrap {
    display: none !important;
  }
  .map-and-panel {
    break-inside: avoid;
  }
  #map {
    min-height: 400px;
  }
}
@media (max-width: 768px) {
  .scout-flow-mobile {
    display: block;
  }
  .dimensions-viz {
    flex-direction: column;
    gap: 20px;
  }
  .pie-svg {
    width: 180px;
    height: 180px;
  }
  .dimensions-legend {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .dimensions-strip {
    gap: 8px 10px;
    padding: 12px;
  }
  .dimensions-strip-item {
    padding: 6px 12px;
    font-size: 12px;
  }
  .dimensions-strip-num {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  .compare-filter-controls {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 20px;
  }
  .compare-filter-controls--single .compare-filter-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .compare-filter-controls--single .compare-select {
    max-width: none;
    width: 100%;
  }
  .compare-filter-vs {
    align-self: center;
    padding: 4px 0;
  }
  .compare-select {
    min-width: 0;
    width: 100%;
  }
  .compare-filter-result {
    padding: 20px 20px 24px;
  }
  .compare-filter-result-body.comparison-view {
    grid-template-columns: 1fr;
  }
  .compare-filter-result-body.comparison-view .comparison-col:first-child {
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px 10px 0 0;
  }
  .compare-filter-result-body.comparison-view .comparison-col:last-child {
    border-radius: 0 0 10px 10px;
  }
  .compare-filter-table th,
  .compare-filter-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
  .compare-filter-table tbody th {
    width: 32%;
  }
}
.sdg-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.sdg-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sdg-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #fff;
}
.sdg-badge-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.95;
  margin-top: 2px;
}
.sdg-badge.sdg-5 {
  background: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
}
.sdg-badge.sdg-10 {
  background: linear-gradient(135deg, #dd1367 0%, #b01052 100%);
}

.sms-demo {
  margin: 10px 0;
  padding: 12px;
  background: var(--milk-white);
  color: #212529;
  font-size: 12px;
  border-radius: 4px;
}
.sms-demo code {
  color: #212529;
}
.sms-reply {
  margin-top: 8px;
  padding-top: 8px;
  font-size: 11px;
  color: #6c757d;
}
.loop-warning {
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
  margin-top: 12px;
  margin-bottom: 0;
}

.loop-section {
  margin-bottom: 40px;
  padding: 24px;
  background: var(--milk-white);
}
.loop-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 16px;
}
.loop-section .loop-intro + .loop-steps {
  margin-top: 8px;
}
.loop-steps {
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
  padding-left: 22px;
  margin-bottom: 12px;
}
.loop-steps li {
  margin-bottom: 6px;
}
.loop-teeth {
  font-size: 13px;
  font-weight: 700;
  color: #2d5016;
  margin: 0;
}

.dashboard-top-section {
  margin-bottom: 28px;
  padding: 24px 0 0;
}
.dashboard-top-heading {
  margin: 0 0 6px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d5016;
}
.dashboard-interface-label {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #5a6c5a;
  font-style: italic;
}
.dashboard-top-lead {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.55;
  max-width: min(52rem, 100%);
}
.dashboard-top-subheading {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: #212529;
  line-height: 1.45;
}

.layer-3-intro {
  margin-bottom: 20px;
}
.project-selector-wrap {
  margin-top: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

/* Dashboard top: project scope — quiet inline control (matches subheading / stats, not a “card”) */
.dashboard-top-section .project-selector-wrap {
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  gap: 10px 14px;
  align-items: center;
}
.dashboard-top-section .project-selector-label {
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #495057;
  flex-shrink: 0;
}
.dashboard-top-section .project-selector {
  flex: 1 1 260px;
  max-width: min(520px, 100%);
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #212529;
  min-height: 36px;
}

.project-selector-label {
  font-size: 13px;
  font-weight: 600;
  color: #212529;
}
.project-selector {
  padding: 8px 14px;
  font-size: 14px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: var(--milk-white);
  color: #212529;
  min-width: 0;
  flex: 1 1 260px;
  max-width: 100%;
}
.stat-info {
  margin-left: 4px;
  padding: 0;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 11px;
  border-radius: 50%;
  cursor: help;
  line-height: 1;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
.stat-card:not(.primary) .stat-info {
  background: transparent;
  color: #2d5016;
}
.stat-card.primary .stat-info {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
}
.stat-info:hover,
.stat-info:focus {
  outline: none;
  transform: scale(1.1);
}
.stat-tooltip {
  position: fixed;
  z-index: 10001;
  max-width: 280px;
  width: max-content;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #212529;
  background: #fff;
  border: 1px solid rgba(45,80,22,0.25);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  outline: none;
  pointer-events: auto;
}
.stat-tooltip[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.map-intro-note {
  padding: 14px 20px;
  background: var(--milk-white);
  font-size: 12px;
  color: #212529;
  margin-bottom: 16px;
  border-radius: 8px;
}
.map-intro-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2d5016;
}
.map-intro-note p {
  margin: 0;
  line-height: 1.5;
}

.map-instructions {
  padding: 14px 20px;
  background: var(--milk-white);
  font-size: 12px;
  color: #212529;
  margin-bottom: 16px;
  border-radius: 8px;
}
.map-instructions strong {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2d5016;
}
.map-instructions-why {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #495057;
  line-height: 1.5;
}
.map-instructions ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.55;
}
.map-instructions li {
  margin-bottom: 6px;
}
.map-instructions li:last-child {
  margin-bottom: 0;
}
.map-disclaimer {
  background: var(--milk-white);
}
.dashboard-export-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.btn-dashboard-export {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #2d5016;
  background: #fff;
  border: 1px solid #2d5016;
  border-radius: 8px;
  cursor: pointer;
}
.btn-dashboard-export:hover {
  background: #2d5016;
  color: #fff;
}
.conservancy-detail-body.comparison-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.conservancy-detail-body.comparison-view .comparison-col {
  padding: 12px;
  background: var(--milk-white);
  border-radius: 8px;
  border: 1px solid #eee;
}
.conservancy-detail-body.comparison-view .comparison-col h5 {
  font-size: 14px;
  margin: 0 0 12px 0;
  color: #212529;
}
.conservancy-detail-body.comparison-view .comparison-col p {
  margin: 0 0 8px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}
.conservancy-detail-body.comparison-view .comparison-col p:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.provenance-note {
  display: inline-block;
  padding: 8px 14px;
  background: #d4edda;
  color: #155724;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #c3e6cb;
  margin-top: 12px;
}

.dashboard-content {
  margin-top: 0;
}

.container {
  width: 100%;
  max-width: var(--page-band-max);
  margin: 0 auto;
  min-width: 0;
  padding: 24px 24px 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--milk-white);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border: 1px solid #2d5016;
  border-radius: 8px;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #2d5016;
  transition: all 0.2s;
  border-radius: 8px 0 0 8px;
}

.stat-card.primary {
  background: #2d5016;
  color: #ffffff;
  border: 1px solid #1a3a0f;
}

.stat-card.primary::before {
  background: rgba(255,255,255,0.3);
}
.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  opacity: 0.8;
}

.stat-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-unit {
  font-size: 11px;
  opacity: 0.7;
}

.stats-data-source {
  font-size: 11px;
  color: #212529;
  margin: -8px 0 20px 0;
  padding: 0 4px;
  max-width: var(--content-max);
}
.stats-data-source a {
  color: #2d5016;
  font-weight: 600;
}

.map-section {
  background: var(--milk-white);
  margin-bottom: 24px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
}

.map-disclaimer {
  padding: 14px 20px;
  background: var(--milk-white);
  font-size: 12px;
  color: #212529;
}
/* Only the section title is block; inline <strong> in the paragraph stays in the sentence flow */
.map-disclaimer > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2d5016;
}
.map-disclaimer p strong {
  display: inline;
  font-weight: 700;
  font-size: inherit;
  text-transform: none;
  letter-spacing: normal;
  color: inherit;
}
.map-disclaimer p {
  margin: 0;
  line-height: 1.5;
  color: #212529;
}
.map-disclaimer a {
  color: #2d5016;
  text-decoration: underline;
}
.map-disclaimer a:hover {
  color: #1a3a0f;
}

.project-summary-block {
  padding: 14px 20px;
  background: var(--milk-white);
  margin-top: 18px;
  border: 1px solid #eceff1;
  border-radius: 10px;
}
.project-summary-block .map-header {
  padding: 0 0 8px 0;
  border-bottom: none;
  background: transparent;
}
.project-summary-block .map-title {
  font-size: 14px;
}
.project-summary-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #212529;
}
.project-summary-text a {
  color: #212529;
  text-decoration: underline;
}
.project-summary-text a:hover {
  color: #2d5016;
}

.verification-cycles-block {
  padding: 14px 20px;
  background: var(--milk-white);
  margin-top: 18px;
  border: 1px solid #eceff1;
  border-radius: 10px;
}
.verification-cycles-block .map-header {
  padding: 0 0 10px 0;
  border-bottom: none;
  background: transparent;
}
.verification-cycles-block .map-title {
  font-size: 14px;
}
.verification-cycles-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  margin-top: 8px;
  border: 1px solid #eef1f3;
  border-radius: 8px;
  overflow: hidden;
}
.verification-cycles-table th,
.verification-cycles-table td {
  padding: 10px 12px;
  text-align: left;
  border: none;
  line-height: 1.45;
}
.verification-cycles-table thead th {
  border-bottom: 1px solid #e9ecef;
}
.verification-cycles-table tbody tr + tr td {
  border-top: 1px solid #e9ecef;
}
.verification-cycles-table th {
  background: var(--milk-white);
  font-weight: 700;
  color: #212529;
}
.verification-cycles-table td {
  font-weight: 400;
  color: #343a40;
}
.verification-cycles-table a {
  color: #212529;
  text-decoration: underline;
}
.verification-cycles-table a:hover {
  color: #2d5016;
}
.verification-cycles-totals {
  margin: 14px 0 0 0;
  font-size: 13px;
  color: #495057;
  line-height: 1.5;
}
.verification-cycles-totals a {
  color: #212529;
  text-decoration: underline;
}
.verification-cycles-totals a:hover {
  color: #2d5016;
}

.map-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background: var(--milk-white);
}

.map-title {
  font-size: 16px;
  font-weight: 700;
  color: #212529;
}

.map-subtitle {
  font-size: 11px;
  color: #6c757d;
  margin-top: 3px;
}

#map {
  width: 100%;
  height: 500px;
}
#map path.leaflet-interactive:focus,
#map path.leaflet-interactive:focus-visible {
  outline: none;
  box-shadow: none;
}

.legend {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--milk-white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 12px 14px;
  z-index: 1000;
  box-shadow: none;
}

.legend-title {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
}

.legend-color {
  width: 14px;
  height: 14px;
  border: 1px solid #ccc;
}

.legend-color.legend-boundary {
  background: #166534;
  border-color: #14532d;
}
.legend-color.legend-conservancy {
  background: #22c55e;
  border-color: #15803d;
}
.legend-color.legend-komaza {
  background: #06b6d4;
  border-color: #0e7490;
}
.legend-color.legend-boomitra {
  background: #f59e0b;
  border-color: #b45309;
}
.legend-color.legend-kcsa {
  background: #8b5cf6;
  border-color: #6d28d9;
}

/* Compare & filter – revamped */
.compare-filter-section {
  margin-top: 28px;
  background: var(--milk-white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eceff1;
  min-width: 0;
}
.compare-filter-header {
  padding: 18px 24px 16px;
}
.compare-filter-title {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: #2d5016;
  letter-spacing: 0.02em;
}
.compare-filter-desc {
  margin: 0;
  font-size: 12px;
  color: #495057;
  line-height: 1.5;
}
.compare-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 24px 24px;
  min-width: 0;
}

/* One dropdown only: horizontal row, visually secondary to section title */
.compare-filter-controls--single {
  align-items: center;
  padding: 8px 20px 12px;
  gap: 10px 16px;
  background: transparent;
  border-top: 1px solid #eceff1;
}
.compare-filter-controls--single .compare-filter-group {
  flex: 0 1 auto;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  width: auto;
  max-width: 100%;
}
.compare-filter-controls--single .compare-filter-group label {
  margin: 0;
  line-height: 1.3;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #495057;
}
.compare-filter-controls--single .compare-select {
  flex: 1 1 280px;
  min-width: min(260px, 100%);
  max-width: min(560px, 100%);
  padding: 6px 12px;
  font-size: 13px;
  min-height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
.compare-filter-controls--single .compare-select:hover {
  border-color: #c4c9d1;
}
.compare-filter-controls--single .compare-select:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.compare-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 200px;
  max-width: 100%;
}
.compare-filter-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2d5016;
}
.compare-select {
  min-width: 0;
  flex: 1 1 240px;
  max-width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  background: var(--milk-white);
  color: #212529;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.compare-select:hover {
  border-color: rgba(0,0,0,0.12);
}
.compare-select:focus {
  outline: none;
  border-color: rgba(45,80,22,0.4);
  box-shadow: 0 0 0 2px rgba(45,80,22,0.1);
}
.compare-filter-vs {
  align-self: center;
  padding: 0 4px 6px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(45,80,22,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.btn-compare-clear {
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  color: #2d5016;
  background: var(--milk-white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-compare-clear:hover {
  background: #2d5016;
  color: #fafafa;
  border-color: #2d5016;
}

.compare-filter-result {
  margin: 0;
  padding: 24px 24px 28px;
  background: var(--milk-white);
}
.compare-filter-result[hidden] {
  display: none;
}
.compare-filter-result-title {
  margin: 0 0 18px 0;
  font-size: 14px;
  font-weight: 700;
  color: #2d5016;
  letter-spacing: 0.02em;
}
.compare-filter-result-body.comparison-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.compare-filter-result-body.comparison-view .comparison-col {
  padding: 18px 20px;
  background: var(--milk-white);
  border-radius: 0;
}
.compare-filter-result-body.comparison-view .comparison-col:first-child {
  border-right: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px 0 0 10px;
}
.compare-filter-result-body.comparison-view .comparison-col:last-child {
  border-radius: 0 10px 10px 0;
}
.compare-filter-result-body.comparison-view .comparison-col h5 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  color: #2d5016;
}
.compare-filter-result-body.comparison-view .comparison-col p {
  margin: 0 0 10px 0;
  padding-bottom: 10px;
  font-size: 13px;
  color: #212529;
  line-height: 1.5;
}
.compare-filter-result-body.comparison-view .comparison-col p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.compare-filter-table-wrap {
  overflow-x: visible;
  max-width: 100%;
  min-width: 0;
}
.compare-filter-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none;
}
.compare-filter-table th,
.compare-filter-table td {
  padding: 10px 14px;
  text-align: left;
  border: none;
  vertical-align: top;
}
.compare-filter-table thead th {
  font-weight: 700;
  color: #2d5016;
  background: var(--milk-white);
  border-bottom: 1px solid #e9ecef;
}
.compare-filter-table tbody tr + tr th,
.compare-filter-table tbody tr + tr td {
  border-top: 1px solid #e9ecef;
}
.compare-filter-table tbody th {
  font-weight: 600;
  color: #374151;
  width: 28%;
}
.compare-filter-table tbody td {
  color: #212529;
}
.compare-filter-table tbody tr:hover th,
.compare-filter-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.03);
}

.kenya-projects-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 16px;
  padding: 20px;
  background: var(--milk-white);
  margin-bottom: 0;
}
.kenya-projects-overview .project-overview-card {
  padding: 16px;
  background: var(--milk-white);
  border: 1px solid #eee;
  border-radius: 10px;
}
.kenya-projects-overview .project-overview-card .project-overview-name {
  font-size: 14px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 4px;
}
.kenya-projects-overview .project-overview-card .project-overview-meta {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 6px;
}
.kenya-projects-overview .project-overview-card .project-overview-area {
  font-size: 11px;
  color: #495057;
}
.kenya-projects-overview .project-overview-card a {
  font-size: 11px;
  font-weight: 600;
  color: #2d5016;
  text-decoration: underline;
  margin-top: 8px;
  display: inline-block;
}
.kenya-projects-overview .project-overview-card.project-selected {
  border-color: #2d5016;
  box-shadow: 0 0 0 2px rgba(45,80,22,0.2);
}

.map-and-panel {
  display: flex;
  gap: 0;
  min-height: 520px;
  min-width: 0;
  max-width: 100%;
}

.map-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  overflow: hidden;
  background: var(--milk-white);
}

#map {
  height: 100%;
  min-height: 500px;
  background: #e8f4e8;
}

.conservancy-detail-panel {
  width: 0;
  overflow: hidden;
  background: var(--milk-white);
  border-left: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
}

.conservancy-detail-panel.conservancy-detail-panel-visible {
  width: 380px;
  min-width: 380px;
  overflow: visible;
}

.conservancy-detail-panel .conservancy-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--milk-white);
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.conservancy-detail-name {
  font-size: 18px;
  font-weight: 700;
  color: #212529;
  margin: 0;
  line-height: 1.3;
}

.conservancy-detail-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: #f5f5f5;
  color: #495057;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}

.conservancy-detail-close:hover {
  background: #dee2e6;
  color: #212529;
}

.conservancy-detail-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  font-size: 13px;
  color: #212529;
  line-height: 1.5;
}

.conservancy-detail-body p {
  margin: 0 0 12px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.conservancy-detail-body p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.conservancy-detail-body ul.conservancy-cycles {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #374151;
}
.conservancy-detail-body ul.conservancy-cycles li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}
.conservancy-detail-body ul.conservancy-cycles li:last-child {
  border-bottom: none;
}
.conservancy-detail-body strong {
  display: inline-block;
  min-width: 7em;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  font-weight: 600;
}

.conservancy-detail-placeholder {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
  line-height: 1.5;
}

.conservancy-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.conservancy-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.conservancy-detail-item.full-width {
  grid-column: 1 / -1;
}

.conservancy-detail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6c757d;
}

.conservancy-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
}

.conservancy-detail-value.conservancy-detail-highlight {
  color: #2d5016;
  font-size: 16px;
}
.conservancy-detail-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2d5016;
  text-decoration: underline;
}
.conservancy-detail-link:hover {
  color: #1a3a0f;
}

.conservancy-spending {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.conservancy-spending h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #2d5016;
  margin: 0 0 10px 0;
}

.conservancy-spending-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.conservancy-spending-table th,
.conservancy-spending-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.conservancy-spending-table th {
  font-weight: 700;
  color: #495057;
  background: var(--milk-white);
}

.conservancy-spending-table .conservancy-amount {
  font-weight: 600;
  color: #2d5016;
  white-space: nowrap;
}

.conservancy-cycles-detail {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.conservancy-cycles-detail h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #2d5016;
  margin: 0 0 10px 0;
}

.conservancy-cycles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.conservancy-cycles-table th,
.conservancy-cycles-table td {
  padding: 6px 8px;
  text-align: left;
  border: 1px solid #eee;
  vertical-align: top;
}

.conservancy-cycles-table th {
  font-weight: 700;
  color: #495057;
  background: var(--milk-white);
}

.conservancy-marker {
  background: none !important;
  border: none !important;
}

.conservancy-marker-dot {
  display: block;
  width: 20px;
  height: 20px;
  background: #22c55e;
  border: 2px solid #15803d;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}

.conservancy-marker-dot:hover {
  background: #16a34a;
  transform: scale(1.15);
}

.other-project-marker { background: none; border: none; }
.other-project-marker-dot {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
/* Match legend: Komaza, Boomitra, KCSA */
.other-project-marker-dot.komaza-dot {
  background: #06b6d4;
  border-color: #0e7490;
}
.other-project-marker-dot.boomitra-dot {
  background: #f59e0b;
  border-color: #b45309;
}
.other-project-marker-dot.kcsa-dot {
  background: #8b5cf6;
  border-color: #6d28d9;
}
/* Fallback when project type unknown */
.other-project-marker-dot:not(.komaza-dot):not(.boomitra-dot):not(.kcsa-dot) {
  background: #6b7280;
  border-color: #4b5563;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 22px;
  /* One row of cards shares the same height (tallest content); cards fill the row */
  align-items: stretch;
}

.data-card {
  background: var(--milk-white);
  padding: 14px 16px;
  border: 1px solid #eee;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-sizing: border-box;
}
/* Absorb extra row height at the bottom so metrics stay top-aligned */
.data-card::after {
  content: '';
  flex: 1 1 auto;
  min-height: 0;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.data-grid .card-header {
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.card-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.card-title {
  font-size: 14px;
  font-weight: 650;
  color: #212529;
}

.card-subtitle {
  font-size: 10px;
  color: #6c757d;
  margin-top: 2px;
  font-weight: 500;
}

.card-source {
  font-size: 10px;
  color: #6c757d;
  margin-top: 6px;
  font-style: normal;
  font-weight: 400;
}
.data-grid .card-source {
  margin-top: 4px;
  line-height: 1.45;
}
.card-source strong {
  color: #495057;
}

.data-source-inline {
  font-size: 11px;
  color: #6c757d;
  margin-top: 10px;
  margin-bottom: 0;
}

.metric-box {
  padding: 6px 0;
  margin-bottom: 4px;
  background: var(--milk-white);
  cursor: pointer;
  transition: all 0.15s;
}

.metric-label {
  font-size: 9px;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.metric-value {
  font-size: 20px;
  font-weight: 650;
  color: #212529;
  line-height: 1.2;
}
.metric-sub {
  font-size: 9px;
  color: #6c757d;
  margin-top: 2px;
}
/* Tighter handoff from summary metrics to grievance category list */
.data-card .metric-box:has(+ .feedback-list) {
  margin-bottom: 2px;
}

.feedback-list {
  margin-top: 4px;
}
.feedback-list .feedback-item {
  margin-bottom: 6px;
}
.feedback-list .feedback-item:last-child {
  margin-bottom: 0;
}

.progress-bar {
  height: 4px;
  background: #f5f5f5;
  margin-top: 6px;
}

.progress-fill {
  height: 100%;
  background: #2d5016;
}

.feedback-item {
  padding: 8px 10px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  background: var(--milk-white);
  cursor: pointer;
  transition: all 0.15s;
}

.feedback-text {
  font-size: 12px;
  font-weight: 600;
  color: #212529;
}

.feedback-date {
  font-size: 9px;
  color: #6c757d;
  margin-top: 3px;
}

/* Social CoMMs pie charts */
.social-comms-charts-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.social-comms-charts-heading {
  font-size: 16px;
  font-weight: 700;
  color: #2d5016;
  margin: 0 0 6px 0;
}
.social-comms-charts-desc {
  font-size: 12px;
  color: #6c757d;
  margin: 0 0 20px 0;
}
.social-comms-charts-desc code {
  font-size: 11px;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
}
.social-comms-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 14px;
}
.social-pie-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.social-pie-title {
  font-size: 12px;
  font-weight: 700;
  color: #212529;
  margin: 0 0 8px 0;
}
.social-pie-viz {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.social-pie-svg {
  width: 160px;
  height: 160px;
  display: block;
}
.social-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.social-pie-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #374151;
}
.social-pie-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}
.social-pie-label {
  flex: 1;
}
.social-pie-pct {
  font-weight: 600;
  color: #2d5016;
}
.social-comms-charts-missing {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
  grid-column: 1 / -1;
}
.social-comms-charts-missing code {
  font-size: 11px;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.status-tag {
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.status-resolved {
  background: #d4edda;
  color: #155724;
}

.status-review {
  background: #fff3cd;
  color: #856404;
}

.status-open {
  background: #d1ecf1;
  color: #0c5460;
}
.projects-section {
  background: var(--milk-white);
  padding: 20px;
  margin-top: 28px;
  margin-bottom: 28px;
  border: 1px solid #eceff1;
  border-radius: 10px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* Community benefits: four categories share one row on typical dashboard widths */
#community-benefits-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}
#community-benefits-grid .project-card {
  min-width: 0;
}
@media (max-width: 1024px) {
  #community-benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  #community-benefits-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  padding: 20px;
  background: var(--milk-white);
  cursor: pointer;
  transition: all 0.2s;
}

.project-title {
  font-size: 13px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 10px;
}

.project-amount {
  font-size: 28px;
  font-weight: 700;
  color: #2d5016;
  margin-bottom: 6px;
}

.project-detail {
  font-size: 11px;
  color: #6c757d;
}

/* Buyers block — same layout + table format as Compare & filter */
.buyers-compare-section {
  margin-top: 20px;
}
.buyers-compare-result {
  padding-top: 8px;
}
.buyers-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.buyers-stat-card {
  background: var(--milk-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
}
.buyers-stat-card .metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  font-weight: 600;
}
.buyers-stat-card .metric-value {
  font-size: 22px;
  line-height: 1.2;
  color: #212529;
  font-weight: 700;
}
.buyers-compare-grid {
  display: grid;
  /* Narrower “top buyers” (3 cols); wider “recent transactions” (4 cols + long project names) */
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: 24px;
  align-items: start;
  min-width: 0;
}
.buyers-compare-col {
  min-width: 0;
}
.buyers-compare-col .compare-filter-result-title {
  margin: 0 0 12px 0;
}
.buyers-compare-col .compare-filter-table-wrap {
  max-height: 360px;
  overflow: auto;
}
/* Top-buyers table: first column is tbody th — don’t force compare’s 28% metric width */
.buyers-compare-col .compare-filter-table tbody th {
  width: auto;
}

/* Buyer tables: fixed columns, tighter padding, numeric alignment */
.buyers-compare-col .compare-filter-table {
  table-layout: fixed;
}
.buyers-compare-col .compare-filter-table th,
.buyers-compare-col .compare-filter-table td {
  padding: 8px 10px;
  vertical-align: top;
}
/* Top buyers: Buyer | VCUs | Txns */
.buyers-compare-col:nth-child(1) .compare-filter-table thead th:nth-child(1) { width: 50%; }
.buyers-compare-col:nth-child(1) .compare-filter-table thead th:nth-child(2),
.buyers-compare-col:nth-child(1) .compare-filter-table thead th:nth-child(3) {
  width: 25%;
  text-align: right;
}
.buyers-compare-col:nth-child(1) .compare-filter-table tbody th {
  width: 50%;
  word-break: break-word;
}
.buyers-compare-col:nth-child(1) .compare-filter-table tbody td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Recent transactions: Date | Buyer | Project | VCUs — fixed mins so % widths don’t crush date/buyer */
.buyers-compare-col:nth-child(2) .compare-filter-table thead th:nth-child(1) {
  width: 9.5rem;
  min-width: 9.5rem;
  max-width: 9.5rem;
  box-sizing: border-box;
}
.buyers-compare-col:nth-child(2) .compare-filter-table thead th:nth-child(2) {
  width: 13rem;
  min-width: 11rem;
  box-sizing: border-box;
}
.buyers-compare-col:nth-child(2) .compare-filter-table thead th:nth-child(3) {
  width: auto;
  min-width: 0;
}
.buyers-compare-col:nth-child(2) .compare-filter-table thead th:nth-child(4) {
  width: 5.75rem;
  min-width: 5.25rem;
  box-sizing: border-box;
  text-align: right;
}
.buyers-compare-col:nth-child(2) .compare-filter-table td:nth-child(1) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 9.5rem;
  min-width: 9.5rem;
  max-width: 9.5rem;
  box-sizing: border-box;
}
.buyers-compare-col:nth-child(2) .compare-filter-table td:nth-child(2) {
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 11rem;
}
.buyers-compare-col:nth-child(2) .compare-filter-table td:nth-child(3) {
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  font-size: 12px;
  color: #374151;
  min-width: 0;
}
.buyers-compare-col:nth-child(2) .compare-filter-table td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 5.75rem;
  min-width: 5.25rem;
  box-sizing: border-box;
}

/* Accessibility and comfort improvements */
.project-selector,
.compare-select,
.btn-compare-clear,
.btn-export,
.conservancy-detail-close {
  min-height: 40px;
}
.dashboard-top-section .project-selector,
.compare-filter-controls--single .compare-select {
  min-height: 36px;
}
.project-selector:focus-visible,
.compare-select:focus-visible,
.btn-compare-clear:focus-visible,
.btn-export:focus-visible,
.conservancy-detail-close:focus-visible {
  outline: 3px solid rgba(45, 80, 22, 0.28);
  outline-offset: 2px;
}
.dashboard-top-section .project-selector:focus-visible,
.compare-filter-controls--single .compare-select:focus-visible {
  outline: 2px solid rgba(100, 116, 139, 0.45);
  outline-offset: 1px;
}
/* Stat tooltips: keep compact circle; no min-height stretch (avoids pill “shadow”) */
.stat-info:focus-visible {
  outline: 2px solid rgba(45, 80, 22, 0.35);
  outline-offset: 2px;
}
.stat-card.primary .stat-info:focus-visible {
  outline-color: rgba(255, 255, 255, 0.55);
}
.project-summary-text,
.map-disclaimer p,
.compare-filter-desc,
.card-source {
  line-height: 1.6;
}

footer {
  background: #fff;
  margin-top: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  overflow: visible;
  padding: 0;
}
.footer-inner {
  width: 100%;
  max-width: var(--page-band-max);
  margin: 0 auto;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  min-width: 0;
}
.footer-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 36px;
  padding: 0;
  margin: 0;
}
.footer-logo-partner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 8px 12px;
  flex-shrink: 0;
  min-height: 52px;
  overflow: visible;
}
.footer-logo-partner img {
  display: block;
  max-height: 52px;
  height: auto;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: center;
}
.footer-logo-partner-aiid img {
  max-height: 48px;
  max-width: 200px;
}
.footer-logo-partner-cals img {
  max-height: 40px;
  max-width: 200px;
}
.footer-logo-partner.footer-partner-text {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  line-height: 1.25;
  text-decoration: none;
  min-height: auto;
  padding: 10px 14px;
}
a.footer-logo-partner.footer-partner-text:hover {
  color: #2d5016;
}
.footer-text {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.55;
  max-width: min(920px, 100%);
  margin: 0;
}
.footer-text-ack {
  margin-top: 8px;
  font-size: 11px;
  color: #5b6570;
}
@media (min-width: 640px) {
  .footer-inner {
    flex-direction: column;
    padding: 28px 24px 24px;
    gap: 18px;
  }
  .footer-partners {
    gap: 24px 48px;
  }
  .footer-logo-partner {
    padding: 8px 16px;
    min-height: 56px;
  }
  .footer-logo-partner img {
    max-height: 56px;
    max-width: 240px;
  }
  .footer-logo-partner-aiid img {
    max-height: 52px;
    max-width: 220px;
  }
  .footer-logo-partner-cals img {
    max-height: 44px;
    max-width: 220px;
  }
}

.sources-block {
  margin-bottom: 28px;
}
.sources-block h4 {
  font-size: 13px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 12px;
}
.sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sources-list li {
  font-size: 13px;
  color: #495057;
  line-height: 1.6;
  margin-bottom: 10px;
  padding-left: 0;
}
.sources-list a {
  color: #212529;
  font-weight: 600;
  text-decoration: underline;
}
.sources-list a:hover {
  color: #2d5016;
}

/* Sources page revamp */
.sources-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px 24px 22px;
}
.sources-hero {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(45, 80, 22, 0.15);
}
.sources-hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d5016;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}
.sources-hero-desc {
  font-size: 1rem;
  line-height: 1.55;
  color: #495057;
  margin: 0 0 24px 0;
  max-width: var(--prose-max);
}
.sources-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.sources-nav a {
  font-size: 13px;
  font-weight: 600;
  color: #2d5016;
  text-decoration: none;
  padding: 6px 12px;
  background: rgba(45, 80, 22, 0.08);
  border-radius: 6px;
}
.sources-nav a:hover {
  background: rgba(45, 80, 22, 0.15);
  color: #1e3a0f;
}
.sources-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sources-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.sources-card-highlight {
  border-color: rgba(45, 80, 22, 0.25);
  background: rgba(45, 80, 22, 0.03);
}
.sources-card-head {
  margin-bottom: 14px;
}
.sources-card-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2d5016;
  background: rgba(45, 80, 22, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.sources-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
  line-height: 1.35;
}
.sources-card-lead {
  font-size: 14px;
  line-height: 1.55;
  color: #495057;
  margin: 0 0 12px 0;
}
.sources-card-text {
  font-size: 14px;
  line-height: 1.55;
  color: #495057;
  margin: 0 0 16px 0;
}
.sources-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sources-link-list li {
  margin: 0;
  padding: 0;
}
.sources-link {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  color: #212529;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sources-link:hover {
  background: var(--milk-white);
  border-color: rgba(45, 80, 22, 0.15);
}
.sources-link-text {
  font-weight: 600;
  font-size: 14px;
  width: 100%;
}
.sources-link-desc {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.5;
  width: 100%;
}
.sources-link {
  position: relative;
  padding-right: 36px;
}
.sources-link-icon {
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 12px;
  opacity: 0.6;
}
.sources-note {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--milk-white);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.sources-note .sources-link-text {
  font-weight: 600;
  font-size: 14px;
}
.sources-note .sources-link-desc {
  font-size: 13px;
  color: #6c757d;
  margin-top: 4px;
}
.sources-dl {
  margin: 0 0 20px 0;
  font-size: 13px;
  line-height: 1.55;
  color: #495057;
}
.sources-dl dt {
  font-weight: 700;
  color: #212529;
  margin-top: 14px;
  margin-bottom: 4px;
}
.sources-dl dt:first-child {
  margin-top: 0;
}
.sources-dl dd {
  margin: 0;
}
.sources-cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #2d5016;
  text-decoration: none;
  padding: 10px 16px;
  background: rgba(45, 80, 22, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(45, 80, 22, 0.2);
}
.sources-cta:hover {
  background: rgba(45, 80, 22, 0.18);
}
.sources-fact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sources-fact-list li {
  font-size: 14px;
  line-height: 1.6;
  color: #495057;
  margin-bottom: 14px;
  padding-left: 0;
}
.sources-fact-list li:last-child {
  margin-bottom: 0;
}
.sources-fact-list a {
  color: #2d5016;
  font-weight: 600;
  text-decoration: none;
}
.sources-fact-list a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .sources-main {
    padding: 20px 16px 40px;
  }
  .sources-hero-title {
    font-size: 1.5rem;
  }
  .sources-card {
    padding: 18px 18px;
  }
  .sources-card-title {
    font-size: 1rem;
  }
}

/* Tool card: shared container for SMS and SCOUT tools */
.tool-card {
  margin-bottom: 40px;
  background: var(--milk-white);
  border-radius: 16px;
  overflow: hidden;
}
.tool-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 20px 24px;
  background: var(--milk-white);
  min-width: 0;
}
.tool-card .tool-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
  letter-spacing: -0.02em;
}
.lang-buttons {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px;
  background: var(--milk-white);
}
.lang-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-btn.active {
  background: #2d5016;
  color: #fff;
}
.tool-intro {
  font-size: 14px;
  color: #495057;
  line-height: 1.55;
  margin: 0 24px 24px;
  max-width: calc(100% - 48px);
}
.tool-card-phone .tool-intro {
  margin-bottom: 8px;
}
.phone-device-toggle {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px;
  background: #eee;
  margin: 0 24px 16px;
  gap: 2px;
}
.device-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.device-btn:hover {
  color: #212529;
}
.device-btn.active {
  background: #2d5016;
  color: #fff;
}
.tool-card-phone .phone-mockup {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  background: var(--milk-white);
  margin: 0 24px 24px;
  border-radius: 12px;
  border: 1px solid #eee;
  position: relative;
  min-height: 520px;
  /* Clip device drop-shadows so they don’t bleed onto the page below this panel */
  overflow: hidden;
}
.phone-view {
  display: none;
  justify-content: center;
  width: 100%;
}
.phone-view.active {
  display: flex;
}
.phone-mockup {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}
.phone-frame {
  width: 280px;
  min-height: 568px;
  max-width: 100%;
  background: linear-gradient(145deg, #2c2c2e 0%, #1c1c1e 100%);
  border-radius: 40px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2), 0 0 0 3px #3a3a3c, inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  box-sizing: border-box;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 24px;
  background: #1c1c1e;
  border-radius: 0 0 20px 20px;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  min-width: 0;
  height: 540px;
  min-height: 540px;
  max-height: 540px;
  background: #fff;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0,0,0,0.08);
  box-sizing: border-box;
}
.phone-statusbar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1c1c1e;
  background: #fff;
  border-bottom: 1px solid #e5e5ea;
}
.phone-time { letter-spacing: 0.02em; }
.phone-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.phone-signal {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 12px;
}
.phone-signal .signal-bar {
  width: 2px;
  min-width: 2px;
  border-radius: 1px;
  background: #1c1c1e;
}
.phone-signal .signal-bar:nth-child(1) { height: 4px; }
.phone-signal .signal-bar:nth-child(2) { height: 6px; }
.phone-signal .signal-bar:nth-child(3) { height: 8px; }
.phone-signal .signal-bar:nth-child(4) { height: 10px; }
.phone-signal .signal-bar:nth-child(5) { height: 12px; }
.phone-signal[data-level="4"] .signal-bar:nth-child(5) { background: #c7c7cc; }
.phone-signal[data-level="3"] .signal-bar:nth-child(4),
.phone-signal[data-level="3"] .signal-bar:nth-child(5) { background: #c7c7cc; }
.phone-signal[data-level="2"] .signal-bar:nth-child(3),
.phone-signal[data-level="2"] .signal-bar:nth-child(4),
.phone-signal[data-level="2"] .signal-bar:nth-child(5) { background: #c7c7cc; }
.phone-signal[data-level="1"] .signal-bar:nth-child(2),
.phone-signal[data-level="1"] .signal-bar:nth-child(3),
.phone-signal[data-level="1"] .signal-bar:nth-child(4),
.phone-signal[data-level="1"] .signal-bar:nth-child(5) { background: #c7c7cc; }
.phone-network {
  font-size: 10px;
  font-weight: 700;
  color: #1c1c1e;
  margin-left: 2px;
}
.phone-battery { font-size: 11px; margin-left: 2px; }
.phone-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--milk-white);
  border-bottom: 1px solid #e5e5ea;
}
.phone-back { font-size: 28px; color: #007aff; cursor: default; font-weight: 300; line-height: 1; }
.phone-contact { font-size: 16px; font-weight: 600; color: #1c1c1e; }
.phone-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #e8ecf0;
}
.phone-thread-divider {
  text-align: center;
  font-size: 11px;
  color: #8e8e93;
  padding: 6px 0;
  flex-shrink: 0;
}
.msg {
  max-width: 85%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.msg-in { align-self: flex-start; }
.msg-out { align-self: flex-end; }
.msg-sender { font-size: 11px; font-weight: 700; color: #212529; }
.msg-body {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 18px;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}
.msg-in .msg-body { background: #e9e9eb; color: #1c1c1e; border-bottom-left-radius: 4px; box-shadow: 0 1px 1px rgba(0,0,0,0.05); }
.msg-out .msg-body { background: #2d5016; color: #fff; border-bottom-right-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.msg-time { font-size: 10px; color: #8e8e93; margin-top: 2px; }
.msg-out .msg-time { text-align: right; }
.phone-input-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 14px;
  background: var(--milk-white);
  border-top: 1px solid #e5e5ea;
  min-width: 0;
}
.phone-attach {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #8e8e93;
  background: #e9e9eb;
  border-radius: 50%;
  cursor: default;
}
.phone-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #d1d1d6;
  border-radius: 20px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
}
.phone-input:focus {
  outline: none;
  border-color: #2d5016;
}
.phone-send {
  flex-shrink: 0;
  padding: 10px 14px;
  background: #2d5016;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.phone-send:hover { background: #1a3a0f; }

/* Feature phone (itel-style) – status: bars + 5G left, time right; balanced screen and keypad */
.feature-phone-frame {
  width: 220px;
  padding: 14px 16px 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #353a36 0%, #2c302d 45%, #242826 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}
.feature-phone-earpiece {
  width: 40px;
  height: 5px;
  margin-bottom: 10px;
  background: #1a1d1b;
  border-radius: 3px;
}
.feature-phone-screen {
  width: 100%;
  height: 208px;
  min-height: 208px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #1c1c1e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}
.feature-phone-status {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px 3px;
  font-size: 9px;
  font-weight: 600;
  color: #1c1c1e;
  background: #fff;
  border-bottom: 1px solid #e5e5ea;
}
.feature-phone-status-left {
  display: flex;
  align-items: center;
  gap: 4px;
}
.feature-phone-signal {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 10px;
}
.feature-phone-signal .signal-bar {
  width: 2px;
  min-width: 2px;
  border-radius: 1px;
  background: #1c1c1e;
}
.feature-phone-signal .signal-bar:nth-child(1) { height: 3px; }
.feature-phone-signal .signal-bar:nth-child(2) { height: 5px; }
.feature-phone-signal .signal-bar:nth-child(3) { height: 6px; }
.feature-phone-signal .signal-bar:nth-child(4) { height: 8px; }
.feature-phone-signal .signal-bar:nth-child(5) { height: 10px; }
.feature-phone-status .phone-network {
  font-size: 8px;
  font-weight: 700;
  margin-left: 0;
}
.feature-phone-status .phone-time {
  font-size: 9px;
}
.feature-phone-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 5px 7px;
  font-size: 8px;
  -webkit-overflow-scrolling: touch;
}
.feature-phone-thread .phone-thread-divider {
  font-size: 8px;
  color: #8e8e93;
  margin: 0 0 4px;
}
.feature-phone-thread .msg { margin-bottom: 4px; }
.feature-phone-thread .msg-body {
  font-size: 8px;
  padding: 3px 6px;
  max-width: 95%;
  line-height: 1.3;
}
.feature-phone-thread .msg-time { font-size: 7px; margin-top: 1px; }
.feature-phone-input-wrap {
  flex-shrink: 0;
  display: flex;
  gap: 5px;
  padding: 4px 6px 5px;
  border-top: 1px solid #e5e5ea;
  background: #fff;
}
.feature-phone-input {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  font-size: 9px;
  border: 1px solid #d1d1d6;
  border-radius: 4px;
  box-sizing: border-box;
}
.feature-phone-input:focus {
  outline: none;
  border-color: #2d5016;
}
.feature-phone-send {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 600;
  background: #2d5016;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.feature-phone-send:hover { background: #1a3a0f; }
.feature-phone-brand {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  font-style: italic;
  letter-spacing: 0.1em;
  margin: 8px 0 2px;
  font-family: Georgia, "Times New Roman", serif;
}
.feature-phone-nav-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  width: 100%;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.nav-row-top { gap: 14px; }
.nav-row-bottom {
  width: 148px;
  justify-content: space-between;
}
.softkey {
  width: 36px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(180deg, #424642 0%, #353a36 100%);
  border: 1px solid #282c29;
  box-shadow: 0 1px 0 #282c29, inset 0 1px 0 rgba(255,255,255,0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.softkey-four {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.15em;
}
.nav-dpad {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #424642 0%, #353a36 100%);
  border: 1px solid #282c29;
  box-shadow: 0 2px 0 #282c29, inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dpad-center {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  line-height: 1;
}
.nav-btn {
  width: 28px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(180deg, #424642 0%, #353a36 100%);
  border: 1px solid #282c29;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 0 #282c29, inset 0 1px 0 rgba(255,255,255,0.06);
}
.nav-btn:active { transform: translateY(1px); box-shadow: none; }
.feature-phone-keypad {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 188px;
  margin: 0;
  padding: 0;
}
.feature-phone-keypad .keypad-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0;
}
.feature-phone-keypad .keypad-key {
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: linear-gradient(180deg, #424642 0%, #353a36 100%);
  border: 1px solid #282c29;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 2px 0 #282c29, inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 0 4px;
  flex: 0 0 auto;
}
.feature-phone-keypad .keypad-key:hover { background: linear-gradient(180deg, #4a4f4a 0%, #3d423d 100%); }
.feature-phone-keypad .keypad-key:active { box-shadow: none; transform: translateY(1px); }

.try-it-section {
  margin-bottom: 28px;
  padding: 24px;
  background: var(--milk-white);
  border: 1px solid #eee;
  border-radius: 12px;
}
.try-it-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 8px;
}
.try-it-lead {
  font-size: 13px;
  color: #495057;
  margin-bottom: 18px;
  line-height: 1.5;
}
.try-it-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.try-it-card {
  padding: 20px;
  background: var(--milk-white);
  border: 1px solid #eee;
  border-radius: 10px;
}
.try-it-card h5 {
  font-size: 13px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 6px;
}
.try-it-desc {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 14px;
  line-height: 1.45;
}
.try-it-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #495057;
  margin-bottom: 4px;
}
.try-it-form select,
.try-it-form input[type="text"],
.try-it-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}
.try-it-form textarea {
  resize: vertical;
  min-height: 70px;
}
.status-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.status-input-row input {
  flex: 1;
  margin-bottom: 0;
}
.try-it-btn {
  padding: 10px 20px;
  background: #2d5016;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.try-it-btn:hover {
  background: #1a3a0f;
}
.try-it-result {
  font-size: 12px;
  color: #495057;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  min-height: 1em;
}
.try-it-result.try-it-success {
  background: var(--milk-white);
  border: 1px solid #eee;
  color: #212529;
}
.try-it-result.sms-style {
  background: var(--milk-white);
  border: 1px solid #eee;
  color: #212529;
  font-family: ui-monospace, monospace;
}
.try-it-result.sms-style.try-it-success {
  background: #2d5016;
  border-color: #2d5016;
  color: #fff;
}
.try-it-result code {
  color: #212529;
  font-size: 11px;
}

.tool-header-with-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.tool-header-with-start .tool-title {
  margin-bottom: 4px;
}
.tool-title-desc {
  font-size: 0.8125rem;
  color: #495057;
  font-weight: 400;
  margin: 0;
  max-width: min(640px, 100%);
}
.tool-start-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #2d5016;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.2s;
}
.tool-start-btn:hover {
  background: #1a3a0f;
  color: #fff;
}
.tool-header-lang {
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tool-header-lang-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tool-card-scout .tool-intro {
  margin-bottom: 14px;
  max-width: min(920px, calc(100% - 48px));
}
.tool-card-scout .tool-header {
  padding: 14px 18px;
}
.tool-card-scout .tool-header-lang {
  padding-top: 8px;
  margin-top: 2px;
}
/* SCOUT: clear border only around the main survey form */
.tool-card-scout .scout-survey-form {
  margin: 0 16px 18px;
  padding: 18px 20px;
  background: var(--milk-white);
  border: 2px solid #ccc;
  border-radius: 12px;
}
.survey-group {
  margin-bottom: 22px;
}
.survey-group:last-of-type { margin-bottom: 0; }
.survey-group-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.survey-section {
  margin-bottom: 20px;
  padding: 14px 0 0;
  background: transparent;
}
.survey-section:last-of-type { margin-bottom: 0; }
.survey-dimension {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #212529;
  margin-bottom: 10px;
}
.survey-q {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 12px 0;
  line-height: 1.45;
}
/* Survey options: default wide layout = horizontal row */
.survey-options {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px 16px;
}
.survey-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  padding: 8px 10px;
  background: var(--milk-white);
  border-radius: 8px;
  transition: background 0.2s;
  flex: 1 1 0;
  min-width: 0;
}
.survey-options label:hover {
  background: var(--milk-white);
}
.survey-options input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #2d5016;
}
.survey-actions { margin-top: 22px; padding-top: 16px; border-top: 2px solid #ccc; }
.scout-submit-btn {
  padding: 12px 22px;
  background: #2d5016;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.scout-submit-btn:hover { background: #1a3a0f; }
/* SCOUT: clear border only around the report output */
.tool-card-scout .scout-report {
  margin: 0 16px 18px 16px;
  padding: 16px 18px;
  background: var(--milk-white);
  border: 2px solid #ccc;
  border-radius: 12px;
}
.scout-report-title {
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
  margin: 0 0 10px 0;
}
.scout-dims {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 14px;
}

.scout-try .scout-sim-form {
  margin-bottom: 16px;
}
.scout-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px 24px;
  margin-bottom: 18px;
}
.scout-inputs label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #374151;
  font-weight: 500;
}
.scout-inputs input[type="range"] {
  flex: 1;
  min-width: 80px;
  accent-color: #2d5016;
}
.scout-inputs span {
  min-width: 1.2em;
  font-weight: 700;
  color: #2d5016;
}
.scout-output {
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.scout-output.scout-output-visible {
  padding: 18px 20px;
  background: var(--milk-white);
  border-radius: 10px;
  opacity: 1;
}
.scout-indices,
.scout-flags,
.scout-prompts {
  font-size: 13px;
  color: #374151;
  margin-bottom: 12px;
}
.scout-indices:last-child,
.scout-flags:last-child,
.scout-prompts:last-child { margin-bottom: 0; }
.scout-flags ul,
.scout-prompts ul {
  margin: 6px 0 0 0;
  padding-left: 20px;
}
.scout-ok {
  font-size: 13px;
  color: #212529;
  font-weight: 600;
}

/* ========== Mobile & narrow screens (768px and below) ========== */
@media (max-width: 768px) {
  :root {
    --page-band-max: 100%;
    --content-max: 100%;
    --prose-max: 100%;
  }
  /* Header – compact, touch-friendly */
  header {
    padding: 12px 16px;
  }
  .header-content {
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 12px;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
  }
  /* LIVE + EXPORT only on Public Dashboard; other pages get logo + menu only */
  body:not(.page-dashboard) .header-actions {
    display: none !important;
  }
  body.page-dashboard .header-content {
    align-items: flex-start;
  }
  body.page-dashboard .logo-section {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(100% - 56px);
  }
  body.page-dashboard .nav-wrap {
    order: 2;
    align-self: flex-start;
  }
  body.page-dashboard .header-actions {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    padding: 10px 8px 4px;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    box-sizing: border-box;
  }
  body.page-dashboard .live-indicator {
    padding: 8px 14px;
    font-size: 10px;
  }
  body.page-dashboard .btn-export {
    padding: 10px 18px;
    min-height: 44px;
  }
  body.page-dashboard .header-export-wrap {
    position: relative;
  }
  body.page-dashboard .export-dropdown {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    min-width: min(220px, calc(100vw - 32px));
  }
  .logo-section {
    order: 1;
    flex: 1;
    min-width: 0;
  }
  .logo-section a {
    gap: 8px;
  }
  .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  h1 {
    font-size: 16px;
  }
  .tagline {
    font-size: 10px;
  }
  .nav-wrap {
    order: 2;
    position: relative;
    flex-shrink: 0;
  }
  .hamburger {
    display: flex;
    position: relative;
    z-index: 1001;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    transition: background 0.2s;
  }
  .hamburger:hover,
  .hamburger[aria-expanded="true"] {
    background: rgba(255,255,255,0.25);
  }
  .layer-nav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    padding: 10px 0;
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.08);
  }
  .layer-nav a {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    padding: 14px 20px;
    min-height: 48px;
    text-decoration: none;
    border: none;
    transition: background 0.15s, color 0.15s;
  }
  .layer-nav a:hover {
    background: rgba(45,80,22,0.08);
    color: #2d5016;
  }
  body.nav-open .layer-nav {
    display: block;
  }
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.35);
  }
  body.nav-open .nav-overlay {
    display: block;
  }
  .hero-title {
    font-size: 18px;
  }

  /* Container – no overflow */
  .container {
    padding: 12px 16px 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Narrow screens: stack side-by-side blocks; keep touch targets usable */
  main,
  .page-home main {
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }
  .header-content {
    max-width: 100%;
  }
  .flowchart-combine-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .flowchart-combine-row .flowchart-plus {
    line-height: 1;
  }
  .channel-switch-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .conservancy-detail-body.comparison-view {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .conservancy-detail-body.comparison-view .comparison-col {
    border-radius: 8px;
  }
  pre,
  code {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }

  /* USSD flow: keep phones side-by-side; each column max half width — no horizontal page scroll */
  .ussd-flow-phones {
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 2px;
    gap: 8px;
  }
  .ussd-flow-phones .ussd-phone-mockup {
    flex: 0 1 calc(50% - 6px);
    min-width: 0;
    max-width: calc(50% - 6px);
  }
  .ussd-flow-phones .ussd-phone-frame {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .ussd-flow-phones .ussd-phone-screen {
    height: auto;
    min-height: 150px;
  }

  /* Home */
  .home-hero {
    min-height: 320px;
  }
  .home-hero-inner,
  .hero-home {
    padding: 24px 16px 32px;
  }
  .home-hero-title {
    font-size: clamp(1.5rem, 6vw, 1.75rem);
  }
  .home-hero-lead {
    font-size: 14px;
  }
  .btn-start-survey,
  .home-hero-link {
    padding: 14px 24px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .home-tools-inner {
    padding: 28px 16px 24px;
  }
  .home-tools-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .home-team-inner {
    padding: 18px 12px 20px;
  }
  .home-team-carousel {
    padding: 0;
    border-radius: 0;
  }
  .home-team-slide {
    flex: 0 0 100%;
    padding: 0;
  }
  .home-team-card {
    width: 100%;
  }
  .home-team-thumb {
    border-radius: 6px;
    padding-bottom: 75%;
  }
  .home-team-caption {
    font-size: 0.8125rem;
    margin-top: 6px;
    min-height: 4em;
    padding: 0 2px;
  }
  .home-team-controls {
    gap: 10px;
    margin-top: 2px;
  }
  .home-team-status {
    margin-top: 2px;
  }
  .home-team-nav {
    width: 34px;
    height: 34px;
  }
  .home-tool-card {
    padding: 20px 18px;
    min-height: auto;
  }
  .home-tool-card-title {
    font-size: 1rem;
  }
  .home-tool-card-desc {
    font-size: 13px;
  }
  .home-mission-inner {
    padding: 28px 16px;
  }

  /* Dashboard */
  .dashboard-top-section {
    padding: 12px 0 0;
  }
  .dashboard-top-heading {
    font-size: 1.25rem;
    line-height: 1.3;
  }
  .project-selector-wrap {
    width: 100%;
    margin: 10px 0;
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-top-section .project-selector-wrap {
    padding: 0;
  }
  .project-selector {
    flex: 0 0 auto !important;
    width: 100%;
    min-height: 48px;
    height: auto !important;
    max-height: none;
    padding: 12px 16px;
    font-size: 16px;
  }
  .dashboard-top-subheading {
    font-size: 12px;
  }
  .dashboard-top-lead {
    font-size: 13px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-card {
    padding: 16px 14px;
  }
  .stat-header {
    flex-wrap: wrap;
  }
  .stat-label {
    font-size: 12px;
  }
  .stat-info {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin-left: 6px;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-unit {
    font-size: 11px;
  }
  .stats-data-source {
    font-size: 11px;
  }
  .stat-tooltip {
    max-width: min(280px, calc(100% - 16px));
  }

  .map-section {
    margin-top: 20px;
  }
  .map-instructions {
    padding: 12px 16px;
    font-size: 12px;
  }
  .map-instructions strong {
    font-size: 12px;
  }
  .map-instructions-why {
    font-size: 11px;
  }
  .map-instructions li {
    margin-bottom: 8px;
  }
  .map-and-panel {
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
    gap: 0;
  }
  /* Don’t let the map column grow vertically (was leaving a huge empty band under the map) */
  .map-wrapper {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    position: relative;
  }
  #map {
    min-height: 260px;
    height: min(320px, 45vh);
    max-height: 360px;
  }
  /* Side panel closed: take no vertical space in the column stack */
  .conservancy-detail-panel:not(.conservancy-detail-panel-visible) {
    flex: 0 0 0;
    min-height: 0;
    height: 0;
    overflow: hidden;
    border: none;
    padding: 0;
    margin: 0;
  }
  .legend {
    top: 4px;
    right: 4px;
    left: auto;
    max-width: min(168px, calc(100% - 10px));
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 8px;
  }
  .legend-title {
    font-size: 7px;
    margin-bottom: 4px;
    letter-spacing: 0.04em;
  }
  .legend-item {
    font-size: 8px;
    margin-bottom: 2px;
    gap: 4px;
    line-height: 1.2;
  }
  .legend-color {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
  }
  @media (max-width: 480px) {
    .legend {
      max-width: min(148px, calc(100% - 8px));
      padding: 3px 5px;
    }
    .legend-title {
      font-size: 6.5px;
      margin-bottom: 3px;
    }
    .legend-item {
      font-size: 7px;
      margin-bottom: 2px;
      gap: 3px;
    }
    .legend-color {
      width: 7px;
      height: 7px;
    }
  }
  .conservancy-detail-panel.conservancy-detail-panel-visible {
    width: 100%;
    min-width: 0;
    height: auto;
    flex: 0 1 auto;
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .conservancy-detail-panel .panel-close {
    min-width: 44px;
    min-height: 44px;
  }

  .compare-filter-section {
    margin-top: 20px;
  }
  .compare-filter-header {
    padding: 14px 16px 12px;
  }
  .compare-filter-controls {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px 18px;
    gap: 14px;
  }
  /* Stop flex-grow from stretching <select> to fill empty column height */
  .compare-filter-group {
    flex: 0 0 auto !important;
    max-width: 100%;
  }
  .compare-filter-controls--single .compare-filter-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .compare-filter-controls--single .compare-select {
    flex: 0 0 auto !important;
    max-width: none;
    width: 100%;
    min-height: 48px;
    height: auto;
    max-height: none;
  }
  .compare-select {
    flex: 0 0 auto !important;
    width: 100%;
    min-height: 48px;
    height: auto !important;
    max-height: none;
    align-self: stretch;
  }
  .compare-filter-group select {
    min-height: 48px;
    font-size: 16px;
    width: 100%;
    flex: none !important;
  }
  .compare-filter-vs {
    align-self: center;
    padding: 4px 0;
  }
  .compare-filter-result {
    padding: 16px;
  }
  .compare-filter-result-body.comparison-view {
    grid-template-columns: 1fr;
  }
  .compare-filter-result-body.comparison-view .comparison-col:first-child {
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px 10px 0 0;
  }
  .compare-filter-result-body.comparison-view .comparison-col:last-child {
    border-radius: 0 0 10px 10px;
  }
  .compare-filter-table-wrap {
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .compare-filter-table {
    display: block;
    border: none;
    background: transparent;
  }
  .compare-filter-table thead {
    display: none;
  }
  .compare-filter-table tbody {
    display: block;
  }
  .compare-filter-table tbody tr {
    display: block;
    background: var(--milk-white);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 14px 16px;
    box-shadow: none;
  }
  .compare-filter-table tbody tr:last-child {
    margin-bottom: 0;
  }
  .compare-filter-table tbody th {
    display: block;
    width: 100%;
    padding: 0 0 10px 0;
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 700;
    color: #212529;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    white-space: normal;
  }
  .compare-filter-table tbody td {
    display: block;
    width: 100%;
    padding: 6px 0;
    font-size: 13px;
    white-space: normal;
    border: none;
  }
  .compare-filter-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #495057;
    margin-right: 8px;
  }
  .compare-filter-table tbody td:first-of-type {
    padding-top: 0;
  }

  /* Buyer tables: fit viewport — no horizontal scroll */
  .buyers-compare-col .compare-filter-table-wrap {
    overflow-x: visible;
    overflow-y: auto;
    max-width: 100%;
  }
  .buyers-compare-col .compare-filter-table {
    display: table;
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: var(--milk-white);
    font-size: 9px;
  }
  .buyers-compare-col:nth-child(2) .compare-filter-table {
    min-width: 0 !important;
  }
  .buyers-compare-col .compare-filter-table thead {
    display: table-header-group;
  }
  .buyers-compare-col .compare-filter-table tbody {
    display: table-row-group;
  }
  .buyers-compare-col .compare-filter-table tbody tr {
    display: table-row;
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  .buyers-compare-col .compare-filter-table th,
  .buyers-compare-col .compare-filter-table td {
    padding: 6px 4px;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .buyers-compare-col .compare-filter-table tbody th,
  .buyers-compare-col .compare-filter-table tbody td {
    display: table-cell;
    border-top: 1px solid #e9ecef;
  }
  .buyers-compare-col .compare-filter-table tbody tr:first-child th,
  .buyers-compare-col .compare-filter-table tbody tr:first-child td {
    border-top: none;
  }
  .buyers-compare-col .compare-filter-table tbody td::before {
    display: none;
    content: none;
  }
  /* Undo desktop fixed column mins so the table can shrink to the viewport */
  .buyers-compare-col:nth-child(2) .compare-filter-table thead th:nth-child(1),
  .buyers-compare-col:nth-child(2) .compare-filter-table thead th:nth-child(2),
  .buyers-compare-col:nth-child(2) .compare-filter-table thead th:nth-child(4),
  .buyers-compare-col:nth-child(2) .compare-filter-table td:nth-child(1),
  .buyers-compare-col:nth-child(2) .compare-filter-table td:nth-child(4) {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
  }
  .buyers-compare-col:nth-child(2) .compare-filter-table td:nth-child(2),
  .buyers-compare-col:nth-child(2) .compare-filter-table td:nth-child(3) {
    min-width: 0 !important;
  }
  .buyers-compare-col:nth-child(1) .compare-filter-table tbody td {
    white-space: normal;
  }

  .verification-cycles-block {
    padding: 0;
    overflow-x: visible;
    max-width: 100%;
  }
  .verification-cycles-table {
    font-size: 10px;
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }
  .verification-cycles-table th,
  .verification-cycles-table td {
    padding: 8px 10px;
  }
  .verification-cycles-block .map-header {
    padding: 12px 16px;
  }
  .map-section .map-header .map-title,
  .project-summary-block .map-title {
    font-size: 14px;
  }

  .data-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .data-card {
    padding: 14px;
  }
  .card-title {
    font-size: 14px;
  }
  .card-source {
    font-size: 11px;
  }
  .metric-box {
    padding: 6px 0;
  }
  .metric-label {
    font-size: 12px;
  }
  .metric-value {
    font-size: 18px;
  }
  .project-overview-card {
    padding: 14px;
  }
  .projects-section .card-header {
    padding: 16px 0;
  }
  .project-card {
    padding: 14px;
  }
  .buyers-compare-grid {
    grid-template-columns: 1fr;
  }
  .buyers-metrics {
    grid-template-columns: 1fr;
  }

  /* Social CoMMs pies (SCOUT page) */
  .social-comms-charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .social-pie-card {
    padding: 14px 16px;
  }
  .social-pie-svg {
    width: 140px;
    height: 140px;
  }
  .social-pie-title {
    font-size: 12px;
  }
  .social-pie-legend-item {
    font-size: 11px;
  }
  .layer-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid,
  .data-grid,
  .projects-grid,
  #community-benefits-grid {
    grid-template-columns: 1fr;
  }

  /* Sources page — in-page nav: single column, full-width taps (no jagged wrap) */
  .sources-main {
    padding: 20px 12px 18px;
  }
  .sources-hero-title {
    font-size: 1.5rem;
  }
  .sources-hero-desc {
    font-size: 14px;
  }
  .sources-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 100%;
  }
  .sources-nav a {
    font-size: 13px;
    padding: 12px 16px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    line-height: 1.3;
  }
  .sources-card {
    padding: 18px 16px;
  }
  .sources-card-title {
    font-size: 1rem;
  }
  .sources-link {
    padding: 12px 14px 12px 36px;
    min-height: 44px;
  }
  .sources-block,
  .sources-list {
    padding-left: 0;
  }
  .sources-block h4 {
    font-size: 13px;
  }

  /* SCOUT tool */
  .tool-card {
    margin-bottom: 24px;
  }
  .tool-card-scout .tool-header-with-start {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .tool-start-btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
  .tool-card-scout .scout-survey-form {
    margin: 0 10px 16px;
    padding: 14px 12px;
  }
  .tool-card-scout .scout-report {
    margin: 0 10px 16px;
    padding: 14px 12px;
  }
  .survey-group-title {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .survey-section {
    padding-top: 12px;
  }
  .survey-q {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .survey-options {
    flex-direction: column;
  }
  .survey-options label {
    flex: none;
    min-width: auto;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 14px;
  }
  .survey-options input[type="radio"] {
    width: 22px;
    height: 22px;
  }
  .scout-submit-btn {
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
  }
  .scout-survey-form .survey-actions {
    padding-top: 14px;
    margin-top: 18px;
  }
  .empowerment-dimensions {
    margin-bottom: 18px;
  }
  .empowerment-dimensions h4 {
    font-size: 12px;
  }
  .empowerment-dimensions p {
    font-size: 12px;
  }
  .dimensions-list {
    padding-left: 22px;
    font-size: 12px;
  }
  .dimensions-list-heading {
    font-size: 11px;
    margin: 16px 0 6px 0;
  }
  .sdg-badges {
    gap: 10px;
    margin-top: 14px;
  }
  .sdg-badge {
    min-width: 90px;
    padding: 12px 14px;
    font-size: 13px;
  }
  .sdg-badge-label {
    font-size: 9px;
  }
  .scout-flow-mobile {
    padding: 12px 14px;
  }

  /* Community interface */
  .layer-section {
    padding: 20px 0;
  }
  .layer-section.layer-2 {
    padding: 14px 0;
  }
  .community-interface-page.layer-section.layer-1 {
    padding: 14px 0;
  }
  .layer-section h3 {
    font-size: 15px;
  }
  .tool-card-phone {
    padding: 16px;
  }
  .phone-mockup {
    max-width: 100%;
  }
  .phone-frame {
    max-width: 100%;
  }
  .phone-input,
  .feature-phone-input {
    min-height: 48px;
    font-size: 16px;
  }
  .phone-send,
  .feature-phone-send {
    min-height: 48px;
    min-width: 60px;
  }
  .loop-section {
    padding: 16px;
  }
  .loop-section h3 {
    font-size: 15px;
  }

  .map-and-panel,
  .map-section,
  .dashboard-content,
  .sources-main {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Footer */
  .footer-inner {
    padding: 18px 14px 16px;
    gap: 12px;
    max-width: 100%;
  }
  .footer-partners {
    gap: 14px 20px;
  }
  .footer-logo-partner {
    padding: 6px 10px;
    min-height: 48px;
  }
  .footer-logo-partner img {
    max-height: 44px;
    max-width: 160px;
  }
  .footer-logo-partner-aiid img {
    max-height: 40px;
    max-width: 150px;
  }
  .footer-logo-partner-cals img {
    max-height: 36px;
    max-width: 160px;
  }
  .footer-text {
    font-size: 11px;
    line-height: 1.5;
  }
}

/* ========== Extra small screens (480px and below) ========== */
@media (max-width: 480px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }
  header {
    padding: 10px 12px;
  }
  .container {
    padding: 10px 12px;
    max-width: 100%;
    min-width: 0;
  }
  h1 {
    font-size: 15px;
  }
  .home-hero-inner {
    padding: 20px 12px 28px;
  }
  .home-hero-title {
    font-size: 1.35rem;
  }
  .home-tools-inner {
    padding: 20px 12px 22px;
  }
  .dashboard-top-heading {
    font-size: 1.15rem;
  }
  .stat-value {
    font-size: 22px;
  }
  #map {
    min-height: 280px;
    height: 280px;
  }
  .map-wrapper {
    min-height: 280px;
  }
  .sources-main {
    padding: 16px 10px 14px;
  }
  .sources-hero-title {
    font-size: 1.35rem;
  }
  .sources-card {
    padding: 14px 12px;
  }
  .tool-card-scout .scout-survey-form {
    margin: 0 8px 16px;
    padding: 16px 12px;
  }
  .tool-card-scout .scout-report {
    margin: 0 8px 16px;
    padding: 16px 12px;
  }
  .survey-q {
    font-size: 14px;
  }
  .layer-nav a {
    font-size: 16px;
    max-width: 100%;
  }
}