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

:root {
  --bg:          #1a1d2a;
  --surface:     #20243a;
  --surface2:    #272c42;
  --border:      #333a56;
  --border2:     #424e6e;
  --accent:      #179e72;
  --accent-glow: #34d399;
  --accent-teal: #38bdf8;
  --accent-warm: #f97316;
  --text:        #edf1fa;
  --muted:       #8a96b8;
  --grad:        linear-gradient(135deg, #1a9e72 0%, #0b7050 100%);
  --grad-teal:   linear-gradient(135deg, #0ea5c4 0%, #1a9e72 100%);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 2.5rem;
  background: rgba(26,29,42,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.logo {
  font-size: 1.05rem; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.logo em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.87rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.lang-switcher { display: flex; align-items: center; gap: 0.35rem; }
.lang-sep { color: var(--border2); font-size: 0.85rem; user-select: none; }
.lang-btn {
  background: none; border: 1px solid transparent; border-radius: 6px;
  color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  color: var(--accent-glow); border-color: rgba(26,158,114,0.4);
  background: rgba(26,158,114,0.08);
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 1.1rem; border-radius: 8px;
  border: 1px solid var(--accent); background: rgba(26,158,114,0.08);
  color: var(--accent-glow); font-size: 0.84rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { background: rgba(26,158,114,0.18); }

/* ── SHARED ── */
section { display: flex; align-items: center; justify-content: center; padding: 6rem 2rem 4rem; }
.container { max-width: 1100px; width: 100%; margin: 0 auto; }
.section-label {
  font-size: 0.77rem; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--accent-glow); margin-bottom: 0.75rem;
}
h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 1rem; }
.section-desc { color: var(--muted); max-width: 580px; margin-bottom: 3rem; font-size: 1rem; }

/* ── HERO ── */
#hero {
  min-height: 100vh; position: relative; overflow: hidden; text-align: center;
  background: url('images/map-banner.png') center 60% / cover no-repeat;
}
#hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,29,42,0.55) 0%,
    rgba(26,29,42,0.42) 40%,
    rgba(26,29,42,0.52) 65%,
    rgba(26,29,42,0.82) 100%
  );
  z-index: 0;
}
@keyframes gridDrift { 0%{background-position:0 0} 100%{background-position:60px 60px} }
#hero::after {
  content: ''; position: absolute; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,158,114,0.10) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.badge {
  display: inline-block; padding: 0.3rem 1rem; border-radius: 999px;
  border: 1px solid rgba(26,158,114,0.45); background: rgba(26,158,114,0.07);
  color: var(--accent-glow); font-size: 0.75rem; letter-spacing: 0.09em;
  text-transform: uppercase; margin-bottom: 1.4rem;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1.2rem; text-shadow: 0 2px 24px rgba(0,0,0,0.7); }
h1 span { -webkit-text-fill-color: inherit; background: none; color: inherit; filter: none; }
.hero-sub { font-size: 1.1rem; color: #c8d0e8; max-width: 560px; margin: 0 auto 1.25rem; text-shadow: 0 1px 12px rgba(0,0,0,0.8); }
.hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0 auto 2.2rem; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.22rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--border2); background: rgba(26,29,42,0.65);
  color: #b0bcd8; font-size: 0.72rem; font-family: 'Courier New', monospace;
  backdrop-filter: blur(4px);
}
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.9rem; border-radius: 10px; border: none;
  background: var(--grad); color: #fff;
  font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none;
  box-shadow: 0 0 22px rgba(26,158,114,0.38); transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 32px rgba(26,158,114,0.6); }
.btn-primary svg, .btn-secondary svg { width: 18px; height: 18px; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.9rem; border-radius: 10px;
  border: 1px solid var(--border2); background: rgba(255,255,255,0.035);
  color: var(--text); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(26,158,114,0.08); }

/* ── STATS COUNTER ── */
#stats {
  min-height: auto; padding: 3.5rem 2rem;
  background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stats-inner {
  display: grid; grid-template-columns: repeat(4, 1fr); text-align: center;
}
@media(max-width:700px){ .stats-inner { grid-template-columns: repeat(2,1fr); } }
.stat-item { padding: 1.25rem 1.5rem; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 2.3rem; font-weight: 800; line-height: 1;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 0.3rem; display: block;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 0.82rem; color: var(--text); font-weight: 600; }
.stat-sub { font-size: 0.71rem; color: var(--muted); margin-top: 0.18rem; }

/* ── WHY NOW ── */
#why-now { min-height: auto; padding: 5.5rem 2rem; background: var(--bg); }
.why-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 1.25rem; }
.why-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.75rem; position: relative; overflow: hidden;
}
.why-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top left, rgba(26,158,114,0.05) 0%, transparent 65%);
}
.why-num { font-size: 2.4rem; font-weight: 800; line-height: 1; margin-bottom: 0.5rem; position: relative; }
.why-num.c-green  { color: var(--accent-glow); }
.why-num.c-teal   { color: var(--accent-teal); }
.why-num.c-amber  { color: var(--accent-warm); }
.why-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; position: relative; }
.why-card p  { font-size: 0.87rem; color: var(--muted); line-height: 1.6; position: relative; }
.why-src {
  margin-top: 0.75rem; font-size: 0.71rem; color: var(--accent); opacity: 0.65;
  font-family: 'Courier New', monospace; position: relative;
}
.deadline-strip {
  margin-top: 2.5rem; padding: 1.25rem 1.75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; align-items: center;
}
.deadline-label { font-size: 0.75rem; color: var(--muted); font-family: 'Courier New', monospace; }
.deadline-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; color: var(--muted);
}
.deadline-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.deadline-dot.active { background: var(--accent-warm); box-shadow: 0 0 6px rgba(249,115,22,0.6); }
.deadline-dot.soon   { background: var(--accent-glow); }
.deadline-dot.future { background: var(--border2); }
.deadline-date { font-weight: 700; color: var(--text); }

/* ── PIPELINE ── */
#pipeline { min-height: auto; padding: 5.5rem 2rem; background: var(--surface); }
.pipeline-steps {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 0;
  margin-top: 2.5rem; position: relative;
}
.pipeline-steps::after {
  content: ''; position: absolute; top: 31px; left: 12.5%; right: 12.5%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent), transparent);
  opacity: 0.5; pointer-events: none;
}
@media(max-width:768px){ .pipeline-steps { grid-template-columns: repeat(2,1fr); } .pipeline-steps::after { display: none; } }
.pipe-step { text-align: center; padding: 1.5rem 1.25rem; }
.pipe-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; font-size: 1.4rem; position: relative; z-index: 1;
}
.pipe-step h4 { font-size: 0.98rem; font-weight: 700; margin-bottom: 0.4rem; }
.pipe-step p  { font-size: 0.82rem; color: var(--muted); line-height: 1.55; }
.pipe-micro {
  display: inline-block; margin-top: 0.6rem; padding: 0.18rem 0.65rem;
  border-radius: 999px; font-size: 0.7rem; font-family: 'Courier New', monospace;
  background: rgba(26,158,114,0.1); border: 1px solid rgba(26,158,114,0.22);
  color: var(--accent-glow);
}

/* ── FEATURES ── */
#features { min-height: auto; padding: 5.5rem 2rem; background: var(--bg); }
.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.75rem; transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; background: rgba(26,158,114,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; font-size: 1.4rem;
}
.card h3 { font-size: 1.04rem; font-weight: 700; margin-bottom: 0.4rem; }
.card p  { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.75rem; }
.card-tag {
  display: inline-block; padding: 0.18rem 0.65rem; border-radius: 999px;
  font-size: 0.7rem; font-family: 'Courier New', monospace;
}
.tag-green  { background: rgba(52,211,153,0.09); border: 1px solid rgba(52,211,153,0.22); color: var(--accent-glow); }
.tag-teal   { background: rgba(56,189,248,0.09); border: 1px solid rgba(56,189,248,0.22); color: var(--accent-teal); }
.tag-amber  { background: rgba(249,115,22,0.09);  border: 1px solid rgba(249,115,22,0.22);  color: var(--accent-warm); }

/* ── CASE STUDY ── */
#case-study { min-height: auto; padding: 5.5rem 2rem; background: var(--surface); }
.case-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
@media(max-width:768px){ .case-inner { grid-template-columns: 1fr; } }
.case-map-stack { display: flex; flex-direction: column; gap: 0; }
.case-map { border-radius: 16px 16px 0 0; overflow: hidden; border: 1px solid var(--border); line-height: 0; }
.case-map-img { width: 100%; height: auto; display: block; filter: brightness(0.7); }
.case-map-caption {
  font-size: 0.72rem; font-family: 'Courier New', monospace; color: var(--muted);
  padding: 0.55rem 1rem; background: var(--bg);
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 16px 16px; line-height: 1.4;
}
.case-chip {
  display: inline-block; padding: 0.22rem 0.85rem; border-radius: 999px;
  font-size: 0.73rem; font-family: 'Courier New', monospace;
  background: rgba(26,158,114,0.1); border: 1px solid var(--accent);
  color: var(--accent-glow); margin-bottom: 1rem;
}
.findings { list-style: none; margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.finding {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1.1rem;
}
.finding-num { font-size: 1.65rem; font-weight: 800; line-height: 1; flex-shrink: 0; min-width: 3.5rem; }
.fn-red    { color: #f96464; }
.fn-green  { color: var(--accent-glow); }
.fn-amber  { color: var(--accent-warm); }
.fn-teal   { color: var(--accent-teal); }
.finding-text h5 { font-size: 0.87rem; font-weight: 700; margin-bottom: 0.18rem; }
.finding-text p  { font-size: 0.80rem; color: var(--muted); line-height: 1.5; }
.case-cta { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
/* proposals grid */
.case-proposals { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.case-proposals-header { margin-bottom: 2rem; }
.case-proposals-header h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.case-proposals-header p  { font-size: 0.88rem; color: var(--muted); }
.proposals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.proposal-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.proposal-num {
  font-size: 0.68rem; font-family: 'Courier New', monospace; font-weight: 700;
  letter-spacing: 0.08em; color: var(--accent-glow);
}
.proposal-card h4 { font-size: 0.9rem; font-weight: 700; line-height: 1.3; }
.proposal-card p  { font-size: 0.80rem; color: var(--muted); line-height: 1.55; flex: 1; }
.proposal-tag {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  font-size: 0.67rem; font-family: 'Courier New', monospace;
  background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2);
  color: var(--accent-glow); align-self: flex-start;
}
/* conclusion */
.case-conclusion {
  margin-top: 2.5rem; padding: 1.75rem 2rem;
  border-left: 3px solid var(--accent); background: var(--bg);
  border-radius: 0 14px 14px 0;
}
.case-conclusion p { font-size: 1rem; line-height: 1.7; font-style: italic; color: var(--text); margin-bottom: 0.5rem; }
.case-conclusion cite { font-size: 0.74rem; color: var(--muted); font-family: 'Courier New', monospace; font-style: normal; }

/* ── EVIDENCE ── */
#evidence { min-height: auto; padding: 5.5rem 2rem; background: var(--surface); }
.ev-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center; margin-bottom: 4rem;
}
.ev-row.ev-row-rev { direction: rtl; }
.ev-row.ev-row-rev > * { direction: ltr; }
@media(max-width:768px) {
  .ev-row { grid-template-columns: 1fr; gap: 2rem; }
  .ev-row.ev-row-rev { direction: ltr; }
}
.ev-vis {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); line-height: 0;
}
.ev-img { width: 100%; height: auto; display: block; filter: brightness(0.9); }
.ev-chip {
  display: inline-block; padding: 0.22rem 0.85rem; border-radius: 999px;
  font-size: 0.72rem; font-family: 'Courier New', monospace;
  background: rgba(26,158,114,0.1); border: 1px solid var(--accent);
  color: var(--accent-glow); margin-bottom: 1rem;
}
.ev-body h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.65rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 0.85rem;
}
.ev-body > p { color: var(--muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; }
.ev-stats { display: flex; gap: 1.75rem; flex-wrap: wrap; }

.ev-val { display: block; font-size: 1.65rem; font-weight: 800; line-height: 1; margin-bottom: 0.25rem; }
.ev-lbl { font-size: 0.7rem; color: var(--muted); font-family: 'Courier New', monospace; text-transform: uppercase; letter-spacing: 0.06em; }
.ev-quote {
  margin: 0 0 4rem; padding: 2rem 2.5rem;
  border-left: 3px solid var(--accent);
  background: var(--bg); border-radius: 0 16px 16px 0;
}
.ev-quote p { font-size: 1.08rem; line-height: 1.7; font-style: italic; color: var(--text); margin-bottom: 0.6rem; }
.ev-quote cite { font-size: 0.76rem; color: var(--muted); font-family: 'Courier New', monospace; font-style: normal; }

/* ── FULL REPORT DOWNLOAD ── */
.report-download {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  margin-top: 2rem; padding: 1.5rem 1.75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
}
.report-download[hidden] { display: none; }
.report-download-title {
  font-size: 1.02rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem;
}
.report-download-sub {
  font-size: 0.86rem; color: var(--muted); line-height: 1.55; max-width: 56ch;
}
.btn-report {
  display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0;
  padding: 0.85rem 1.5rem; border-radius: 10px;
  background: var(--grad); color: #fff;
  font-size: 0.94rem; font-weight: 600; text-decoration: none;
  box-shadow: 0 0 16px rgba(26,158,114,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-report:hover { transform: translateY(-1px); box-shadow: 0 4px 22px rgba(26,158,114,0.45); }
.btn-report svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-report-meta {
  font-size: 0.76rem; font-weight: 500; opacity: 0.8;
  padding-left: 0.6rem; border-left: 1px solid rgba(255,255,255,0.3);
}
.btn-report-meta:empty { display: none; }

@media(max-width:700px) {
  .report-download { flex-direction: column; align-items: flex-start; }
  .btn-report { width: 100%; justify-content: center; }
}

/* ── DEMO / MESSENGER ── */
#demo {
  min-height: auto; padding: 5.5rem 2rem;
  background: var(--surface); position: relative; overflow: hidden;
}
#demo::before {
  content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,158,114,0.09) 0%, transparent 70%);
  bottom: -120px; right: -120px; pointer-events: none;
}

/* ── BOOK A CALL ── */
#contact {
  min-height: auto; padding: 5rem 2rem;
  background: var(--bg); border-top: 1px solid var(--border);
}
.contact-options {
  display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center;
  margin-bottom: 2rem;
}
.contact-option {
  display: flex; align-items: center; gap: 1rem; text-align: left;
  padding: 1.25rem 1.75rem; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; color: var(--text); cursor: pointer; font-family: inherit;
  transition: border-color 0.2s, background 0.2s; min-width: 260px;
}
.contact-option:hover { border-color: var(--accent); background: var(--surface2); }
/* `display: flex` above beats the hidden attribute's own display:none, so the
   report card would show even with no file configured. Restore it explicitly. */
.contact-option[hidden] { display: none; }
.contact-opt-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-opt-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.2rem; }
.contact-opt-sub { font-size: 0.82rem; color: var(--muted); }
.contact-opt-sub:empty { display: none; }
.contact-note {
  font-size: 0.82rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.6rem 1.2rem;
}
.contact-centered { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact-centered h2 { margin-bottom: 0.75rem; }
.contact-centered > p { color: var(--muted); font-size: 1rem; margin-bottom: 2rem; }
.messenger {
  width: 100%; max-width: 740px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column;
}
.messenger-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  background: rgba(26,158,114,0.03);
}
.messenger-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.messenger-name { font-weight: 700; font-size: 0.95rem; }
.messenger-status { font-size: 0.75rem; color: var(--accent-glow); }
.preset-prompts {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border);
  background: rgba(26,158,114,0.02);
}
.preset-btn {
  padding: 0.28rem 0.85rem; border-radius: 999px; border: 1px solid var(--border2);
  background: rgba(255,255,255,0.025); color: var(--muted); font-size: 0.75rem;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.preset-btn:hover { border-color: var(--accent); color: var(--accent-glow); background: rgba(26,158,114,0.07); }

.aoi-panel {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.aoi-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: left;
}
.aoi-select,
.aoi-input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}
.aoi-select:focus,
.aoi-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,158,114,0.14);
}
.aoi-input {
  resize: vertical;
  min-height: 110px;
}

.message-log {
  flex: 1; min-height: 250px; max-height: 400px; overflow-y: auto;
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; scroll-behavior: smooth;
}
.message-log::-webkit-scrollbar { width: 4px; }
.message-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.msg { display: flex; gap: 0.6rem; animation: msgIn 0.22s ease-out; }
@keyframes msgIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
.msg.user { flex-direction: row-reverse; }
.msg.user > div:last-child { display: flex; flex-direction: column; align-items: flex-end; }
.msg-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; margin-top: 2px;
}
.msg.bot  .msg-avatar { background: rgba(26,158,114,0.18); color: var(--accent-glow); }
.msg.user .msg-avatar { background: rgba(34,211,238,0.18); color: var(--accent-teal); }
.msg-bubble {
  max-width: 78%; min-width: 120px; padding: 0.6rem 0.9rem; border-radius: 14px;
  font-size: 0.88rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.msg-bubble.result-bubble { max-width: 96%; }
.msg.bot  .msg-bubble { background: rgba(26,158,114,0.09); border: 1px solid rgba(26,158,114,0.2); border-bottom-left-radius: 4px; color: var(--text); }
.msg.user .msg-bubble { background: var(--grad); border-bottom-right-radius: 4px; color: #fff; }
.msg-time { font-size: 0.68rem; color: var(--muted); margin-top: 0.25rem; display: block; }
.msg.user .msg-time { text-align: right; }
.typing-indicator { display: none; align-items: center; gap: 0.6rem; padding: 0 1.25rem 0.6rem; }
.typing-dots { display: flex; gap: 4px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-glow); opacity: 0.55; animation: tdot 1.2s infinite ease-in-out; }
.typing-dots span:nth-child(2){animation-delay:.2s} .typing-dots span:nth-child(3){animation-delay:.4s}
@keyframes tdot{0%,80%,100%{transform:translateY(0)}40%{transform:translateY(-5px)}}
.typing-label { font-size: 0.74rem; color: var(--muted); }
/* ── WEBSOCKET LIVE STATUS ── */
.ws-status-panel {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.018);
  font-size: 0.74rem;
  color: var(--muted);
  font-family: 'Courier New', monospace;
}

.ws-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ws-connected {
  background: var(--accent-glow);
  box-shadow: 0 0 8px rgba(52,211,153,0.7);
}

.ws-connecting {
  background: var(--accent-warm);
  box-shadow: 0 0 8px rgba(249,115,22,0.7);
}

.ws-disconnected {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,0.65);
}

.ws-request-text {
  margin-left: auto;
  color: var(--accent-teal);
  font-size: 0.68rem;
  white-space: nowrap;
}

.ws-result-box {
  margin: 0.75rem 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(52,211,153,0.24);
  border-radius: 14px;
  background: rgba(26,158,114,0.07);
  text-align: left;
}

.ws-result-box h3 {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  color: var(--accent-glow);
}

.ws-result-box p {
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.ws-result-box code {
  color: var(--accent-teal);
  font-family: 'Courier New', monospace;
}

.ws-result-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0;
}

.ws-result-metric {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
  border-radius: 10px;
  padding: 0.65rem;
}

.ws-result-metric span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.ws-result-metric strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
}

.compose {
  display: flex; gap: 0.75rem; align-items: flex-end;
  padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: rgba(255,255,255,0.01);
}
.compose textarea {
  flex: 1; padding: 0.7rem 0.9rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 0.88rem; font-family: inherit;
  resize: none; min-height: 42px; max-height: 120px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.compose textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,158,114,0.14); }
.compose textarea::placeholder { color: #4a5270; }
.btn-send {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; border: none;
  background: var(--grad); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px rgba(26,158,114,0.35); transition: transform 0.15s, box-shadow 0.15s;
}
.btn-send:hover { transform: scale(1.08); box-shadow: 0 0 22px rgba(26,158,114,0.55); }
.btn-send:active { transform: scale(0.95); }
.btn-send svg { width: 18px; height: 18px; }
.result-bubble { padding: 0 !important; overflow: hidden; background: none !important; border: none !important; }
.result-image { line-height: 0; }
.result-image svg { display: block; width: 100%; border-radius: 10px 10px 0 0; }
.result-code {
  display: block; margin: 0; padding: 0.75rem 0.9rem;
  background: rgba(26,158,114,0.06); border: 1px solid rgba(26,158,114,0.16);
  border-radius: 10px;
  font-family: 'Fira Mono','Cascadia Code',monospace;
  font-size: 0.76rem; line-height: 1.65; color: #6dcca0;
  white-space: pre-wrap; overflow-x: hidden;
}
.result-image + .result-code { border-top: none; border-radius: 0 0 10px 10px; }

/* ── SCIENCE LOGOS ── */
#science {
  min-height: auto; padding: 3.5rem 2rem;
  background: var(--bg); border-top: 1px solid var(--border);
}
.logos-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 1rem 2rem; margin-top: 1.5rem;
}
.logo-pill {
  padding: 0.42rem 1.15rem; border-radius: 8px; border: 1px solid var(--border2);
  background: var(--surface); font-size: 0.77rem; font-weight: 700;
  font-family: 'Courier New', monospace; color: var(--muted); letter-spacing: 0.04em;
  opacity: 0.55; transition: opacity 0.2s;
}
.logo-pill:hover { opacity: 1; }

/* ── FOOTER ── */
footer { padding: 2.5rem 2rem; border-top: 1px solid var(--border); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.82rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-glow); }
.footer-copy { font-size: 0.82rem; color: #505878; }
.footer-note { font-size: 0.75rem; color: #424e6e; font-family: 'Courier New', monospace; }



/* ── RECOMMENDATION 1 — Research Status Notice ──────────────────────────────
   Non-commercial academic disclaimer placed in the footer.
   Styled to match the existing dark-theme design system:
   - surface2 background with a teal-left border (consistent with compliance
     nodes and accent colours used throughout the page)
   - The badge uses the same pattern as .compliance-col-hdr-cell cells
   - Text colour, font-size and monospace detail mirror .footer-note / .why-src
   ─────────────────────────────────────────────────────────────────────────── */
.research-notice-wrap {
  width: 100%;
  max-width: 760px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);   /* teal left accent — echoes compliance hierarchy bars */
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}
.research-notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-glow);
  width: fit-content;
}
.research-notice-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-glow);
  animation: rn-pulse 2.4s ease-in-out infinite;
}
@keyframes rn-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.research-notice {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.65;
}
.research-notice a {
  color: var(--accent-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.research-notice a:hover { color: var(--accent-glow); }




/* ── ANNEX 1 — MULTI-AGENT ARCHITECTURE ── */
#annex1 { background: var(--surface); }

.arch-diagram { overflow-x: auto; margin-top: 2.5rem; }

.arch-outer {
  display: flex;
  border: 1.5px solid #e84393;
  border-radius: 0.5rem;
  min-width: 720px;
  background: transparent;
}

.arch-supervisor-strip {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  border-right: 1.5px solid #e84393;
  padding: 1.5rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f472b6;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arch-inner { flex: 1; overflow: hidden; }

.arch-col-hdrs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface2);
  border-bottom: 1px solid var(--border2);
}

.arch-col-hdr {
  padding: 0.55rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-right: 1px solid var(--border);
  border-top: 3px solid transparent;
}
.arch-col-hdr:last-child { border-right: none; }
.arch-hdr-blue   { color: var(--accent-teal);  border-top-color: var(--accent-teal); }
.arch-hdr-orange { color: var(--accent-warm);  border-top-color: var(--accent-warm); }
.arch-hdr-purple { color: #a78bfa;             border-top-color: #a78bfa; }
.arch-hdr-sky    { color: #38bdf8;             border-top-color: #38bdf8; }

.arch-loop-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.arch-loop-row:last-child { border-bottom: none; }

.arch-cell {
  padding: 0.65rem 0.75rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.arch-cell:last-child { border-right: none; }

.arch-loop-tag {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-glow);
  display: block;
  margin-bottom: 0.2rem;
}

.arch-node {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 0.3rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text);
  line-height: 1.35;
}
.arch-node-sub { font-size: 0.63rem; color: var(--muted); margin-top: 0.15rem; }
.arch-node-muted { color: var(--muted); border-color: var(--border); }
.node-teal   { border-color: var(--accent-teal); color: var(--accent-glow); }
.node-orange { border-color: var(--accent-warm); color: #fb923c; }
.node-purple { border-color: #7c3aed; color: #c4b5fd; }
.node-blue   { border-color: #38bdf8; color: #7dd3fc; }
.node-pink   { border-color: #e84393; color: #f9a8d4; background: rgba(232,67,147,0.05); }

.arch-loop-dots-row .arch-cell { align-items: center; justify-content: center; min-height: 2.5rem; }
.arch-dots { color: var(--border2); font-size: 1rem; letter-spacing: 0.18em; }

.arch-model-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.arch-model-chip {
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.25);
  color: #7dd3fc;
  border-radius: 0.25rem;
  padding: 0.18rem 0.42rem;
  font-size: 0.63rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── ANNEX 2 — COMPLIANCE DISTRIBUTION ── */
#annex2 { background: var(--bg); }

.compliance-wrap { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 2.5rem; }

.compliance-hierarchy { display: flex; flex-direction: column; gap: 0.4rem; }
.compliance-level {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 0.3rem;
}
.compliance-city     { width: 36%; border: 1.5px solid var(--border2); color: var(--text); background: var(--surface); }
.compliance-regional { width: 65%; border: 2px solid #f97316; color: #fb923c; background: rgba(249,115,22,0.04); }
.compliance-global   { width: 100%; border: 2px solid #e84393; color: #f472b6; background: rgba(232,67,147,0.04); }

.compliance-cols {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.6fr;
  gap: 1.25rem;
}

.compliance-col-hdr-cell {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 2px solid;
}
.col-city .compliance-col-hdr-cell     { color: var(--muted);  border-color: var(--border2); }
.col-regional .compliance-col-hdr-cell { color: #fb923c;       border-color: #f97316; }
.col-global .compliance-col-hdr-cell   { color: #f472b6;       border-color: #e84393; }

.compliance-col-entry {
  border: 1px dashed var(--border2);
  border-radius: 0.3rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  color: var(--text);
  margin-bottom: 0.45rem;
  line-height: 1.4;
}

.agent-roles-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  border: 1.5px solid #e84393;
  border-radius: 0.6rem;
  padding: 1.4rem;
  background: var(--surface);
}

.agent-role-card {
  flex: 1;
  min-width: 130px;
  border-radius: 0.45rem;
  padding: 0.9rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}
.arc-supervisor  { border: 1.5px solid #e84393; background: rgba(232,67,147,0.04); }
.arc-coordinator { border: 1.5px solid var(--accent-teal); background: rgba(23,158,114,0.04); }
.arc-worker      { border: 1.5px solid var(--accent-warm); background: rgba(249,115,22,0.04); }
.arc-resources   { border: 1.5px dashed var(--border2); background: var(--surface2); }

.agent-role-icon-bg {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.agent-role-type { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.agent-role-desc { font-size: 0.72rem; color: var(--muted); }

.agent-role-resources-items { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; width: 100%; }
.agent-role-res-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.28rem 0.35rem;
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
}
.arc-arrow { color: var(--muted); font-size: 1.1rem; flex-shrink: 0; }

/* ── RESPONSIVE ── */
@media(max-width:900px){ .nav-links { display: none; } nav { padding: 0.8rem 1.25rem; } }
@media(max-width:700px){
  section { padding: 4rem 1.25rem 3rem; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
}

/* ── GEE TILE MAP ── */
#gee-map-container {
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  transition: opacity 0.4s ease;
}

#gee-map {
  width: 100%;
  height: 100%;
  background: #0b1710;
}

/* Leaflet attribution */
.leaflet-control-attribution {
  font-size: 10px !important;
  background: rgba(0,0,0,0.5) !important;
  color: #94a3b8 !important;
}