.dev-tool { color: var(--light-gray); }
.dev-tool .content-card { padding: 24px; }
.dev-tool .dev-description { margin: 12px 0 24px; font-size: 13px; line-height: 1.7; color: var(--light-gray-70); }
.dev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dev-grid > div { min-width: 0; }
.dev-tool label { display: block; margin: 14px 0 8px; font-size: 13px; }
.dev-tool input:not([type=checkbox]), .dev-tool select, .dev-tool textarea {
  width: 100%; min-width: 0; padding: 12px; color: var(--white-2); background: rgba(0,0,0,.15);
  border: 1px solid var(--jet); border-radius: 10px; font: inherit; font-size: 13px;
}
.dev-tool textarea { min-height: 190px; resize: vertical; font-family: ui-monospace, monospace; line-height: 1.6; }
.dev-tool select option { background: #242424; }
.dev-tool :focus-visible { outline: 2px solid var(--orange-yellow-crayola); outline-offset: 2px; }
.dev-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.dev-button { padding: 10px 15px; border-radius: 9px; border: 1px solid rgba(255,215,120,.2); background: rgba(255,215,120,.1); color: var(--orange-yellow-crayola); font-size: 13px; cursor: pointer; }
.dev-button:hover { background: rgba(255,215,120,.16); }
.dev-button.secondary { color: var(--light-gray); border-color: var(--jet); background: rgba(255,255,255,.04); }
.dev-button:disabled { opacity: .5; cursor: wait; }
.dev-output-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.dev-output-heading label { margin: 0; }
.dev-result { margin-top: 10px; padding: 16px; min-height: 90px; max-height: 600px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.7 ui-monospace, monospace; border: 1px solid var(--jet); border-radius: 10px; background: rgba(0,0,0,.15); }
.dev-result:empty::before { content: 'Your result will appear here.'; color: var(--light-gray-70); }
.dev-status { margin-top: 12px; font-size: 13px; color: var(--light-gray-70); overflow-wrap: anywhere; }
.dev-status.error { color: #f3a0a0; }
.dev-notice { padding: 12px; color: #e4c580; border-left: 2px solid #b99a56; font-size: 12px; line-height: 1.7; background: rgba(185,154,86,.06); }
.dev-dropzone { margin-top: 18px; padding: 18px; border: 1px dashed var(--light-gray-70); border-radius: 12px; }
.dev-dropzone.dragover { background: rgba(255,215,120,.08); border-color: var(--orange-yellow-crayola); }
.dev-dropzone p { margin: 10px 0; font-size: 12px; color: var(--light-gray-70); overflow-wrap: anywhere; }
.dev-tool .dev-check { display: flex; align-items: center; gap: 9px; }
.dev-check input { width: auto; accent-color: var(--orange-yellow-crayola); }
.dev-result .diff-added { color: #9ad7ac; background: rgba(74,158,97,.1); }
.dev-result .diff-removed { color: #f0a7a7; background: rgba(179,73,73,.1); }
.dev-result .diff-line { display: inline; white-space: pre-wrap; }
.tools .filter-list { flex-wrap: wrap; gap: 8px 18px; }
.tools .select-list { max-height: 55vh; overflow-y: auto; z-index: 10; }
.dev-tool [hidden] { display: none !important; }

/* Paired editors and comparison workspaces */
.dev-tool { --compare-green: #8dcca7; --compare-red: #e79a9f; --compare-amber: #e0bf7c; --compare-blue: #9cb9e8; }
.editor-box { min-width: 0; padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(0,0,0,.09); }
.editor-caption { display: flex; align-items: center; gap: 8px; color: #aeb4c1; font-size: 10px; letter-spacing: .12em; font-weight: 600; }
.editor-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.editor-dot.before { background: var(--compare-red); }
.editor-dot.after { background: var(--compare-green); }
.dev-tool .editor-box label { color: #c9ced7; font-size: 12px; }
.dev-tool .editor-box textarea { border-color: rgba(255,255,255,.06); background: #1b1d22; }
.compare-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.compare-stats { display: flex; flex-wrap: wrap; gap: 7px; }
.stat { display: inline-block; padding: 5px 9px; border-radius: 6px; color: #aeb4c1; background: rgba(255,255,255,.04); font-size: 11px; }
.stat.added { color: var(--compare-green); background: rgba(83,157,111,.1); }
.stat.removed { color: var(--compare-red); background: rgba(169,83,92,.1); }
.stat.changed { color: var(--compare-amber); background: rgba(163,135,74,.1); }
.compare-toolbar .dev-check { margin: 0; font-size: 11px; }
.compare-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.compare-nav .dev-button { padding: 6px 9px; font-size: 11px; }
#diffPosition { display: inline; font: 11px ui-monospace, monospace; color: #aeb4c1; }

/* JSON: expandable fields with paired values and JSON Pointer paths. */
.json-comparison { padding: 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: #1a1c21; max-height: 720px; overflow: auto; }
.json-node { min-width: 0; }
.json-column-labels { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 8px 18px 12px; border-bottom: 1px solid rgba(255,255,255,.07); color: #8f9bae; font: 10px ui-monospace,monospace; letter-spacing: .08em; }
.json-field { padding: 10px; margin: 3px 0; border: 1px solid transparent; border-radius: 7px; list-style: none; }
details > .json-field { cursor: pointer; }
.json-field::-webkit-details-marker { display: none; }
details > .json-field .json-key::before { content: '›'; display: inline-block; margin-right: 8px; color: #8d97a7; transition: transform .15s; }
details[open] > .json-field .json-key::before { transform: rotate(90deg); }
.json-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 6px; }
.json-key { display: inline; color: #d7dce5; font: 600 12px ui-monospace, monospace; overflow-wrap: anywhere; }
.json-badge { display: inline; padding: 1px 5px; border-radius: 4px; color: #8993a3; background: rgba(255,255,255,.035); font: 9px/1.8 ui-monospace, monospace; }
.json-path { margin-left: auto; color: #747f91; font: 10px ui-monospace, monospace; overflow-wrap: anywhere; }
.json-values { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.json-value { padding: 6px 8px; min-width: 0; color: #b4bece; background: rgba(0,0,0,.12); border-radius: 4px; font: 12px/1.65 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.json-value.string { color: #a3c2ac; }
.json-value.number, .json-value.boolean { color: #a6bce2; }
.json-value.null { color: #ac99bd; }
.json-value.missing { color: #636e81; background: repeating-linear-gradient(-45deg,transparent,transparent 5px,rgba(255,255,255,.02) 5px,rgba(255,255,255,.02) 6px); }
.json-children { padding-left: 12px; margin-left: 8px; border-left: 1px solid rgba(255,255,255,.08); }
.json-node.changed > .json-field { background: rgba(173,139,68,.065); border-color: rgba(173,139,68,.13); }
.json-node.added > .json-field { background: rgba(83,157,111,.065); border-color: rgba(83,157,111,.14); }
.json-node.removed > .json-field { background: rgba(169,83,92,.065); border-color: rgba(169,83,92,.14); }
.json-node.changed > .json-field .json-badge { color: var(--compare-amber); }
.json-node.added > .json-field .json-badge { color: var(--compare-green); }
.json-node.removed > .json-field .json-badge { color: var(--compare-red); }
.json-comparison.changes-only .json-node.same { display: none; }
.json-comparison.changes-only:has(> .json-node.same)::after { content: 'No changed fields. The documents match.'; display: block; padding: 20px; color: var(--compare-green); font-size: 12px; }

/* JWT: encoded document and editable decoded sections */
.jwt-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.dev-tool #jwtInput { min-height: 260px; color: #d0b4ce; overflow-wrap: anywhere; }
.dev-tool #jwtHeader { min-height: 100px; color: #e1a9ae; }
.dev-tool #jwtPayload { min-height: 170px; color: #aabbe2; }
.jwt-keys { padding: 18px; margin-top: 18px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.jwt-verdict { border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 12px; font-size: 12px; color: #b2b9c5; background: rgba(255,255,255,.03); }
.jwt-verdict.valid { color: var(--compare-green); border-color: rgba(83,157,111,.3); background: rgba(83,157,111,.08); }
.jwt-verdict.invalid { color: var(--compare-red); border-color: rgba(169,83,92,.3); background: rgba(169,83,92,.08); }
.jwt-verdict.signed { color: var(--compare-blue); }
.jwt-segments { display: grid; gap: 10px; margin-top: 18px; font: 10px/1.7 ui-monospace,monospace; overflow-wrap: anywhere; }
.jwt-header-part { color: #ce939b; }
.jwt-payload-part { color: #96add7; }
.jwt-signature-part { color: #a995bf; }
.hash-tabs { margin-top: 24px; }
.dev-tool .b64enc-file-info { margin-top: 14px; }
.dev-tool .b64enc-file-name { color: var(--white-2); }
.dev-tool .b64enc-dropzone p { margin: 0; }
.dev-tool .b64enc-dropzone-sub { margin: 8px 0 !important; }

/* Text Compare: fixed-height aligned lines with independent, linked viewports. */
.diff-pane-labels { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); border: 1px solid rgba(255,255,255,.1); border-radius: 10px 10px 0 0; background: #23262d; }
.diff-pane-labels span { padding: 10px 14px; font: 11px ui-monospace,monospace; color: #acb4c2; }
.diff-pane-labels span + span { border-left: 1px solid rgba(255,255,255,.08); }
.diff-panels { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); border: 1px solid rgba(255,255,255,.1); border-top: 0; border-radius: 0 0 10px 10px; overflow: hidden; background: #1a1c21; }
.diff-pane { position: relative; height: 360px; overflow: auto; font: 12px/26px ui-monospace,monospace; tab-size: 4; }
.diff-pane + .diff-pane { border-left: 1px solid rgba(255,255,255,.1); }
.compare-line { display: flex; width: max-content; min-width: 100%; height: 26px; }
.compare-line .line-number { position: sticky; left: 0; flex: 0 0 40px; padding-right: 8px; text-align: right; color: #657184; border-right: 1px solid rgba(255,255,255,.04); background: #20232b; user-select: none; }
.compare-line .line-text { display: block; padding: 0 10px; white-space: pre; color: #cbd1dc; }
.compare-line.added { background: rgba(76,145,103,.16); }
.compare-line.removed { background: rgba(165,79,90,.16); }
.compare-line.modified { background: rgba(166,134,69,.13); }
.compare-line.gap { background: repeating-linear-gradient(-45deg,transparent,transparent 4px,rgba(255,255,255,.025) 4px,rgba(255,255,255,.025) 5px); }
.compare-line mark.inline-change { padding: 1px 0; color: #f1d69d; background: rgba(179,139,57,.28); border-radius: 2px; }
.compare-line.current-change { outline: 1px solid rgba(168,188,222,.5); outline-offset: -1px; }

/* Human-readable results. Raw exports remain available behind a disclosure. */
.result-dashboard { margin-top: 26px; min-width: 0; }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.result-heading > div { min-width: 0; }
.result-eyebrow { color: #8c969f; font-size: 9px; font-weight: 600; letter-spacing: .18em; margin-bottom: 7px; }
.result-heading h4 { color: #e7ebef; font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.result-subtitle { margin-top: 7px; max-width: 480px; color: #929da8; font-size: 12px; line-height: 1.75; }
.result-tag { display: inline-block; flex-shrink: 0; padding: 5px 9px; color: #b1c9d6; border: 1px solid rgba(137,179,196,.15); border-radius: 6px; background: rgba(137,179,196,.055); font: 10px/1.5 ui-monospace,monospace; }
.result-empty { padding: 28px 22px; border: 1px dashed rgba(167,183,196,.14); border-radius: 14px; background: linear-gradient(120deg,rgba(130,155,168,.035),transparent); }
.result-empty-glyph { display: block; margin-bottom: 18px; color: #7194a4; font: 25px ui-monospace,monospace; }
.result-empty h4 { font-size: 15px; color: #bec9d1; font-weight: 500; }
.result-empty p { margin-top: 7px; color: #89949f; font-size: 12px; line-height: 1.8; }
.result-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.result-metric { min-width: 0; padding: 15px; border: 1px solid rgba(164,185,201,.08); border-radius: 10px; background: rgba(133,158,175,.035); }
.result-metric strong { display: block; color: #d8e3e9; font-size: 19px; font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }
.result-metric span { display: block; margin-top: 5px; color: #8b99a6; font-size: 10px; }
.result-metric.danger strong { color: #d5a099; }
.value-card { min-width: 0; margin-top: 12px; padding: 17px 18px; border: 1px solid rgba(156,179,197,.12); border-radius: 12px; background: linear-gradient(115deg,rgba(133,161,178,.055),rgba(133,161,178,.015)); }
.value-card-heading { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.value-card-heading h5 { color: #abbcc7; font-size: 11px; font-weight: 500; letter-spacing: .02em; }
.result-copy { flex-shrink: 0; margin-left: auto; padding: 5px 9px; color: #adbec9; border: 1px solid rgba(156,179,197,.15); border-radius: 6px; background: rgba(156,179,197,.04); font-size: 10px; cursor: pointer; }
.result-copy:hover { color: #edf4f7; background: rgba(156,179,197,.12); }
.result-copy:disabled { opacity: .6; }
.value-code { max-height: 300px; margin: 0; overflow: auto; color: #d0dfe7; font: 12px/1.9 ui-monospace,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.digest-card .value-code { color: #a8c8bc; font-size: 14px; letter-spacing: .035em; }
.value-hint { margin-top: 10px; color: #7f8d9b; font-size: 10px; line-height: 1.8; }
.result-file-name { color: #a8b6c1; font-size: 12px; margin: 0 0 16px; overflow-wrap: anywhere; }
.result-export { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(156,179,197,.08); }
.result-export > summary { width: fit-content; color: #7f8e9d; cursor: pointer; font-size: 11px; }
.result-export > summary:hover { color: #c2d0da; }
.result-export .dev-output-heading { margin-top: 14px; }
.result-export .dev-result { max-height: 320px; color: #9baab7; font-size: 11px; }
.result-small-heading { margin: 20px 0 12px; color: #93a6b5; font-size: 10px; font-weight: 500; letter-spacing: .1em; }

/* Syntax-coloured, line-numbered JSON formatting. */
.syntax-frame { max-height: 460px; overflow: auto; border: 1px solid rgba(156,179,197,.12); border-radius: 12px; padding: 12px 0; background: #1a1f24; }
.syntax-row { display: flex; width: max-content; min-width: 100%; font: 12px/24px ui-monospace,monospace; }
.syntax-line-number { position: sticky; left: 0; flex: 0 0 46px; padding-right: 14px; color: #506471; text-align: right; background: #1a1f24; user-select: none; }
.syntax-code { padding-right: 18px; white-space: pre; color: #9eb0bb; }
.syntax-key { display: inline; color: #a7c9e1; }
.syntax-string { display: inline; color: #a4c2ad; }
.syntax-number, .syntax-literal { display: inline; color: #bca9d1; }
.syntax-punctuation { display: inline; color: #6c7f8d; }

/* JWT claims and time information. */
.result-columns { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); gap: 12px; margin: 18px 0; }
.result-section { min-width: 0; padding: 17px; border: 1px solid rgba(156,179,197,.1); border-radius: 12px; background: rgba(133,158,175,.025); }
.result-section > h5 { margin-bottom: 14px; color: #a3bac9; font-size: 12px; font-weight: 500; }
.claim-list { margin: 0; }
.claim-row { padding: 11px 0; border-top: 1px solid rgba(156,179,197,.075); }
.claim-row:first-child { border-top: 0; padding-top: 0; }
.claim-row:last-child { padding-bottom: 0; }
.claim-row dt { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 5px; }
.claim-row dt code { color: #afc5d2; font: 11px ui-monospace,monospace; overflow-wrap: anywhere; }
.claim-label { color: #6e8290; font-size: 9px; }
.claim-row dd { margin: 0; min-width: 0; }
.claim-value { display: inline; color: #ced9df; font-size: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.claim-value.number { color: #b2bbdb; font-family: ui-monospace,monospace; }
.claim-value.boolean { color: #a5c7b3; }
.claim-value.null { color: #7c8d98; }
.claim-nested > summary { color: #91abbd; font-size: 11px; cursor: pointer; }
.claim-nested > .claim-list { padding: 12px 0 0 10px; border-left: 1px solid rgba(156,179,197,.1); }
.claim-timeline { display: grid; gap: 0; border-left: 1px solid rgba(156,179,197,.16); margin: 20px 0 22px 5px; }
.claim-time { position: relative; padding: 0 0 18px 18px; }
.claim-time:last-child { padding-bottom: 0; }
.claim-time::before { content: ''; position: absolute; top: 6px; left: -3px; width: 5px; height: 5px; border-radius: 50%; background: #7395a7; }
.claim-time span { color: #778d9d; font-size: 10px; }
.claim-time strong { display: block; margin-top: 3px; color: #b5c7d2; font: 11px/1.8 ui-monospace,monospace; overflow-wrap: anywhere; }
.result-signature { padding: 12px 15px; border: 1px solid rgba(156,179,197,.12); border-radius: 10px; color: #9eb1bf; font-size: 12px; background: rgba(133,158,175,.035); }
.result-signature.valid { color: #a4c7af; border-color: rgba(139,187,152,.2); background: rgba(139,187,152,.05); }
.result-signature.invalid { color: #d4a2a0; border-color: rgba(196,135,135,.2); background: rgba(196,135,135,.05); }
.result-signature.signed { color: #a8bddc; }
.jwt-segments { display: flex; flex-wrap: wrap; gap: 6px; }
.jwt-segments > span { display: inline; padding: 4px 6px; border-radius: 5px; background: rgba(156,179,197,.05); font-size: 9px; }

/* UUID batches and byte inspection. */
.uuid-list { display: grid; gap: 10px; max-height: 540px; overflow: auto; }
.uuid-item { min-width: 0; border: 1px solid rgba(156,179,197,.12); border-radius: 11px; padding: 16px; background: rgba(133,158,175,.035); }
.uuid-index { display: inline; color: #5c7889; font: 10px ui-monospace,monospace; }
.uuid-item .result-tag { font-size: 9px; padding: 2px 5px; border: 0; }
.uuid-colour { display: block; color: #607a8b; font: 13px/1.9 ui-monospace,monospace; overflow-wrap: anywhere; }
.uuid-part { display: inline; }
.uuid-part.part-0 { color: #a5bed9; }
.uuid-part.part-1 { color: #b8add0; }
.uuid-part.part-2 { color: #c9b195; }
.uuid-part.part-3 { color: #c7a7b4; }
.uuid-part.part-4 { color: #9cbeb1; }
.uuid-byte-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 5px; margin-bottom: 18px; }
.uuid-byte { border: 1px solid rgba(156,179,197,.09); border-radius: 6px; padding: 8px 4px; text-align: center; background: rgba(133,158,175,.03); }
.uuid-byte span { color: #5d7585; font-size: 8px; margin-bottom: 6px; }
.uuid-byte code { color: #b3cbd7; font: 12px ui-monospace,monospace; }

/* Regex match map and capture cards. */
.match-preview { padding: 18px; max-height: 320px; overflow: auto; background: #1a1f24; border: 1px solid rgba(156,179,197,.12); border-radius: 12px; color: #a8b9c5; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/2.1 ui-monospace,monospace; }
.colour-0 { --match: 152,189,178; }
.colour-1 { --match: 163,180,215; }
.colour-2 { --match: 193,167,198; }
.colour-3 { --match: 200,182,149; }
.match-colour { padding: 2px 0; border-radius: 3px; color: rgb(var(--match)); background: rgba(var(--match),.17); box-shadow: 0 1px 0 rgba(var(--match),.4); }
.match-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 12px; max-height: 620px; overflow: auto; margin: 18px 0; }
.dev-tool article.match-card { display: block; width: auto; max-width: none; min-width: 0; margin: 0; justify-self: stretch; padding: 16px; border: 1px solid rgba(var(--match),.15); border-radius: 12px; box-shadow: none; background: linear-gradient(130deg,rgba(var(--match),.05),transparent); }
.match-card h5 { color: rgb(var(--match)); }
.match-offset { display: inline; color: #718997; font-size: 9px; }
.match-text { display: block; color: #c3d2dc; font: 12px/1.9 ui-monospace,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.capture-list { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(var(--match),.1); }
.capture-row { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 8px; padding: 5px 0; font-size: 10px; }
.capture-row > span { color: #7d93a2; overflow-wrap: anywhere; }
.capture-row > code { color: #b8cbd6; font: 11px/1.6 ui-monospace,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.capture-row.named > span { color: rgb(var(--match)); }
@media (max-width: 650px) {
  .dev-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .dev-tool .content-card { padding: 16px; }
  .dev-tool input:not([type=checkbox]), .dev-tool select, .dev-tool textarea { font-size: 16px; }
  .jwt-workspace { grid-template-columns: minmax(0,1fr); }
  .editor-box { padding: 12px; }
  .json-path { width: 100%; margin-left: 0; }
  .json-field { padding: 7px; }
  .json-children { padding-left: 4px; margin-left: 4px; }
  .json-values { gap: 5px; }
  .json-value { font-size: 11px; padding: 5px; }
  .diff-pane { font-size: 11px; }
  .compare-line .line-number { flex-basis: 28px; padding-right: 4px; }
  .compare-line .line-text { padding: 0 6px; }
  .result-heading { gap: 10px; flex-wrap: wrap; }
  .result-heading h4 { font-size: 18px; }
  .result-metrics { gap: 6px; }
  .result-metric { padding: 11px 9px; }
  .result-metric strong { font-size: 16px; }
  .result-columns, .match-list { grid-template-columns: minmax(0,1fr); }
  .value-card { padding: 14px; }
  .digest-card .value-code { font-size: 12px; }
  .uuid-colour { font-size: 11px; }
}
