/* Guia 08 · Como a IA cria imagens */

/* 01 · do ruído à imagem */
.nz { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(18px, 3vw, 44px); align-items: start; }
.nz-step, .nz-seed-n { font-variant-numeric: tabular-nums; }
.nz-canvas { display: block; width: 100%; height: auto; aspect-ratio: 192 / 120; image-rendering: pixelated; image-rendering: crisp-edges; background: #000; }
.nz-controls { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-top: 1px solid var(--line); }
.nz-play { flex: none; min-width: 132px; }
.nz-range { flex: 1; min-width: 0; height: 24px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.nz-range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, #fff var(--p, 0%), #2a2a2a var(--p, 0%)); border-radius: 2px; }
.nz-range::-moz-range-track { height: 2px; background: #2a2a2a; border-radius: 2px; }
.nz-range::-moz-range-progress { height: 2px; background: #fff; }
.nz-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: #fff; border: 0; }
.nz-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; }
.nz-range:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }
.nz-side { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.nz-prompts { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.nz-prompt { padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: #000; color: var(--muted); font: 300 clamp(16px, 1.3vw, 18px)/1.35 var(--display); text-align: left; cursor: pointer; transition: border-color .3s, background .3s, color .3s; }
.nz-prompt::before { content: "“"; color: var(--dim); }
.nz-prompt::after { content: "”"; color: var(--dim); }
.nz-prompt:hover { border-color: #fff; color: #fff; }
.nz-prompt[aria-pressed="true"] { background: #fff; border-color: #fff; color: #000; }
.nz-prompt[aria-pressed="true"]::before, .nz-prompt[aria-pressed="true"]::after { color: #777; }
.nz-stages { width: 100%; margin-top: 8px; border-top: 1px solid var(--line); }
.nz-stages li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); opacity: .35; transition: opacity .5s; }
.nz-stages li::before { content: ""; grid-row: span 2; width: 9px; height: 9px; margin-top: 6px; border: 1px solid #fff; border-radius: 50%; transition: background .4s; }
.nz-stages li.is-on { opacity: 1; }
.nz-stages li.is-on::before { background: #fff; }
.nz-stages b { font: 300 19px/1.3 var(--display); letter-spacing: -.01em; color: #fff; font-weight: 300; }
.nz-stages span { font-size: 14px; line-height: 1.55; color: var(--muted); }
@media (max-width: 900px) {
  .nz { grid-template-columns: 1fr; }
  .nz-controls { flex-wrap: wrap; padding: 14px; gap: 12px; }
  .nz-range { flex: 1 1 100%; order: -1; }
  .nz-play { flex: 1 1 100%; min-width: 0; }
}

/* 02 · por que erra */
.im-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .im-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .im-cards .lx-card:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 900px) { .im-cards { grid-template-columns: 1fr; } }

/* 03 · ache os erros */
.fx-count { font-variant-numeric: tabular-nums; }
.fx-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr); }
.fx-art { padding: clamp(14px, 2vw, 28px); }
.fx-svg { display: block; width: 100%; height: auto; overflow: visible; }
.fx-lines { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-thin { stroke-width: 1.4; opacity: .7; }
.fx-fill circle, .fx-fill rect { fill: #050505; }
.fx-shadow { fill: url(#fx-hatch); stroke: none; opacity: .55; }
.fx-num { fill: #fff; stroke: none; font: 500 15px/1 var(--label); text-anchor: middle; dominant-baseline: middle; }
.fx-sign { fill: #fff; stroke: none; font: 500 25px/1 var(--label); letter-spacing: .24em; text-anchor: middle; }
.fx-hit { fill: transparent; stroke: none; cursor: pointer; }
.fx-hit:focus-visible { outline: none; stroke: #fff; stroke-dasharray: 4 6; stroke-width: 1.5; }
.fx-mark circle { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 6 6; animation: fx-spin 14s linear infinite; transform-box: fill-box; transform-origin: center; }
.fx-mark .fx-tag { fill: #fff; }
.fx-mark text { fill: #000; font: 600 13px/1 var(--label); text-anchor: middle; dominant-baseline: central; }
.fx-mark { animation: fx-pop .6s var(--ease); transform-box: fill-box; transform-origin: center; }
@keyframes fx-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.fx-miss { fill: none; stroke: #777; stroke-width: 1.5; animation: fx-miss .7s var(--ease) forwards; transform-box: fill-box; transform-origin: center; }
@keyframes fx-miss { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.4); } }
.fx-side { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: clamp(20px, 2.6vw, 32px); border-left: 1px solid var(--line); }
.fx-list { counter-reset: fx; }
.fx-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 10px; padding: 14px 0; border-bottom: 1px solid var(--line); counter-increment: fx; }
.fx-list li::before { content: counter(fx, decimal-leading-zero); grid-row: span 2; font: 500 10px/1.9 var(--label); letter-spacing: .18em; color: var(--dim); }
.fx-list b { font: 300 18px/1.3 var(--display); color: #fff; font-weight: 300; }
.fx-list span { font-size: 14px; line-height: 1.55; color: var(--muted); }
.fx-list li:not(.is-found) b, .fx-list li:not(.is-found) span { color: transparent; text-shadow: 0 0 9px rgba(255,255,255,.45); user-select: none; }
.fx-list li.is-found { animation: fx-pop .5s var(--ease); }
.fx-list li.is-found::before { color: #fff; }
@media (max-width: 900px) {
  .fx-grid { grid-template-columns: 1fr; }
  .fx-side { border-left: 0; border-top: 1px solid var(--line); }
}

/* 04 · peça melhor */
.ib { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(18px, 3vw, 44px); align-items: start; }
.ib-form { display: flex; flex-direction: column; gap: 18px; }
.ib-row { display: flex; flex-direction: column; gap: 10px; }
.ib-group .chip { height: 34px; padding: 0 14px; }
.ib-out { position: sticky; top: calc(var(--nav-h) + 24px); }
.ib-text { min-height: 9em; padding: clamp(22px, 2.8vw, 34px); font: 300 clamp(21px, 2vw, 28px)/1.45 var(--display); letter-spacing: -.02em; color: #fff; }
.ib-text.is-new { animation: fx-pop .4s var(--ease); }
.ib-actions { padding: 0 clamp(22px, 2.8vw, 34px) clamp(22px, 2.8vw, 34px); }
@media (max-width: 900px) {
  .ib { grid-template-columns: 1fr; }
  .ib-out { position: static; }
}
