/* The free tools' interface (D12 T01 §3), from the approved tool page (docs/design/prototype/pages/tool.html):
   its rules for the tool box, the field row, the status line, the result and the state chips, re-scoped from
   the page (.pg-tool) to the tool (.rz-tool), generated by scripts/tool-styles.py; check with --check. Loaded
   with the tools only (inc/tools.php). */

.rz-tool.box { padding: 0; }
.rz-tool.box > .art-head { margin: 0; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.rz-tool .form { padding: 22px; border-bottom: 1px solid var(--line); }
.rz-tool .fields { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.rz-tool .field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.rz-tool .field label span { color: var(--ink-3); font-weight: 400; }
.rz-tool .input { display: block; width: 100%; height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: 15px/1 var(--mono); transition: border-color 0.2s; }
.rz-tool .input::placeholder { color: var(--ink-3); }
.rz-tool .input:hover { border-color: var(--ink-3); }
.rz-tool .input:focus { border-color: var(--signal); outline: none; box-shadow: 0 0 0 3px var(--tint); }
.rz-tool .input[aria-invalid="true"] { border-color: var(--attack); box-shadow: 0 0 0 3px var(--attack-tint); }
.rz-tool .fields .btn { min-height: 48px; padding: 0 28px; justify-content: center; }
.rz-tool .hint { margin-top: 12px; font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.rz-tool .hint svg { width: 14px; height: 14px; flex: none; }
.rz-tool .msg { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--soft); color: var(--ink-2); font-size: 15px; }
.rz-tool .msg .spin { flex: none; margin-top: 4px; }
.rz-tool .msg svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.rz-tool .msg.is-refused { background: var(--attack-tint); color: var(--ink); }
.rz-tool .msg.is-refused svg { color: var(--attack); }
.rz-tool.box > .msg { margin: 22px; }
.rz-tool .msg[hidden] { display: none; }
.rz-tool .result { padding: 22px 22px 8px; }
.rz-tool .result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rz-tool .result-head h3 { font-size: 22px; line-height: 1.2; }
.rz-tool .result-head h3 span { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.rz-tool .result .tag { position: static; flex: none; }
.rz-tool .summary { margin-top: 12px; padding: 14px 16px; border-radius: 8px; background: var(--soft); color: var(--ink-2); font-size: 15px; }
.rz-tool .summary strong { color: var(--ink); font-weight: 600; }
.rz-tool .findings { list-style: none; margin: 16px 0 0; padding: 0; }
.rz-tool .findings li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; padding: 16px 0 16px 14px; border-top: 1px solid var(--line); box-shadow: inset 2px 0 0 transparent; }
.rz-tool .findings li.is-weak { box-shadow: inset 2px 0 0 var(--signal); }
.rz-tool .findings li.is-missing { box-shadow: inset 2px 0 0 var(--attack); }
.rz-tool .findings .line { color: var(--ink-2); font-size: 15px; }
.rz-tool .findings .line strong { color: var(--ink); font-weight: 600; margin-right: 4px; }
.rz-tool .findings .line code { font: 13px/1 var(--mono); color: var(--ink); }
.rz-tool .todo { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; margin-top: 8px; font-size: 15px; color: var(--ink); }
.rz-tool .todo svg { width: 14px; height: 14px; margin-top: 4px; color: var(--signal); }
.rz-tool .todo a { font-weight: 500; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.rz-tool .todo a:hover { color: var(--signal-ink); }
.rz-tool .note { margin: 0; padding: 16px 0 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.rz-tool .findings.play li { animation: rz-tool-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rz-tool-in { from { opacity: 0; transform: translateY(6px); } }
.rz-tool .chip { display: inline-flex; align-items: center; gap: 6px; align-self: start; justify-self: start; white-space: nowrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); font: 500 12px/1 var(--mono); }
.rz-tool .chip svg { width: 13px; height: 13px; flex: none; }
.rz-tool .is-weak .chip svg, .rz-tool .is-unknown .chip svg { stroke-width: 3; }
.rz-tool .is-ok .chip { color: var(--ink); }
.rz-tool .is-weak .chip { background: var(--tint); border-color: transparent; color: var(--signal-ink); }
.rz-tool .is-missing .chip { background: var(--attack-tint); border-color: transparent; color: var(--attack); }
.rz-tool .is-unknown .chip { background: transparent; border-style: dashed; color: var(--ink-3); }
@media (max-width: 680px) {
	.rz-tool .fields { grid-template-columns: minmax(0, 1fr); }
	.rz-tool .fields .btn { width: 100%; }
	.rz-tool .form, .rz-tool .result { padding-inline: 16px; }
	.rz-tool.box > .art-head { padding-inline: 16px; }
	.rz-tool.box > .msg { margin: 16px; }
	.rz-tool .findings li { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-left: 12px; }
	.rz-tool .result-head h3 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .rz-tool .findings.play li { animation: none; } }

/* Additions: what the other tools print that the approved page does not draw, in its language (D12 T01 §3). */
/* A check with one field: the field and the button share the row. */
.rz-tool .fields.one { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 680px) { .rz-tool .fields.one { grid-template-columns: minmax(0, 1fr); } }

/* A tool with many fields stacks them, a field's own hint under it, and ends in the row with its button. */
.rz-tool .form > .rz-tool-field, .rz-tool .form > .rz-builder-group, .rz-tool .form > .rz-signature-fields, .rz-tool .form > .rz-check-questions, .rz-tool .form > .rz-check-nav, .rz-tool .form > .rz-tool-actions { margin-top: 20px; }
.rz-tool .form > :first-child { margin-top: 0; }
.rz-tool .field .hint { margin-top: 8px; }
.rz-tool .rz-tool-actions .btn { min-height: 48px; padding: 0 28px; justify-content: center; }
.rz-tool textarea.input { height: auto; min-height: 220px; padding: 14px 18px; border-radius: 14px; line-height: 1.5; resize: vertical; }
.rz-tool select.input { cursor: pointer; }
.rz-tool .rz-signature-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
@media (max-width: 680px) { .rz-tool .rz-signature-fields { grid-template-columns: minmax(0, 1fr); } .rz-tool .rz-tool-actions .btn { width: 100%; } }

/* A group of choices: its legend in the field label's type, each choice a row with the box or dot in the brand red. */
.rz-tool .rz-builder-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.rz-tool .rz-builder-group legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.rz-tool .rz-builder-choice { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.rz-tool .rz-builder-choice input { flex: none; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--signal); }
.rz-tool .rz-builder-providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.rz-tool .rz-check-question .rz-builder-choice { display: inline-flex; margin-right: 22px; }
@media (max-width: 680px) { .rz-tool .rz-builder-providers { grid-template-columns: minmax(0, 1fr); } }

/* The IT health self-check's phone stepper: Back and Next either side of where you are. */
.rz-tool .rz-check-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rz-tool .rz-check-where { font: 12px/1 var(--mono); color: var(--ink-3); }

/* Results beyond findings: a group's heading in the box head's mono, lists, a built record with its copy button,
   the signature on the email's own white page, and the report link when the page has no report card. */
.rz-tool .rz-analyser-heading { margin: 22px 0 10px; font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.rz-tool .rz-analyser-heading + .findings { margin-top: 0; }
.rz-tool .rz-analyser-list, .rz-tool .rz-analyser-hops { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }
.rz-tool .rz-analyser-list a { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; }
.rz-tool .rz-builder-record { margin: 14px 0 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font: 14px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.rz-tool .rz-builder-record code { font: inherit; }
.rz-tool .rz-builder-copy-row { margin: 12px 0 6px; }
.rz-tool .rz-signature-preview { margin-top: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--rz-email-paper); overflow-x: auto; }
.rz-tool .rz-tool-send { margin: 0; padding: 6px 0 18px; }
.rz-tool > noscript .msg { margin: 22px; }
