/* Styles for /tools/ pages only (loaded by build.py when a page has a `script`). */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; margin: 0 0 2rem; }
.tool[hidden], .tool-stage[hidden] { display: none; }
.tool-promise { font-weight: 650; margin: 0 0 0.75rem; }
.tool label { font-weight: 600; }
.tool input[type=file] { display: block; margin: 0.4rem 0 0.75rem; max-width: 100%; font: inherit; }
.tool select, .tool input[type=color] { font: inherit; margin-left: 0.25rem; }
.tool fieldset { border: 0; padding: 0; margin: 0 0 0.75rem; }
.tool legend { font-weight: 600; padding: 0; margin-bottom: 0.25rem; }
.tool fieldset label { font-weight: 400; margin-right: 1rem; white-space: nowrap; }
.tool-status, .tool-note { color: var(--muted); font-size: 0.95rem; }
.tool-warning { border-left: 4px solid #d97706; padding: 0.25rem 0 0.25rem 0.75rem; }
.tool-summary { font-size: 1.1rem; }
.tool-links a { font-weight: 600; }
.tool-links .tool-note { display: block; }
.tool-table td:first-child { font-weight: 600; white-space: nowrap; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; margin: 0.75rem 0; }
.tool-button, .tool button {
  display: inline-block; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--on-accent); border: 0; padding: 0.55rem 1rem; border-radius: 10px;
}
.tool button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.tool button:disabled { opacity: 0.45; cursor: default; }
.tool-preview, .tool canvas { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
#redact-canvas { touch-action: none; cursor: crosshair; }
.pattern-wrap { position: relative; width: min(18rem, 100%); aspect-ratio: 1; margin: 0.5rem 0 1rem; }
#pattern-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; height: 100%; touch-action: none; user-select: none; }
#pattern-grid button.pattern-cell {
  margin: 22%; padding: 0; border-radius: 50%; background: var(--code-bg); color: var(--text);
  border: 2px solid var(--border); font-size: 0.95rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center; min-width: 0;
}
#pattern-grid button.pattern-cell[aria-pressed=true] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
#pattern-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#pattern-lines line { stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; opacity: 0.8; }
.tool-result-big { font-size: 1.15rem; font-weight: 650; margin-bottom: 0.4rem; }
.tool-verdict { font-weight: 650; }
.tool-verdict.weak { color: #b45309; }
.tool-verdict.ok { color: var(--muted); }
.tool-verdict.good { color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .tool-verdict.weak { color: #fbbf24; } }
