/* ====================================================
   CIDADÃO EM FOCO — style.css
   Paleta: Verde, Amarelo e Azul do Brasil
   ==================================================== */

/* ── Variables ───────────────────────────────────────── */
:root {
  /* Cores da bandeira do Brasil */
  --green:        #009C3B;   /* verde bandeira */
  --green-dark:   #007A2E;
  --green-mid:    #00B844;
  --green-light:  #D4F0E0;
  --green-xlight: #EBF9F1;

  --yellow:       #FFDF00;   /* amarelo bandeira */
  --yellow-dark:  #C9AE00;
  --yellow-mid:   #FFE94D;
  --yellow-light: #FFFBE0;

  --blue:         #002776;   /* azul bandeira */
  --blue-mid:     #003FA3;
  --blue-light:   #D6E4FF;
  --blue-xlight:  #EEF4FF;

  /* Fundos e superfícies */
  --bg:           #F4FBF7;
  --bg-2:         #E6F4EC;
  --bg-3:         #CDEBD9;
  --card-bg:      #FFFFFF;
  --border:       #B8DEC8;
  --border-light: #D8EEE2;
  --white:        #FFFFFF;

  /* Texto */
  --text-dark:    #001A50;
  --text-mid:     #0A2F6B;
  --text-light:   #3A5A8A;
  --text-muted:   #7090B0;

  /* Sombras */
  --shadow-sm:    0 2px 8px  rgba(0, 39, 118, .08);
  --shadow-md:    0 6px 20px rgba(0, 39, 118, .11);
  --shadow-lg:    0 16px 48px rgba(0, 39, 118, .15);

  /* Misc */
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    22px;
  --radius-xl:    32px;
  --font-display: 'Rawline', 'Raleway', system-ui, -apple-system, sans-serif;
  --font-body:    'Rawline', 'Raleway', system-ui, -apple-system, sans-serif;
  --ease:         cubic-bezier(.4, 0, .2, 1);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; }
body  {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a        { color: inherit; text-decoration: none; }
button   { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
ul, ol   { list-style: none; }
input, textarea { font-family: var(--font-body); }

/* ── Header ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green);
  box-shadow: 0 2px 12px rgba(0, 39, 118, .25);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img {
  height: 52px;
  width: auto;
  background: var(--white);
  border-radius: 8px;
  padding: 4px 12px;
  display: block;
}
.emergency-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.strip-label {
  font-size: .75rem;
  color: rgba(255,255,255,.75);
  font-weight: 500;
  letter-spacing: .02em;
}
.strip-num {
  font-size: .8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,.15);
  color: var(--yellow);
  border: 1px solid rgba(255,255,255,.2);
  transition: background .2s;
}
.strip-num:hover { background: rgba(255,255,255,.28); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 24px 60px;
  background: linear-gradient(160deg, var(--white) 0%, var(--bg) 55%, var(--green-xlight) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: transparent;
  border: none;
  border-left: 3px solid var(--green);
  padding: 2px 0 2px 12px;
  border-radius: 0;
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--blue);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.hero-title em {
  font-style: normal;
  color: var(--green);
  font-weight: 800;
  display: block;
}
.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-mid);
  margin-bottom: 36px;
  line-height: 1.65;
}
.hero-disclaimer {
  margin-top: 16px;
  font-size: .78rem;
  color: var(--text-muted);
}

/* Orbs decorativas — cores do Brasil */
.hero-visual { position: absolute; inset: 0; pointer-events: none; }
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .22;
}
.hero-orb-1 {
  width: 480px; height: 480px;
  top: -160px; right: -80px;
  background: var(--yellow);
}
.hero-orb-2 {
  width: 320px; height: 320px;
  bottom: -100px; left: -80px;
  background: var(--green-mid);
  opacity: .18;
}
.hero-orb-3 {
  width: 220px; height: 220px;
  top: 40%; right: 22%;
  background: var(--blue-light);
  opacity: .35;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: var(--radius-xl);
  background: var(--green);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 4px 20px rgba(0, 156, 59, .40);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 156, 59, .48);
}
.btn-primary:active  { transform: translateY(0); }
.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.btn-full { width: 100%; justify-content: center; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-mid);
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 28px;
  transition: all .2s;
}
.btn-back:hover { border-color: var(--green); color: var(--green); }
.btn-link {
  font-size: .8rem;
  color: var(--green);
  text-decoration: underline;
  cursor: pointer;
}

/* ── Cards Section ───────────────────────────────────── */
.cards-section {
  padding: 40px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
}
.cards-header { text-align: center; margin-bottom: 36px; }
.cards-title  {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--blue);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.cards-subtitle { font-size: .95rem; color: var(--text-light); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1.5px solid var(--border-light);
  text-align: left;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--green);
}
.card:hover .card-arrow { opacity: 1; transform: translateX(0); }
.card.card-urgent {
  border-color: rgba(0, 156, 59, .25);
  background: linear-gradient(135deg, var(--card-bg), var(--green-xlight));
}
.card-emoji { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: -0.01em;
}
.card p {
  font-size: .875rem;
  color: var(--text-light);
  line-height: 1.5;
  flex: 1;
}
.card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 1.1rem;
  color: var(--green);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .25s, transform .25s;
}

/* ── Results Page ────────────────────────────────────── */
.results-page { padding: 40px 24px 60px; }
.results-inner { max-width: 900px; margin: 0 auto; }

/* Base result card */
.result-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
  animation: fadeUp .4s var(--ease) both;
}
.result-card:nth-child(2) { animation-delay: .10s; }
.result-card:nth-child(3) { animation-delay: .15s; }
.result-card:nth-child(4) { animation-delay: .20s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Acolhimento card */
.card-welcome {
  border-color: var(--green);
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--green-xlight) 100%);
}
.card-welcome-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.urgency-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.urgency-alta  { background: rgba(198, 28, 28, .1); color: #B71C1C; }
.urgency-media { background: var(--yellow-light); color: var(--yellow-dark); border: 1px solid var(--yellow-mid); }
.urgency-baixa { background: var(--green-xlight); color: var(--green-dark); }
.categoria-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  background: var(--blue-xlight);
  color: var(--blue-mid);
}
.card-welcome h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.welcome-message {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-style: italic;
}
.resumo-situacao {
  font-size: .9rem;
  color: var(--text-mid);
  padding: 12px 16px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--green);
}

/* Result grid */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.card-rights h3, .card-steps h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--yellow);
}
.rights-list li, .steps-list li {
  padding: 8px 0;
  padding-left: 22px;
  border-bottom: 1px solid var(--border-light);
  font-size: .9rem;
  color: var(--text-mid);
  line-height: 1.55;
  position: relative;
}
.rights-list li:last-child, .steps-list li:last-child { border-bottom: none; }
.rights-list li::before {
  content: '⚖';
  position: absolute; left: 0;
  font-size: .75rem;
  top: 10px;
}
.steps-list { counter-reset: steps; }
.steps-list li { counter-increment: steps; padding-left: 30px; }
.steps-list li::before {
  content: counter(steps);
  position: absolute; left: 0;
  width: 20px; height: 20px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 8px;
}

/* Services card */
.card-services h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--yellow);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.service-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border-light);
  transition: border-color .2s, box-shadow .2s;
}
.service-item:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.service-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: var(--green-xlight);
}
.service-info { flex: 1; min-width: 0; }
.service-info strong {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 4px;
  line-height: 1.3;
}
.service-info p { font-size: .8rem; color: var(--text-light); line-height: 1.4; margin-bottom: 6px; }
.service-tel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--green-dark);
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--green-xlight);
  border: 1px solid var(--border);
  transition: background .2s;
}
.service-tel:hover { background: var(--green-light); }

/* ── Nearby List ─────────────────────────────────────── */
.nearby-list-section {
  background: var(--card-bg);
  border-top: 3px solid var(--green);
}
.nearby-list-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 24px 24px;
}
.nearby-list-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 4px;
}
.nearby-list-subtitle {
  font-size: .84rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.nearby-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nearby-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: all .2s var(--ease);
}
.nearby-item:hover {
  border-color: var(--green);
  background: var(--green-xlight);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.nearby-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-light);
}
.nearby-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nearby-info strong {
  font-size: .95rem;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nearby-type {
  font-size: .8rem;
  color: var(--green-dark);
  font-weight: 500;
}
.nearby-address {
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nearby-arrow {
  flex-shrink: 0;
  color: var(--green);
  opacity: .6;
  transition: opacity .2s, transform .2s;
}
.nearby-fallback {
  border-style: dashed;
  opacity: .85;
}
.nearby-empty-msg {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--yellow-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--yellow-dark);
}
.nearby-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-size: .88rem;
  color: var(--text-muted);
}
.nearby-item:hover .nearby-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* ── Map Section ─────────────────────────────────────── */
.map-section {
  background: var(--bg-2);
  padding: 0 24px 40px;
}
.map-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 0 16px;
}
.map-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 4px;
}
.map-location { font-size: .875rem; color: var(--text-light); }
.map-container {
  max-width: 900px;
  margin: 0 auto;
}
#map {
  height: 420px;
  width: 100%;
  z-index: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* Map markers */
.user-marker {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.service-marker {
  width: 36px; height: 36px;
  border-radius: 50% 50% 50% 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 3px 8px rgba(0,0,0,.25);
  border: 2px solid rgba(255,255,255,.85);
  transform: rotate(-5deg);
}
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
}
.map-popup { font-family: var(--font-body); min-width: 180px; }
.map-popup strong { display: block; font-size: .9rem; margin-bottom: 4px; color: var(--blue); }
.map-popup p      { font-size: .82rem; color: var(--text-mid); margin-bottom: 4px; }
.map-popup small  { font-size: .75rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
.map-popup a      { font-size: .82rem; font-weight: 700; color: var(--green); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--blue);
  color: rgba(255,255,255,.8);
  padding: 48px 24px 32px;
}
.footer-inner { max-width: 900px; margin: 0 auto; }
.footer-numbers h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 20px;
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
.num-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  transition: background .2s;
}
.num-card:hover { background: rgba(255,255,255,.16); }
.num-digit {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--yellow);
  line-height: 1;
}
.num-label {
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  text-align: center;
  line-height: 1.3;
}
/* Footer collab */
.footer-collab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 28px;
}
.collab-heading {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--yellow);
  letter-spacing: .01em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.collab-institution {
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 4px;
  font-style: italic;
}
.collab-group {
  font-size: .82rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 3px;
}
.collab-group strong { color: var(--white); }
.collab-advisor {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 14px;
  font-style: italic;
}
.collab-members {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.collab-members li {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.collab-members li:last-child { border-bottom: none; }
.ra {
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  white-space: nowrap;
  flex-shrink: 0;
}
.ra-leader {
  font-size: .72rem;
  color: var(--yellow);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
}
.team-members {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.team-members li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  border-left: 2px solid var(--yellow);
}
.team-members strong {
  font-size: .9rem;
  color: var(--white);
  font-weight: 600;
}
.team-members span {
  font-size: .78rem;
  color: rgba(255,255,255,.5);
}

.footer-disclaimer {
  font-size: .82rem;
  line-height: 1.7;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.06);
  border-left: 3px solid var(--yellow);
  margin-bottom: 20px;
  color: rgba(255,255,255,.7);
}
.footer-disclaimer strong { color: var(--yellow-mid); }
.footer-credits {
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.3);
}
.footer-credits span { color: var(--yellow); }

/* ── Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 39, 118, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.modal-overlay.visible { opacity: 1; }
.modal-overlay.visible .modal { transform: translateY(0) scale(1); }
.modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.98);
  transition: transform .35s var(--ease);
  border-top: 4px solid var(--green);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text-light);
  transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--bg-3); color: var(--blue); }
.modal-icon  { font-size: 2.5rem; margin-bottom: 12px; line-height: 1; }
.modal h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--blue);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.modal-subtitle {
  font-size: .9rem;
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.55;
}

/* Form fields */
.field-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 8px;
}
.field-hint { font-size: .78rem; font-weight: 400; color: var(--text-muted); }
.field-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-dark);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 156, 59, .15);
}

/* Location section */
.location-section { margin-bottom: 18px; }
.location-detected {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: .82rem;
  color: var(--green-dark);
  font-weight: 500;
}
.location-detected svg { flex-shrink: 0; }

/* Textarea */
.textarea-wrapper { margin-bottom: 20px; }
.problem-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-dark);
  font-size: .95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.problem-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 156, 59, .15);
}
.problem-textarea::placeholder { color: var(--text-muted); }
.textarea-hint { margin-top: 6px; font-size: .75rem; color: var(--text-muted); }

/* Loading */
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { height: 54px; }
  .logo-img     { height: 40px; padding: 3px 10px; }
  .strip-label  { display: none; }
  .strip-num    { font-size: .75rem; padding: 2px 7px; }

  .hero { padding: 60px 20px 40px; min-height: unset; }
  .hero-orb-1 { width: 300px; height: 300px; }

  .cards-section  { padding: 32px 16px 60px; }
  .cards-grid     { grid-template-columns: 1fr; }
  .card           { flex-direction: row; align-items: center; gap: 14px; }
  .card-emoji     { font-size: 1.5rem; margin-bottom: 0; }
  .card h3        { font-size: .95rem; }

  .result-grid  { grid-template-columns: 1fr; }
  .results-page { padding: 24px 16px 40px; }
  .result-card  { padding: 20px; }
  .services-grid { grid-template-columns: 1fr; }

  .modal   { padding: 28px 20px 24px; max-height: 95vh; }
  .modal h2 { font-size: 1.3rem; }

  .hero-actions  { flex-direction: column; gap: 10px; }
  .btn-secondary { width: 100%; justify-content: center; }

  .rights-grid   { grid-template-columns: 1fr; }
  .rights-quote  { padding: 16px 20px; font-size: 1rem; }
  .rights-connections-section, .rights-summary-section { padding: 20px; }
  .connections-grid { grid-template-columns: 1fr; }

  .numbers-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-collab { grid-template-columns: 1fr; gap: 24px; }
  #map { height: 300px; }
  .map-section { padding: 0 16px 32px; }
}

@media (max-width: 420px) {
  .emergency-strip .strip-num:nth-child(n+5) { display: none; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Hero Actions ────────────────────────────────────── */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--blue);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .01em;
  border: 2px solid var(--blue);
  transition: all .2s var(--ease);
}
.btn-secondary:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 39, 118, .25);
}
.btn-secondary:active { transform: translateY(0); }

/* ── Rights Page ─────────────────────────────────────── */
.rights-page { padding: 40px 24px 80px; }
.rights-inner { max-width: 960px; margin: 0 auto; }

.rights-header { text-align: center; margin-bottom: 32px; }
.rights-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 14px 0 12px;
}
.rights-title em { font-style: normal; color: var(--green); font-weight: 800; display: block; }
.rights-subtitle { font-size: 1rem; color: var(--text-light); }

.rights-quote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--blue-mid);
  text-align: center;
  padding: 20px 32px;
  border-radius: var(--radius-lg);
  background: var(--blue-xlight);
  border-left: 4px solid var(--blue);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Rights grid */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.right-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow .25s, border-color .25s;
}
.right-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green);
}
.right-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.right-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.right-header-text h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.right-base {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
}
.right-section h4, .right-laws h4 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 8px;
}
.right-list, .laws-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.right-list li {
  font-size: .875rem;
  color: var(--text-mid);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.right-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: .8rem;
}
.laws-list li {
  font-size: .82rem;
  color: var(--text-light);
  padding-left: 14px;
  position: relative;
  line-height: 1.45;
}
.laws-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--blue-mid);
  font-size: .75rem;
}
.right-affects {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}
.affects-label {
  font-size: .76rem;
  font-weight: 600;
  color: #B71C1C;
  display: block;
  margin-bottom: 8px;
  letter-spacing: .01em;
}
.affects-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.right-chip {
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(198, 28, 28, .08);
  color: #B71C1C;
  border: 1px solid rgba(198, 28, 28, .2);
}
.right-laws {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

/* Connections section */
.section-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--blue);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.connections-intro {
  font-size: .95rem;
  color: var(--text-light);
  margin-bottom: 20px;
}
.rights-connections-section {
  background: var(--card-bg);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.connections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.connection-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}
.conn-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.connection-item p { font-size: .875rem; color: var(--text-mid); line-height: 1.5; }
.connection-item strong { color: var(--blue); }

/* Summary section */
.rights-summary-section {
  background: linear-gradient(135deg, var(--card-bg), var(--green-xlight));
  border: 1.5px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}
.summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.summary-chip {
  font-size: .9rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  background: var(--green);
  color: var(--white);
}

/* ── Mic Button ──────────────────────────────────────── */
.mic-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.btn-mic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-mid);
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s;
}
.btn-mic:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-xlight);
}
.btn-mic.recording {
  border-color: #C0392B;
  color: #C0392B;
  background: rgba(192,57,43,.08);
  animation: pulse-mic 1.2s ease-in-out infinite;
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,.35); }
  50%       { box-shadow: 0 0 0 7px rgba(192,57,43,0); }
}
.mic-status {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Location Loading ────────────────────────────────── */
.location-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: .82rem;
  color: var(--text-muted);
}
.spinner-sm {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* ── Utilities ───────────────────────────────────────── */
[hidden] { display: none !important; }
.leaflet-control-zoom { margin-top: 12px !important; }

/* ── Login Screen ─────────────────────────────────── */
#login-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .4s;
}
#login-screen.fade-out { opacity: 0; pointer-events: none; }

.login-box {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; width: 100%; max-width: 380px; padding: 32px 24px;
}
.login-logo { width: 300px; max-width: 80vw; }
.login-tagline {
  text-align: center; font-size: .95rem; color: var(--text-mid);
  line-height: 1.6; margin: 0;
}
#login-form { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.login-field { width: 100%; }
.login-field input {
  width: 100%; padding: 12px 16px; box-sizing: border-box;
  border: 1.5px solid #dde; border-radius: var(--radius-md);
  font-size: 1rem; font-family: inherit;
  outline: none; transition: border-color .2s;
}
.login-field input:focus { border-color: var(--green); }
.login-error { color: #c0392b; font-size: .875rem; margin: 0; }
.login-btn {
  width: 100%; padding: 13px;
  background: var(--green); color: #fff;
  border: none; border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
.login-btn:hover { background: var(--green-dark); }
