/* Módulo 2 — Espécies primárias */
.m2 {
  --m2-ink: #0f1f18;
  --m2-muted: #5a7268;
  --m2-line: rgba(15, 31, 24, 0.1);
  --m2-green: #1a6b4a;
  --m2-soft: #e8f5ee;
  --m2-gold: #b08a3c;
  --m2-panel: #1a6b4a;
  color: var(--m2-ink);
  display: grid;
  gap: 0;
}
.m2 * { box-sizing: border-box; }
.m2 .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.m2 em { font-style: italic; }

.m2-progress {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  gap: 6px;
  padding: 10px 0 12px;
  background: linear-gradient(#fff 70%, rgba(255,255,255,0));
}
.m2-progress-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--m2-green);
}
.m2-progress-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(26, 107, 74, 0.12);
  overflow: hidden;
}
.m2-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--m2-green), #2f8f64);
  border-radius: inherit;
  transition: width 0.2s ease;
}

.m2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0;
  margin: 0 0 22px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--m2-panel);
  color: #f3faf6;
  box-shadow: 0 16px 40px rgba(15, 31, 24, 0.14);
}
.m2-hero-media { min-height: 240px; background: #e8f5ee; }
.m2-hero-media img {
  width: 100%; height: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}
.m2-hero-body {
  padding: clamp(18px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.m2-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fd9b8;
}
.m2-hero h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}
.m2-hero-lead {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(243,250,246,.9);
}
.m2-hero-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(243,250,246,.78);
}
.m2-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.m2-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 0.78rem;
  font-weight: 700;
}

.m2-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 10px 0;
  position: sticky;
  top: 42px;
  z-index: 4;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px);
}
.m2-rail a {
  text-decoration: none;
  color: var(--m2-ink);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--m2-line);
  background: #fff;
}
.m2-rail a:hover,
.m2-rail a.is-active {
  background: var(--m2-soft);
  border-color: rgba(26,107,74,.35);
  color: var(--m2-green);
}

.m2-section {
  margin: 0 0 28px;
  padding: 22px 0;
  border-top: 1px solid var(--m2-line);
}
.m2-section--tint {
  margin-left: -12px;
  margin-right: -12px;
  padding: 22px 12px;
  border-radius: 18px;
  border-top: 0;
  background: #f4fbf7;
}
.m2-section > .m2-kicker { color: var(--m2-green); display: block; margin-bottom: 6px; }
.m2-section h3 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.m2-prose {
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--m2-ink);
}
.m2-prose p { margin: 0 0 1em; }
.m2-prose p:last-child { margin-bottom: 0; }

.m2-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: start;
}
.m2-objectives {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  counter-reset: m2o;
}
.m2-objectives li {
  counter-increment: m2o;
  position: relative;
  display: block;
  padding: 12px 14px 12px 56px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--m2-line);
  line-height: 1.45;
}
.m2-objectives li::before {
  content: counter(m2o);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--m2-green);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.m2-box {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border-left: 4px solid var(--m2-green);
  background: var(--m2-soft);
}
.m2-box--warn { border-left-color: #c47b2b; background: #fff7ec; }
.m2-box--gold { border-left-color: var(--m2-gold); background: #fbf6ea; }
.m2-box strong { display: block; margin-bottom: 4px; font-size: 0.84rem; letter-spacing: 0.04em; text-transform: uppercase; }
.m2-box p { margin: 0; font-size: 0.95rem; line-height: 1.55; }

.m2-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
}
.m2-flow strong {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--m2-line);
  font-size: 0.82rem;
}
.m2-flow .m2-arrow {
  color: var(--m2-green);
  font-weight: 800;
  border: 0;
  background: transparent;
  padding: 0 2px;
}

.m2-species {
  margin: 28px 0 8px;
  padding: 18px 18px 20px;
  border-radius: 18px;
  background: var(--m2-panel);
  color: #f3faf6;
}
.m2-species .m2-kicker { color: #9fd9b8; }
.m2-species h3 { margin: 4px 0 6px; color: #fff; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.m2-species p { margin: 0; color: rgba(243,250,246,.82); line-height: 1.5; }

.m2-hotspot {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 14px;
  margin: 16px 0;
  align-items: start;
}
.m2-hotspot-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  margin-inline: auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--m2-line);
  background: #e8f5ee;
  line-height: 0;
  box-shadow: 0 8px 24px rgba(18, 38, 28, 0.06);
}
.m2-hotspot-stage img {
  width: 100%;
  height: auto;
  display: block;
  background: #e8f5ee;
  /* Foto inteira + escala uniforme: preserva os % calibrados */
}
.m2-hotspot-btn {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.92);
  background: rgba(26, 107, 74, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
  pointer-events: auto;
  opacity: 0.88;
}
.m2-hotspot-btn[aria-pressed="true"] {
  background: var(--m2-gold);
  color: #1a1408;
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.4), 0 4px 14px rgba(0,0,0,.2);
}
.m2-hotspot-panel {
  padding: 16px 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--m2-line);
}
.m2-hotspot-panel .m2-hint {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--m2-green);
}
.m2-hotspot-panel h4 { margin: 0 0 8px; font-size: 1.1rem; }
.m2-hotspot-panel p { margin: 0; color: var(--m2-muted); line-height: 1.55; font-size: 0.95rem; }
.m2-hot-crop {
  margin-top: 12px;
  position: relative;
  width: 100%;
  aspect-ratio: 1.12;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--m2-line);
  background: #e8f5ee;
  --cx: 0.5;
  --cy: 0.5;
  --zoom: 2.85;
}
.m2-hot-crop img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: calc(var(--cx) * 100%) calc(var(--cy) * 100%);
  transform: scale(var(--zoom));
  transform-origin: calc(var(--cx) * 100%) calc(var(--cy) * 100%);
  pointer-events: none;
  user-select: none;
}
.m2-hot-crop::after {
  display: none;
}
.m2-hot-crop.is-independent {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: auto;
  min-height: 180px;
  padding: 10px;
}
.m2-hot-crop.is-independent img {
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  object-position: center;
  transform: none;
  border-radius: 8px;
}
.m2-hot-crop.is-independent::after {
  display: none;
}
.m2-hot-crop-label {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--m2-muted);
  line-height: 1.35;
  text-align: center;
}

.m2-ph {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed rgba(26,107,74,.35);
  background: #f4fbf7;
  color: var(--m2-muted);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.45;
}
.m2-ph small { display: block; margin-top: 6px; opacity: 0.75; font-size: 0.75rem; }

.m2-figure { margin: 14px 0; }
.m2-figure img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--m2-line);
  background: #e8f5ee;
}
.m2-figure figcaption {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--m2-muted);
  line-height: 1.45;
}

.m2-zoom-frame {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #e8f5ee;
}
.m2-zoom-frame img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
  border: 0;
  border-radius: 14px;
  cursor: zoom-in;
}
.m2-figure.is-zoomable,
.m2 figure.is-zoomable {
  cursor: zoom-in;
}
.m2-zoom-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #143d2c;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 31, 24, 0.12);
  box-shadow: 0 4px 12px rgba(8, 14, 11, 0.12);
  pointer-events: none;
}

.m2-dim {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.m2-dim article {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--m2-line);
}
.m2-dim strong { display: block; margin-bottom: 4px; }

.m2-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.m2-compare article {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--m2-line);
  background: #fff;
}
.m2-compare--sit { border-top: 3px solid var(--m2-green); }
.m2-compare--rhy { border-top: 3px solid var(--m2-gold); }
.m2-compare h4 { margin: 0 0 6px; font-size: 1rem; }
.m2-compare p { margin: 0; color: var(--m2-muted); font-size: 0.92rem; line-height: 1.45; }

.m2-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 14px;
  border: 1px solid var(--m2-line);
  background: #fff;
}
.m2-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.9rem;
}
.m2-table th,
.m2-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--m2-line);
  vertical-align: top;
  line-height: 1.45;
}
.m2-table th {
  background: var(--m2-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.m2-table tr:last-child td { border-bottom: 0; }

.m2-acc { display: grid; gap: 8px; margin: 14px 0; }
.m2-acc details {
  border-radius: 14px;
  border: 1px solid var(--m2-line);
  background: #fff;
  padding: 0 14px;
}
.m2-acc summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 750;
  list-style: none;
}
.m2-acc summary::-webkit-details-marker { display: none; }
.m2-acc summary::after {
  content: "+";
  float: right;
  color: var(--m2-green);
  font-weight: 800;
}
.m2-acc details[open] summary::after { content: "–"; }
.m2-acc details p {
  margin: 0 0 14px;
  color: var(--m2-muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.m2-formula {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--m2-soft);
}
.m2-formula span {
  display: inline-flex;
  padding: 8px 11px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--m2-line);
  font-size: 0.82rem;
  font-weight: 700;
}
.m2-formula .m2-op { border: 0; background: transparent; color: var(--m2-green); font-size: 1.1rem; }

.m2-quizlike {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  display: grid;
  gap: 10px;
  counter-reset: m2q;
}
.m2-quizlike li {
  counter-increment: m2q;
  padding: 12px 14px 12px 48px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--m2-line);
  position: relative;
  line-height: 1.45;
}
.m2-quizlike li::before {
  content: counter(m2q);
  position: absolute;
  left: 12px; top: 12px;
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--m2-soft);
  color: var(--m2-green);
  font-weight: 800;
  font-size: 0.8rem;
}

.m2-cards-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.m2-cards-4 article {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--m2-line);
}
.m2-cards-4 strong { display: block; margin-bottom: 4px; }
.m2-cards-4 p { margin: 0; font-size: 0.88rem; color: var(--m2-muted); line-height: 1.45; }

.m2-review {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.m2-review div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--m2-line);
}
.m2-review strong { color: var(--m2-green); font-size: 0.92rem; }

.m2-map {
  margin: 14px 0;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--m2-line);
  font-size: 0.92rem;
  line-height: 1.55;
}
.m2-map ul { margin: 6px 0 6px 1.1rem; padding: 0; color: var(--m2-muted); }
.m2-map > strong { color: var(--m2-green); }

.m2-next {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--m2-soft);
  border: 1px solid rgba(26,107,74,.18);
}
.m2-next p { margin: 0 0 12px; line-height: 1.55; }
.m2-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.m2-cta-note { font-size: 0.88rem; color: var(--m2-muted); }

.m2-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.m2-gallery figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--m2-line);
  background: #fff;
}
.m2-gallery img,
.m2-gallery .m2-ph {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #e8f5ee;
  max-height: 220px;
}
.m2-gallery figcaption {
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--m2-muted);
  line-height: 1.4;
}

.m2-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
}
.m2-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .m2-reveal { opacity: 1; transform: none; transition: none; }
  .m2-progress-bar { transition: none; }
}

@media (max-width: 960px) {
  .m2-hero,
  .m2-grid-2,
  .m2-hotspot,
  .m2-compare,
  .m2-cards-4,
  .m2-dim,
  .m2-gallery { grid-template-columns: 1fr 1fr; }
  .m2-hero { grid-template-columns: 1fr; }
  .m2-hotspot { grid-template-columns: 1fr; }
  .m2-cards-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .m2-rail { position: static; }
  .m2-progress { position: static; }
  .m2-grid-2,
  .m2-compare,
  .m2-cards-4,
  .m2-dim,
  .m2-gallery { grid-template-columns: 1fr; }
  .m2-hotspot-btn {
    min-width: 24px;
    min-height: 24px;
    font-size: 0.65rem;
  }
}
