/* Módulo 6 — Qualidade tecnológica (milho-pipoca) — sem sticky rail */
.pm6 {
  --pm6-ink: #0f1f18;
  --pm6-muted: #5a7268;
  --pm6-line: rgba(15, 31, 24, 0.12);
  --pm6-green: #1a6b4a;
  --pm6-green-soft: #e8f5ee;
  --pm6-gold: #b08a3c;
  --pm6-gold-soft: #f7f0e2;
  --pm6-cream: #f7f5f0;
  --pm6-panel: #143d2c;
  --pm6-warn: #fff8f0;
  color: var(--pm6-ink);
  display: grid;
  gap: 0;
}

.pm6 * { box-sizing: border-box; }

.pm6-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.pm6-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--pm6-green-soft);
  color: var(--pm6-green);
  border: 1px solid rgba(26, 107, 74, 0.18);
}

.pm6-chip--gold {
  background: var(--pm6-gold-soft);
  color: #7a5c1e;
  border-color: rgba(176, 138, 60, 0.28);
}

.pm6 > h2 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  color: var(--pm6-ink);
}

.pm6-sub {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--pm6-muted);
  max-width: 62ch;
}

.pm6-time {
  margin: 0 0 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pm6-green);
}

.pm6-lede {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--pm6-muted);
  max-width: 68ch;
  margin: 0 0 18px;
}

.pm6-main {
  display: grid;
  gap: 36px;
  min-width: 0;
}

.pm6-section {
  scroll-margin-top: 96px;
}

.pm6-section h3 {
  margin: 0 0 12px;
  font-size: clamp(1.18rem, 2.2vw, 1.4rem);
  line-height: 1.25;
  color: var(--pm6-ink);
}

.pm6-section h4 {
  margin: 16px 0 8px;
  font-size: 1.02rem;
  color: var(--pm6-green);
}

.pm6-section p {
  margin: 0 0 14px;
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--pm6-ink);
  max-width: 68ch;
}

.pm6-section p.pm6-muted {
  color: var(--pm6-muted);
}

.pm6-kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pm6-gold);
  margin-bottom: 8px;
  font-weight: 800;
}

.pm6-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.pm6-reveal.is-in {
  opacity: 1;
  transform: none;
}

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

.pm6-box {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--pm6-line);
  background: #fff;
}

.pm6-box--guide {
  background: var(--pm6-gold-soft);
  border-color: rgba(176, 138, 60, 0.28);
}

.pm6-box--key {
  background: var(--pm6-green-soft);
  border-color: rgba(26, 107, 74, 0.22);
}

.pm6-box--warn {
  background: var(--pm6-warn);
  border-color: rgba(176, 100, 40, 0.25);
}

.pm6-box--strong {
  background: var(--pm6-panel);
  color: #f3faf6;
  border-color: var(--pm6-panel);
}

.pm6-box--strong .pm6-kicker,
.pm6-box--strong p { color: #f3faf6; }
.pm6-box--strong p { opacity: 0.92; }

.pm6-box p:last-child { margin-bottom: 0; }

.pm6-box > strong.pm6-q {
  display: block;
  font-size: 1.05rem;
  line-height: 1.45;
  margin-bottom: 10px;
  color: var(--pm6-ink);
}

.pm6-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.pm6-card {
  margin: 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--pm6-line);
  background: #fff;
}

.pm6-card h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--pm6-green);
}

.pm6-card > p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--pm6-muted);
  max-width: none;
}

.pm6-card ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--pm6-ink);
}

.pm6-card ul li { margin-bottom: 4px; }

.pm6-neq {
  margin: 16px 0;
  padding: 18px 20px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(135deg, var(--pm6-green-soft), var(--pm6-gold-soft));
  border: 1px solid rgba(26, 107, 74, 0.2);
}

.pm6-neq strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--pm6-green);
  margin-bottom: 8px;
}

.pm6-neq p {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 0.95rem;
  color: var(--pm6-muted);
}

.pm6-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0;
  padding: 18px 14px;
  border-radius: 16px;
  background: var(--pm6-cream);
  border: 1px solid var(--pm6-line);
}

.pm6-flow-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 110px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--pm6-line);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.25;
  color: var(--pm6-ink);
}

.pm6-flow-node--end {
  background: var(--pm6-green);
  color: #fff;
  border-color: var(--pm6-green);
}

.pm6-flow-ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pm6-green-soft);
  color: var(--pm6-green);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.pm6-flow-node--end .pm6-flow-ico {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.pm6-flow-arrow {
  color: var(--pm6-muted);
  font-weight: 700;
  font-size: 1.15rem;
  flex: 0 0 auto;
}

.pm6-formula {
  margin: 18px 0;
  padding: 22px 20px;
  border-radius: 16px;
  text-align: center;
  background: var(--pm6-panel);
  color: #f3faf6;
  box-shadow: 0 14px 36px rgba(15, 31, 24, 0.16);
}

.pm6-formula .pm6-kicker { color: var(--pm6-gold); }

/* .pm6-section p usa --pm6-ink; forçar texto claro no card escuro */
.pm6-formula p,
.pm6-formula .pm6-formula-eq,
.pm6-formula .pm6-formula-eq span,
.pm6-formula .pm6-formula-unit {
  color: #f3faf6;
}

.pm6-formula-eq {
  margin: 10px 0 6px;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 800;
  line-height: 1.45;
}

.pm6-formula-eq span {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.9;
}

.pm6-formula-unit {
  margin: 8px 0 0;
  font-size: 0.88rem;
  opacity: 0.85;
  color: #f3faf6;
}

.pm6-example {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed rgba(26, 107, 74, 0.35);
}

.pm6-example .pm6-calc {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--pm6-green-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--pm6-ink);
}

.pm6-factors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.pm6-factor {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--pm6-line);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--pm6-ink);
}

.pm6-factor::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--pm6-green);
  vertical-align: middle;
}

.pm6-figure {
  margin: 18px 0 10px;
}

.pm6-figure-media {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--pm6-line);
  background: #f5f7fb;
  box-shadow: 0 8px 24px rgba(15, 31, 24, 0.08);
}

.pm6-figure-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  cursor: zoom-in;
}

.pm6-figure figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--pm6-muted);
  max-width: 68ch;
}

.pm6-steps {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.pm6-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--pm6-line);
  background: #fff;
}

.pm6-step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--pm6-green);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.pm6-step h4 {
  margin: 2px 0 8px;
  font-size: 1.02rem;
  color: var(--pm6-ink);
}

.pm6-step p {
  margin: 0 0 10px;
  max-width: none;
  font-size: 0.98rem;
}

.pm6-step p:last-child { margin-bottom: 0; }

.pm6-badge {
  display: inline-block;
  margin: 4px 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pm6-green-soft);
  color: var(--pm6-green);
  font-size: 0.84rem;
  font-weight: 800;
  border: 1px solid rgba(26, 107, 74, 0.18);
}

.pm6-badge--gold {
  background: var(--pm6-gold-soft);
  color: #7a5c1e;
  border-color: rgba(176, 138, 60, 0.28);
}

.pm6-note {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--pm6-muted);
  max-width: none;
}

.pm6-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid var(--pm6-line);
  background: #fff;
}

.pm6-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.pm6-table th,
.pm6-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--pm6-line);
}

.pm6-table th {
  background: var(--pm6-green-soft);
  color: var(--pm6-green);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pm6-table tr:last-child td { border-bottom: 0; }

.pm6-table tr.is-discard td {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-color: rgba(15, 31, 24, 0.35);
}

.pm6-result {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--pm6-green-soft);
  border: 1px solid rgba(26, 107, 74, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.55;
}

.pm6-min {
  margin: 18px auto;
  padding: 22px 20px;
  max-width: 420px;
  text-align: center;
  border-radius: 16px;
  background: var(--pm6-panel);
  color: #f3faf6;
  box-shadow: 0 14px 36px rgba(15, 31, 24, 0.14);
}

.pm6-min .pm6-kicker { color: var(--pm6-gold); }

.pm6-min strong {
  display: block;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin-top: 4px;
}

.pm6-ex-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.pm6-ex {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--pm6-line);
  background: #fff;
}

.pm6-ex h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pm6-muted);
}

.pm6-ex .pm6-ce {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pm6-ink);
}

.pm6-ex p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--pm6-muted);
  max-width: none;
}

.pm6-scheme {
  margin: 16px 0;
  padding: 18px 16px;
  border-radius: 16px;
  background: var(--pm6-cream);
  border: 1px solid var(--pm6-line);
  text-align: center;
}

.pm6-scheme-title {
  font-weight: 800;
  color: var(--pm6-green);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}

.pm6-scheme-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.pm6-scheme-node {
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--pm6-line);
  font-size: 0.86rem;
  font-weight: 700;
}

.pm6-scheme-op {
  color: var(--pm6-gold);
  font-weight: 800;
}

.pm6-scheme-down {
  color: var(--pm6-muted);
  font-weight: 700;
  margin: 4px 0;
}

.pm6-scheme-end {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--pm6-green);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.pm6-details {
  margin: 14px 0;
  border-radius: 14px;
  border: 1px solid var(--pm6-line);
  background: #fff;
  overflow: hidden;
}

.pm6-details summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--pm6-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pm6-details summary::-webkit-details-marker { display: none; }

.pm6-details summary::after {
  content: "Ver resposta";
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pm6-green-soft);
  color: var(--pm6-green);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(26, 107, 74, 0.18);
}

.pm6-details[open] summary::after {
  content: "Ocultar";
  background: var(--pm6-gold-soft);
  color: #7a5c1e;
  border-color: rgba(176, 138, 60, 0.28);
}

.pm6-details .pm6-answer {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--pm6-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.pm6-details .pm6-answer strong {
  color: var(--pm6-green);
}

.pm6-quiz .pm6-details summary {
  align-items: flex-start;
}

.pm6-quiz .pm6-details summary > span {
  flex: 1;
  font-weight: 600;
  line-height: 1.45;
}

.pm6-grid5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.pm6-check {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--pm6-line);
}

.pm6-check ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pm6-check li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-bottom: 1px solid var(--pm6-line);
  font-size: 0.95rem;
  line-height: 1.45;
}

.pm6-check li:last-child { border-bottom: 0; }

.pm6-check li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pm6-gold-soft);
  color: #7a5c1e;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 1px solid rgba(176, 138, 60, 0.35);
}

.pm6-summary {
  margin: 16px 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--pm6-cream);
  border: 1px solid var(--pm6-line);
}

.pm6-summary ol {
  margin: 0;
  padding-left: 1.25em;
}

.pm6-summary li {
  margin-bottom: 10px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--pm6-ink);
}

.pm6-summary li:last-child { margin-bottom: 0; }

.pm6-banner {
  margin: 8px 0 18px;
  padding: 28px 22px;
  border-radius: 18px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(176, 138, 60, 0.22), transparent 45%),
    linear-gradient(160deg, #143d2c 0%, #1a6b4a 100%);
  color: #f3faf6;
  box-shadow: 0 18px 42px rgba(15, 31, 24, 0.18);
}

.pm6-banner strong {
  display: block;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.pm6-banner p {
  margin: 0 auto;
  max-width: 48ch;
  font-size: 0.92rem;
  opacity: 0.88;
  color: #f3faf6;
}

.pm6-ref {
  margin: 8px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--pm6-line);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--pm6-muted);
}

.pm6-ref strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--pm6-muted);
  font-weight: 800;
}

@media (max-width: 860px) {
  .pm6-compare,
  .pm6-ex-grid,
  .pm6-factors {
    grid-template-columns: 1fr;
  }

  .pm6-flow {
    flex-direction: column;
  }

  .pm6-flow-arrow {
    transform: rotate(90deg);
  }

  .pm6-flow-node {
    width: 100%;
    max-width: 280px;
  }

  .pm6-details summary {
    flex-direction: column;
    align-items: stretch;
  }

  .pm6-details summary::after {
    align-self: flex-start;
  }
}
