/* Utilitarios de dev do /ferramentas (04/11/2026, spec docs/superpowers/specs/2026-11-04-gratis-design.md).
   Portados do ferramentas.html do Pack do Req; cores so das variaveis do tema comum (tema-premium.css), carregado
   antes deste arquivo. Tudo sob .fd para nao vazar no resto da pagina. Sem JS os botoes de copiar ficam hidden.
   Desfazer: git revert do commit. */
.fd [hidden] { display: none !important; }
.fd { width: min(960px, calc(100vw - 32px)); margin: 56px 0 0 calc(50% - min(480px, 50vw - 16px)); }
.fd > h2 { margin: 0 0 10px !important; text-align: left !important;font-size: clamp(1.8rem, 5vw, 2.6rem) !important; }
.fd-lead { margin: 0 0 14px; color: var(--p-ts); line-height: 1.6; }
.fd-priv { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 8px 14px; border: 1px solid var(--p-line2); border-radius: 999px; color: var(--p-ts); font-size: .9rem; }
.fd-priv::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--p-accent); flex: none; }
.fd-indice { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.fd-indice a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--p-line); border-radius: 999px; color: var(--p-tx); text-decoration: none; font-size: .92rem; }
.fd-indice a:hover { border-color: var(--p-accent); }
.fd-tool { min-width: 0; margin: 0 0 16px; padding: 20px; border: 1px solid var(--p-line); border-radius: var(--p-radius); background: var(--p-surface); box-shadow: var(--p-hi); scroll-margin-top: 80px; }
.fd-tool h3 { margin: 0 0 6px; font-family: var(--p-body); font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; }
.fd-tool h4 { margin: 20px 0 4px; font-family: var(--p-body); font-size: 1rem; font-weight: 650; }
.fd-tool > p.fd-desc { margin: 0 0 6px; color: var(--p-ts); line-height: 1.55; }
.fd label { display: block; margin: 10px 0 4px; color: var(--p-tm); font-size: .85rem; font-weight: 600; }
.fd textarea, .fd input, .fd select { width: 100%; max-width: 100%; padding: 10px 12px; border: 1px solid var(--p-line2); border-radius: var(--p-radius-sm); background: var(--p-bg); color: var(--p-tx); font: 14px/1.5 var(--p-code); }
.fd input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--p-accent); }
.fd input[type=color] { width: 48px; height: 40px; padding: 2px; }
.fd textarea { min-height: 140px; resize: vertical; }
.fd-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.fd-row > * { flex: 0 0 auto; }
.fd-g2, .fd-g3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.fd button { min-height: 40px; padding: 0 14px; border: 1px solid var(--p-line2); border-radius: 999px; background: transparent; color: var(--p-tx); font: 600 14px var(--p-body); cursor: pointer; }
.fd button:hover { border-color: var(--p-accent); }
.fd button.fd-pri { background: var(--p-accent-btn); border-color: var(--p-accent-btn); color: var(--p-tx); }
.fd button.fd-pri:hover { background: var(--p-accent-btn-hover); }
.fd label.fd-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; color: var(--p-tx); font-size: .9rem; font-weight: 500; }
.fd label.fd-check input[type=number] { width: 84px; }
.fd-out { position: relative; margin-top: 10px; }
.fd-out pre, .fd-out .fd-box { margin: 0; min-height: 44px; max-height: 480px; overflow: auto; padding: 12px 84px 12px 12px; border: 1px solid var(--p-line); border-radius: var(--p-radius-sm); background: var(--p-bg); color: var(--p-ts); font: 13px/1.55 var(--p-code); white-space: pre-wrap; overflow-wrap: anywhere; }
.fd-out .fd-copia { position: absolute; top: 4px; right: 4px; min-height: 36px; padding: 0 12px; font-size: 12px; background: var(--p-surface2); }
.fd-msg { margin: 6px 0; font-size: .9rem; color: var(--p-tm); }
.fd-msg.ok { color: var(--p-ts); }
.fd-msg.ok::before { content: "✓ "; color: var(--p-accent-hover); }
.fd-msg.bad { color: var(--p-tx); }
.fd-msg.bad::before { content: "✗ "; color: var(--p-accent-hover); }
.fd mark { background: color-mix(in srgb, var(--p-accent) 40%, transparent); color: var(--p-tx); border-radius: 3px; }
.fd mark.alt { background: color-mix(in srgb, var(--p-accent-hover) 28%, transparent); }
.fd table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.fd td, .fd th { padding: 6px 8px; border-bottom: 1px solid var(--p-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.fd th { color: var(--p-tm); font-weight: 600; }
.fd-mono { font-family: var(--p-code); font-size: .88em; }
.fd-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.fd button.fd-sw { min-height: 52px; padding: 24px 2px 4px; border: 0; border-radius: 8px; font: 11px var(--p-code); }
.fd-sample { margin-top: 10px; padding: 16px; border: 1px solid var(--p-line); border-radius: var(--p-radius-sm); }
.fd-diff { max-height: 520px; overflow: auto; border: 1px solid var(--p-line); border-radius: var(--p-radius-sm); background: var(--p-bg); font: 13px/1.5 var(--p-code); }
.fd-diff div { display: grid; grid-template-columns: 2.6em 2.6em 1.4em minmax(0, 1fr); white-space: pre-wrap; overflow-wrap: anywhere; }
.fd-diff span.n { padding-right: 6px; color: var(--p-tm); text-align: right; user-select: none; }
.fd-diff .add { background: color-mix(in srgb, var(--p-accent) 18%, transparent); }
.fd-diff .del { background: color-mix(in srgb, var(--p-tx) 8%, transparent); text-decoration: line-through; text-decoration-color: var(--p-tm); }
.fd-diff .gap { display: block; padding: 2px 8px; color: var(--p-tm); }
@media (min-width: 640px) {
  .fd-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fd-swatches { grid-template-columns: repeat(11, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .fd-tool { padding: 14px; } }
@media (prefers-reduced-motion: reduce) { .fd * { transition: none !important; animation: none !important; } }
