/* JSON Formatter: error snippet and collapsible tree view. */
.jf-msg { margin: 6px 0 0; }
.jf-snippet { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--field); color: var(--ink); font-family: var(--mono); font-size: 0.84rem; line-height: 1.45; white-space: pre; overflow-x: auto; }
.jf-tree { font-family: var(--mono); font-size: 0.86rem; line-height: 1.65; padding: 12px 14px; border-radius: var(--r); background: var(--field); border: 1px solid var(--field-border); max-height: 560px; min-height: 120px; overflow: auto; color: var(--ink); }
.jf-tree summary { list-style: none; cursor: pointer; border-radius: 6px; padding: 0 4px; white-space: nowrap; }
.jf-tree summary::-webkit-details-marker { display: none; }
.jf-tree summary::before { content: '▸'; display: inline-block; width: 1em; color: var(--muted); transition: transform 0.12s ease; }
.jf-tree details[open] > summary::before { transform: rotate(90deg); }
.jf-tree summary:hover, .jf-row:hover { background: var(--accent-soft); }
.jf-tree summary:focus-visible, .jf-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.jf-kids { margin-left: 0.5em; padding-left: 0.9em; border-left: 1px dashed var(--line-strong); }
.jf-row { padding: 0 4px 0 calc(1em + 4px); border-radius: 6px; white-space: pre-wrap; word-break: break-all; cursor: pointer; }
.jf-key { color: var(--accent-ink); font-weight: 600; }
.jf-idx { color: var(--muted); }
.jf-str { color: var(--ok); }
.jf-num { color: var(--accent-2); }
.jf-bool { color: var(--warn); font-weight: 600; }
.jf-null { color: var(--muted); font-style: italic; }
.jf-brace { color: var(--muted); }
.jf-count { margin-left: 8px; font-size: 0.78rem; color: var(--muted); }
.jf-more { margin: 4px 0 4px 1em; }
.jf-pathrow { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 200px; }
.jf-pathrow input { font-family: var(--mono); font-size: 0.85rem !important; min-height: 38px !important; padding: 6px 10px !important; }
/* Keep big text boxes from being re-laid out on every status update. */
#jf-input, #jf-output { contain: size layout style; }
