.json-tool [hidden] { display: none !important; }
.json-workspace-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.json-workspace-help { margin: 0; max-width: 85ch; color: #51464c; font-size: .85rem; line-height: 1.7; }
.json-workspace-navigation { display: flex; align-items: stretch; gap: 12px; margin-bottom: 22px; min-width: 0; }
.json-document-tabs { display: flex; align-items: stretch; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; padding: 5px; border: 1px solid rgba(79,65,67,.17); border-radius: 12px; background: rgba(255,255,255,.45); }
.json-tab-item { display: flex; flex: 0 0 auto; align-items: stretch; }
.json-tab-name { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grey-site.glass-depth.photographic-glass.tools-section[data-page-template='json-prettifier'] .json-tool .json-document-tabs :is(.json-document-tab, .json-tab-close) {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; height: auto; margin: 0; padding: 10px 14px;
    border: 0 !important; border-radius: 8px !important;
    background: transparent !important; color: #4d4248 !important;
    box-shadow: none !important; font: 600 13px/1.4 var(--font-ui); cursor: pointer; white-space: nowrap;
}
.grey-site.glass-depth.photographic-glass.tools-section[data-page-template='json-prettifier'] .json-tool .json-document-tabs .json-document-tab[aria-selected='true'] { background: #fff !important; color: #940d14 !important; box-shadow: inset 0 -3px 0 #940d14 !important; }
.grey-site.glass-depth.photographic-glass.tools-section[data-page-template='json-prettifier'] .json-tool .json-document-tabs .json-tab-close { width: 28px; padding: 3px; font-size: 20px; }
.grey-site.glass-depth.photographic-glass.tools-section[data-page-template='json-prettifier'] .json-tool .json-document-tabs :is(.json-document-tab, .json-tab-close):hover { background: rgba(255,255,255,.8) !important; }
.grey-site.glass-depth .json-tool .json-tab-close:disabled { opacity: .25; cursor: default; }
.json-tab-state { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #9b9599; }
.json-tab-state[data-state='valid'] { background: #25825e; }
.json-tab-state[data-state='invalid'] { background: #b7212d; }
.json-comparison-tab { flex: 0 0 auto; }
.grey-site.glass-depth .json-tool .json-add-document { flex: 0 0 auto; min-height: 48px; padding: 10px 16px; font: 600 13px/1.5 var(--font-ui); }
.grey-site.glass-depth .json-tool [data-json-undo-close] { flex-shrink: 0; min-height: 36px; padding: 7px 12px; font: 600 12px/1.5 var(--font-ui); }
.grey-site.glass-depth.photographic-glass.tools-section .json-tool .json-document-controls { justify-content: space-between; align-items: end; }
.json-document-name { display: grid; gap: 6px; min-width: 180px; max-width: 260px; margin: 0; font-size: 12px; color: #51464c; }
.grey-site.glass-depth .json-tool .json-document-name input { box-sizing: border-box; width: 100%; min-height: 42px; margin: 0; padding: 9px 12px; font: 500 14px/1.5 var(--font-ui); }
.json-comparison-heading h2 { margin: 0 0 10px; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.25; }
.json-comparison-heading p { max-width: 80ch; margin: 0 0 22px; color: #51464c; line-height: 1.7; }
.json-comparison-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.json-comparison-controls > label { flex: 1 1 220px; }
.json-comparison-panel label { display: grid; gap: 7px; min-width: 0; color: #51464c; font: 500 12px/1.6 var(--font-ui); }
.grey-site.glass-depth .json-tool .json-comparison-panel :is(select, input) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; margin: 0; font: 500 14px/1.5 var(--font-ui); }
.grey-site.glass-depth .json-tool .json-comparison-controls button { min-height: 44px; padding: 10px 16px; font: 600 13px/1.5 var(--font-ui); }
.json-comparison-method { margin: 18px 0; font-size: .8rem; line-height: 1.7; color: #5c5156; }
.json-comparison-summary { margin: 18px 0; padding: 16px 18px; border: 1px solid rgba(79,65,67,.14); border-radius: 10px; background: rgba(255,255,255,.6); font-size: .9rem; line-height: 1.7; color: #302a2e; overflow-wrap: anywhere; }
.json-comparison-filters { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); align-items: end; gap: 14px; margin-bottom: 22px; }
.json-comparison-group { min-width: 0; margin-top: 22px; padding: 20px; border: 1px solid rgba(79,65,67,.14); border-radius: 12px; background: rgba(255,255,255,.55); }
.json-comparison-group h3 { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.5; overflow-wrap: anywhere; }
.json-comparison-group > p { margin: 0 0 14px; font-size: .85rem; line-height: 1.7; color: #51464c; }
.json-comparison-group > p:last-child { margin-bottom: 0; }
.json-comparison-group > .json-comparison-error { color: #9c1924; }
.json-comparison-group > .json-comparison-match { color: #1c684d; }
.json-diff-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .8rem; }
.json-diff-table :is(th, td) { text-align: left; vertical-align: top; padding: 15px 14px; border-bottom: 1px solid rgba(79,65,67,.14); overflow-wrap: anywhere; }
.json-diff-table thead th { font-weight: 700; color: #51464c; background: rgba(255,255,255,.65); }
.json-diff-table tbody th { font-weight: 500; }
.json-diff-table tbody tr:last-child > * { border-bottom: 0; }
.json-diff-table code { display: block; color: #302a2e; font: 500 12px/1.7 var(--font-code); white-space: pre-wrap; overflow-wrap: anywhere; }
.json-diff-kind { display: inline-block; margin-top: 10px; padding: 4px 8px; border-radius: 5px; background: #f3e5df; color: #82402b; font: 600 11px/1.5 var(--font-ui); }
.json-diff-kind[data-kind^='missing'] { color: #922333; background: #fae8eb; }
.json-diff-kind[data-kind^='extra'] { color: #226342; background: #e5f3e9; }
.json-diff-kind[data-kind='type'] { color: #674282; background: #f0e9f7; }
.json-diff-type { display: block; margin-bottom: 7px; color: #685a61; font: 500 11px/1.5 var(--font-ui); }
.json-diff-table pre { max-height: 220px; min-width: 0; margin: 0; overflow: auto; color: #302a2e; background: none; font: 400 12px/1.7 var(--font-code); white-space: pre-wrap; overflow-wrap: anywhere; }
.json-input-editor { position: relative; min-width: 0; overflow: hidden; }
.json-tool .json-input-editor textarea { height: 100%; padding-left: 84px; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; }
.json-input-measure { position: absolute; top: 0; left: 0; visibility: hidden; pointer-events: none; box-sizing: content-box; white-space: pre-wrap; overflow-wrap: anywhere; }
.json-input-measure > span { display: block; min-height: 22px; }
.json-tool .json-output-highlight { padding-left: 12px; }
.json-tool .json-output-highlight.is-plain { padding-left: 84px; }
.json-tool .json-tree-gutter { width: 72px; justify-content: flex-start; gap: 10px; }
.json-line-number { display: inline-block; width: 6ch; flex: 0 0 6ch; color: #80767b; text-align: right; user-select: none; }
.json-line-number::before { content: attr(data-line-number); }
.json-editor-ruler { position: absolute; z-index: 1; inset: 0 auto 0 0; width: 72px; overflow: hidden; pointer-events: none; background: #f5f2f3; border-right: 1px solid rgba(79,65,67,.12); font: 400 .78rem/1.68 'DM Mono', monospace; letter-spacing: 0; }
.json-editor-ruler .json-line-number { display: block; height: 1.68em; margin-left: 12px; }
.json-tool :is(.json-input-editor textarea, .json-output-highlight, .json-editor-ruler) { line-height: 22px; }
.json-tool :is(.json-tree-line, .json-tree-gutter, .json-editor-ruler .json-line-number) { min-height: 22px; height: 22px; }
.json-tool .json-tree-line { height: auto; }
.json-tree-item-count { color: #71666c; font-style: italic; }
.json-tool .json-output-highlight :is(.json-search-match, .json-search-text-hit) { padding: 0; border-radius: 0; background: #ffff00 !important; color: #171717 !important; font: inherit; }
.json-tool .json-output-highlight :is(.json-search-match, .json-search-text-hit).is-current { outline: 2px solid #9b4a00; outline-offset: 1px; }
.grey-site.glass-depth .json-tool :is(.json-document-tab, .json-tab-close, .json-add-document, [data-json-undo-close]):focus-visible { outline: 2px solid #940d14 !important; outline-offset: 2px; }
@media (max-width: 760px) {
    .json-workspace-top { flex-direction: column; }
    .json-workspace-help { font-size: .8rem; }
    .json-workspace-navigation { gap: 8px; }
    .grey-site.glass-depth .json-tool .json-add-document { padding: 10px; font-size: 12px; }
    .json-document-name { width: 100%; max-width: none; }
    .grey-site.glass-depth .json-tool :is(.json-document-name input, .json-comparison-panel input, .json-comparison-panel select) { font-size: 16px; }
    .json-comparison-controls > label { flex-basis: 100%; }
    .json-comparison-filters { grid-template-columns: minmax(0, 1fr); }
    .json-comparison-group { padding: 16px; }
    .json-diff-table, .json-diff-table tbody, .json-diff-table tr { display: block; }
    .json-diff-table thead { display: none; }
    .json-diff-table tr { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(79,65,67,.2); }
    .json-diff-table tr:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
    .json-diff-table :is(th, td) { display: block; padding: 12px 0; border: 0; }
    .json-diff-table td::before { content: attr(data-label); display: block; margin-bottom: 8px; color: #302a2e; font-weight: 700; }
    .json-diff-type { display: inline-block; }
    .json-comparison-panel { min-width: 0; }
}
