:root {
  --bg-page: #d4dde9;
  --bg-grid-minor: rgba(24, 72, 165, 0.12);
  --bg-grid-major: rgba(24, 72, 165, 0.22);
  --panel: rgba(226, 232, 240, 0.96);
  --panel-soft: #dae3ee;
  --surface-0: #e5ebf3;
  --surface-1: #d9e1ec;
  --surface-2: #ccd5e2;
  --line: #9eb1ca;
  --line-strong: #6e8198;
  --ink: #2d3f56;
  --muted: #51657f;
  --accent: #1851bf;
  --accent-strong: #0f3f9a;
  --ok: #1b6a42;
  --danger: #a63330;
  --code-bg: #2f3948;
  --code-bg-alt: #252e3b;
  --code-ink: #f3f7fc;
  --code-line: #c0cedf;
  --diff-add-bg: #e9f8ef;
  --diff-del-bg: #fbeceb;
  --diff-change-bg: #efe6d3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  background-color: var(--bg-page);
  background-image:
    linear-gradient(var(--bg-grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid-minor) 1px, transparent 1px),
    linear-gradient(var(--bg-grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid-major) 1px, transparent 1px),
    radial-gradient(circle at 14% 10%, rgba(230, 236, 244, 0.72) 0%, rgba(230, 236, 244, 0) 48%),
    radial-gradient(circle at 86% 3%, rgba(223, 231, 241, 0.62) 0%, rgba(223, 231, 241, 0) 38%);
  background-size:
    18px 18px,
    18px 18px,
    90px 90px,
    90px 90px,
    auto,
    auto;
  background-position:
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    0 0;
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1520px;
  margin: 10px auto;
  min-height: calc(100vh - 20px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #e7edf5, #dbe3ee);
  box-shadow:
    0 26px 54px rgba(18, 45, 92, 0.16),
    0 4px 12px rgba(18, 45, 92, 0.1);
}

.top-bar {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #e3eaf3, #d7e0eb);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.brand-wrap h1 {
  margin: 0;
  font: 700 1.36rem/1 "Chakra Petch", sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 6px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 2px 7px;
  background: var(--surface-0);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.64rem;
  color: var(--muted);
  font-weight: 600;
}

.workspace-grid {
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.pane {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 9px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.pane::before {
  content: "";
  display: none;
  position: absolute;
  top: -9px;
  right: 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 1px 5px;
  font: 600 0.6rem/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
}

.workspace-grid .pane:nth-of-type(2)::before {
  content: "";
  display: none;
}

.pane-resizer {
  position: relative;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.pane-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 72px;
  border-radius: 999px;
  background: rgba(110, 129, 152, 0.68);
}

.pane-resizer:hover::before,
.workspace-grid.is-resizing .pane-resizer::before {
  background: #4d6788;
}

body.pane-resize-active,
body.pane-resize-active * {
  cursor: col-resize !important;
  user-select: none !important;
}

.editor-shell {
  position: relative;
  flex: 1;
  min-height: 0;
}

.syntax-highlight {
  position: absolute;
  inset: 1px;
  margin: 0;
  padding: 10px 10px 10px 64px;
  border-radius: 7px;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(180deg, var(--code-bg), var(--code-bg-alt)),
    repeating-linear-gradient(to bottom,
      rgba(244, 248, 255, 0.06),
      rgba(244, 248, 255, 0.06) 24px,
      rgba(244, 248, 255, 0.02) 24px,
      rgba(244, 248, 255, 0.02) 48px);
  color: var(--code-ink);
  font: 500 0.83rem/1.55 "IBM Plex Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: auto;
  scrollbar-width: none;
}

.syntax-highlight::-webkit-scrollbar {
  display: none;
}

.code-area {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: clamp(440px, 60vh, 960px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 10px 10px 44px;
  background:
    linear-gradient(180deg, var(--code-bg), var(--code-bg-alt)),
    repeating-linear-gradient(to bottom,
      rgba(244, 248, 255, 0.06),
      rgba(244, 248, 255, 0.06) 24px,
      rgba(244, 248, 255, 0.02) 24px,
      rgba(244, 248, 255, 0.02) 48px);
  color: var(--code-ink);
  font: 500 0.83rem/1.55 "IBM Plex Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
  overflow-y: auto;
  resize: vertical;
  tab-size: 2;
}

.editor-shell.json-syntax-active .code-area {
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
}

.editor-shell.json-syntax-active .code-area::selection {
  background: rgba(188, 204, 227, 0.36);
}

.syntax-token.tok-punc {
  color: #d8e1ed;
}

.syntax-token.tok-key {
  color: #9ed8ff;
}

.syntax-token.tok-string {
  color: #d8eec7;
}

.syntax-token.tok-number {
  color: #ffd89e;
}

.syntax-token.tok-boolean {
  color: #f0bdd8;
}

.syntax-token.tok-null {
  color: #f3aaa7;
}

#right-editor-shell .syntax-highlight {
  filter: saturate(0.7) contrast(1.06);
}

#right-editor-shell .syntax-token.tok-punc {
  color: #d6e9ff;
}

#right-editor-shell .syntax-token.tok-key {
  color: #63d0ff;
}

#right-editor-shell .syntax-token.tok-string {
  color: #b4f38b;
}

#right-editor-shell .syntax-token.tok-number {
  color: #ffc46b;
}

#right-editor-shell .syntax-token.tok-boolean {
  color: #ee9be0;
}

#right-editor-shell .syntax-token.tok-null {
  color: #ff8f85;
}

.code-area::placeholder {
  color: #cfdae7;
}

.code-area.with-gutter {
  padding-left: 64px;
}

.code-area.has-error {
  padding-bottom: 114px;
}

.code-area:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.code-area.error-focus {
  box-shadow:
    inset 0 0 0 1px rgba(201, 54, 46, 0.62),
    0 0 0 2px rgba(201, 54, 46, 0.16);
}

.code-area:focus,
.mode-btn:focus-visible,
.ghost-btn:focus-visible,
.search-input:focus,
.crumb:focus-visible,
.miller-item:focus-visible {
  outline: 2px solid rgba(17, 73, 177, 0.36);
  outline-offset: 1px;
}

.error-overlay {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(166, 51, 48, 0.4);
  border-radius: 6px;
  background: rgba(239, 229, 231, 0.96);
  color: #832622;
  padding: 8px;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.error-overlay.hidden {
  display: none;
}

.fold-gutter {
  position: absolute;
  inset: 1px auto 1px 45px;
  width: 20px;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}

.fold-icon {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #d0dceb;
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
  transition: background-color 110ms ease;
}

.fold-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
}

.fold-icon.collapsed::before {
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent currentColor;
}

.fold-icon.expanded::before {
  border-style: solid;
  border-width: 6px 4px 0 4px;
  border-color: currentColor transparent transparent transparent;
}

.fold-icon:hover {
  background: rgba(206, 219, 236, 0.18);
  color: #f2f8ff;
}

.fold-icon:active {
  background: rgba(206, 219, 236, 0.28);
}

.line-gutter {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: 44px;
  overflow: hidden;
  border-right: 1px solid rgba(194, 208, 227, 0.28);
  pointer-events: none;
  z-index: 3;
}

.line-numbers {
  position: relative;
}

.line-number {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: right;
  padding-right: 6px;
  color: var(--code-line);
  font: 500 0.72rem/1 "IBM Plex Mono", monospace;
}

.line-number.error-line {
  color: #ffb3af;
  background: rgba(166, 51, 48, 0.24);
}

.overlay-title {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
}

.overlay-line {
  margin: 0;
  font-size: 0.73rem;
  line-height: 1.4;
}

.overlay-code {
  margin: 0;
  border: 1px solid rgba(166, 51, 48, 0.3);
  border-radius: 5px;
  background: #f3e8e8;
  color: #7f2e28;
  padding: 6px;
  font: 500 0.71rem/1.35 "IBM Plex Mono", monospace;
  white-space: pre-wrap;
}

.pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pane-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.state-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border: 1px solid currentColor;
  font-family: "IBM Plex Mono", monospace;
}

.state-pill.neutral {
  color: #4d6078;
  background: var(--surface-1);
}

.state-pill.valid {
  color: var(--ok);
  background: #e9f7ef;
}

.state-pill.invalid {
  color: var(--danger);
  background: #fbeae9;
}

.meta-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.mode-switch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mode-btn {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 5px 9px;
  background: var(--surface-1);
  font: 600 0.68rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #294e82;
  cursor: pointer;
  transition: 120ms ease;
}

.mode-btn:hover {
  border-color: var(--accent);
  background: var(--surface-0);
}

.mode-btn.active {
  color: #f6fbff;
  border-color: var(--accent-strong);
  background: linear-gradient(150deg, var(--accent-strong), var(--accent));
  box-shadow: 0 6px 16px rgba(19, 70, 160, 0.28);
}

.right-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.right-content.diff-active {
  gap: 12px;
}

.right-content.diff-active #right-editor-shell {
  flex: 0 0 clamp(200px, 32vh, 320px);
  min-height: 0;
}

.right-content.diff-active #right-editor-shell .code-area {
  min-height: 0;
}

.view-panel {
  flex: 1;
  min-height: 0;
}

#diff-view {
  margin-top: 12px;
}

.right-content.diff-active #diff-view {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.explore-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.search-input {
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 6px 8px;
  background: var(--surface-0);
  min-width: 220px;
  color: var(--ink);
  font-size: 0.77rem;
}

.breadcrumb-row {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-0);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.crumb {
  border: 0;
  background: transparent;
  color: #24508d;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 600;
}

.crumb:hover {
  background: rgba(19, 70, 160, 0.1);
}

.crumb-sep {
  color: #90a8c9;
  font-size: 0.72rem;
}

.search-results {
  margin-top: 6px;
  display: grid;
  gap: 5px;
  max-height: 108px;
  overflow: auto;
}

.search-hit {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-0);
  color: #24456f;
  text-align: left;
  cursor: pointer;
  padding: 6px 8px;
  font-size: 0.74rem;
}

.search-hit:hover {
  border-color: var(--accent);
}

.miller-columns {
  margin-top: 7px;
  min-height: 188px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-0);
  display: flex;
  gap: 8px;
  padding: 6px;
  overflow: auto;
}

.miller-columns.empty-state {
  display: grid;
  place-items: center;
  color: #6681a5;
  font-size: 0.8rem;
}

.miller-col {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
}

.miller-head {
  border-bottom: 1px solid var(--line);
  padding: 7px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4d6788;
  font-weight: 700;
}

.miller-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  gap: 5px;
}

.miller-item {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-0);
  padding: 6px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  cursor: pointer;
  color: var(--ink);
}

.miller-item:hover {
  border-color: var(--accent);
}

.miller-item.active {
  border-color: var(--accent-strong);
  background: linear-gradient(120deg, rgba(24, 72, 165, 0.16), rgba(24, 72, 165, 0.11));
}

.miller-item.match {
  box-shadow: inset 0 0 0 1px rgba(189, 101, 24, 0.78);
}

.item-key {
  max-width: 138px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 0.77rem/1.2 "IBM Plex Mono", monospace;
}

.item-meta {
  color: #506b8e;
  font-size: 0.71rem;
  max-width: 124px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diff-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.diff-output {
  min-height: 192px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-0);
  overflow-y: auto;
  overflow-x: hidden;
}

.diff-output.empty-state {
  display: grid;
  place-items: center;
  color: #617ea2;
  font-size: 0.8rem;
  padding: 10px;
}

.diff-summary {
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  color: #274571;
  font-size: 0.76rem;
}

.udiff-row {
  display: grid;
  grid-template-columns: 54px 54px minmax(0, 1fr);
  border-bottom: 1px solid rgba(174, 196, 230, 0.7);
}

.udiff-row.del {
  background: var(--diff-del-bg);
}

.udiff-row.add {
  background: var(--diff-add-bg);
}

.udiff-gap {
  border-bottom: 1px solid rgba(174, 196, 230, 0.7);
  padding: 5px 10px;
  color: #6d87ab;
  background: var(--surface-1);
  font: 500 0.72rem/1.4 "IBM Plex Mono", monospace;
}

.udiff-ln {
  border-right: 1px solid rgba(174, 196, 230, 0.7);
  text-align: right;
  padding: 2px 8px 2px 0;
  color: #6b87ad;
  font: 500 0.7rem/1.45 "IBM Plex Mono", monospace;
}

.udiff-txt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: visible;
  padding: 2px 8px;
  color: #1f3761;
  font: 500 0.76rem/1.45 "IBM Plex Mono", monospace;
}

.table-output {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-0);
  overflow: auto;
}

.table-output.empty-state {
  display: grid;
  place-items: center;
  color: #617ea2;
  font-size: 0.8rem;
  padding: 10px;
}

.json-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  table-layout: auto;
  font: 500 0.74rem/1.45 "IBM Plex Mono", monospace;
  color: #2a425f;
}

.json-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line-strong);
  border-right: 1px solid var(--line);
  background: #d6e0ec;
  padding: 7px 8px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.json-table thead th:last-child {
  border-right: 0;
}

.json-table tbody th,
.json-table tbody td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.json-table tbody th:last-child,
.json-table tbody td:last-child {
  border-right: 0;
}

.json-table-index-head,
.json-table-index-cell {
  width: 52px;
  min-width: 52px;
  color: #5d7899;
  background: #dce5f0;
}

.table-cell-empty {
  color: #6e86a3;
  font-style: italic;
}

.table-cell-null {
  color: #b84b4a;
}

.table-cell-number {
  color: #8c6132;
}

.table-cell-boolean {
  color: #754f8a;
}

.table-cell-array,
.table-cell-object {
  color: #365f95;
}

.view-error {
  border: 1px solid rgba(166, 51, 48, 0.4);
  border-radius: 6px;
  background: rgba(239, 229, 231, 0.96);
  color: #7f2e28;
  padding: 8px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.status-bar {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #dfe7f1, #d3dce8);
  min-height: 42px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-path {
  margin: 0;
  color: #234978;
  font: 600 0.74rem/1.3 "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button,
input,
textarea {
  font: inherit;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ghost-btn {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 5px 9px;
  background: var(--surface-1);
  color: #2a4f83;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "IBM Plex Mono", monospace;
  cursor: pointer;
  transition: 120ms ease;
}

.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--surface-0);
}

.ghost-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #34557f;
  font-size: 0.72rem;
}

.toast {
  position: fixed;
  right: 12px;
  bottom: 12px;
  background: #10376f;
  color: #eff6ff;
  border: 1px solid rgba(189, 213, 246, 0.48);
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 0.73rem;
  opacity: 0;
  transform: translateY(6px);
  transition: 180ms ease;
  pointer-events: none;
  font-family: "IBM Plex Mono", monospace;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1220px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pane-resizer {
    display: none;
  }

  .code-area {
    min-height: clamp(400px, 54vh, 800px);
  }
}

@media (max-width: 720px) {
  .page-shell {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
    border-left: 0;
    border-right: 0;
  }

  .top-bar {
    padding: 10px;
  }

  .workspace-grid {
    padding: 8px;
    gap: 8px;
  }

  .pane {
    padding: 8px;
  }

  .status-bar {
    padding: 6px 8px;
  }

  .code-area {
    min-height: 54vh;
  }

  .search-input {
    min-width: 132px;
  }

  .miller-col {
    min-width: 186px;
  }

  .udiff-row {
    grid-template-columns: 44px 44px minmax(0, 1fr);
  }
}

/* Dark Glass Instrument Panel */
:root {
  --bg-page: #060b16;
  --bg-grid-minor: rgba(84, 114, 170, 0.1);
  --bg-grid-major: rgba(84, 114, 170, 0.22);
  --panel: rgba(17, 23, 37, 0.72);
  --panel-soft: rgba(19, 29, 48, 0.82);
  --surface-0: rgba(18, 29, 47, 0.75);
  --surface-1: rgba(24, 34, 54, 0.8);
  --surface-2: rgba(34, 48, 72, 0.86);
  --line: rgba(140, 171, 224, 0.28);
  --line-strong: rgba(162, 193, 245, 0.52);
  --ink: #dbe7ff;
  --muted: #9db3d8;
  --accent: #78b4ff;
  --accent-strong: #4697ff;
  --ok: #51d0a3;
  --danger: #ff7f8f;
  --code-bg: #0b1220;
  --code-bg-alt: #0e1526;
  --code-ink: #dce8ff;
  --code-line: #7f97be;
  --diff-add-bg: rgba(74, 160, 122, 0.16);
  --diff-del-bg: rgba(198, 80, 102, 0.18);
  --diff-change-bg: rgba(191, 155, 82, 0.2);
}

body {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background-color: var(--bg-page);
  background-image:
    linear-gradient(var(--bg-grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid-minor) 1px, transparent 1px),
    linear-gradient(var(--bg-grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid-major) 1px, transparent 1px),
    radial-gradient(circle at 14% 10%, rgba(72, 122, 210, 0.2), transparent 45%),
    radial-gradient(circle at 82% 12%, rgba(71, 150, 219, 0.18), transparent 42%);
  background-size:
    18px 18px,
    18px 18px,
    108px 108px,
    108px 108px,
    auto,
    auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 90%, rgba(72, 125, 207, 0.18), transparent 38%),
    radial-gradient(circle at 90% 86%, rgba(85, 122, 201, 0.12), transparent 35%);
  z-index: 0;
}

.page-shell {
  max-width: 1580px;
  margin: 12px auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(16, 23, 38, 0.92), rgba(11, 17, 29, 0.88));
  box-shadow:
    0 26px 72px rgba(2, 7, 18, 0.6),
    inset 0 1px 0 rgba(194, 217, 255, 0.08);
  backdrop-filter: blur(18px);
}

.top-bar {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 35, 56, 0.8), rgba(17, 26, 43, 0.72));
}

.brand-wrap h1 {
  font: 700 1.38rem/1 "Red Hat Display", sans-serif;
  letter-spacing: 0.03em;
  color: #e6f1ff;
  text-transform: none;
}

.workspace-grid {
  padding: 12px;
}

.pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(20, 30, 48, 0.72), rgba(11, 18, 30, 0.62));
  box-shadow:
    inset 0 1px 0 rgba(182, 211, 255, 0.08),
    0 12px 28px rgba(3, 8, 22, 0.36);
  backdrop-filter: blur(14px);
}

.pane::before {
  border: 1px solid rgba(145, 175, 228, 0.44);
  border-radius: 999px;
  background: rgba(9, 18, 33, 0.84);
  color: #9ec7ff;
  padding: 2px 8px;
  font: 600 0.62rem/1.2 "IBM Plex Mono", monospace;
}

.pane-resizer::before {
  width: 3px;
  height: 76px;
  background: linear-gradient(180deg, rgba(129, 170, 237, 0.2), rgba(129, 170, 237, 0.74), rgba(129, 170, 237, 0.2));
}

.pane-resizer:hover::before,
.workspace-grid.is-resizing .pane-resizer::before {
  background: linear-gradient(180deg, rgba(145, 189, 255, 0.36), rgba(145, 189, 255, 0.88), rgba(145, 189, 255, 0.36));
}

.syntax-highlight,
.code-area {
  border: 1px solid rgba(137, 171, 231, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(180deg, var(--code-bg), var(--code-bg-alt)),
    repeating-linear-gradient(to bottom,
      rgba(219, 233, 255, 0.06),
      rgba(219, 233, 255, 0.06) 24px,
      rgba(219, 233, 255, 0.02) 24px,
      rgba(219, 233, 255, 0.02) 48px);
  color: var(--code-ink);
}

.code-area::placeholder {
  color: rgba(175, 196, 228, 0.76);
}

.syntax-token.tok-punc {
  color: #ccdcfa;
}

.syntax-token.tok-key {
  color: #92c9ff;
}

.syntax-token.tok-string {
  color: #b8e6d3;
}

.syntax-token.tok-number {
  color: #f0cd9f;
}

.syntax-token.tok-boolean {
  color: #e4b2d9;
}

.syntax-token.tok-null {
  color: #f1a3b4;
}

.line-gutter {
  border-right: 1px solid rgba(140, 171, 224, 0.25);
}

.line-number {
  color: var(--code-line);
}

.line-number.error-line {
  color: #ffd6db;
  background: rgba(166, 51, 48, 0.24);
}

.error-overlay,
.view-error {
  border: 1px solid rgba(255, 127, 143, 0.48);
  background: rgba(49, 20, 35, 0.9);
  color: #ffd4dc;
}

.overlay-code {
  border: 1px solid rgba(255, 127, 143, 0.36);
  background: rgba(30, 12, 19, 0.84);
  color: #ffd2da;
}

.state-pill.neutral {
  color: #aac1e2;
  background: rgba(31, 46, 71, 0.8);
}

.state-pill.valid {
  color: #9bf3cf;
  background: rgba(13, 60, 47, 0.62);
}

.state-pill.invalid {
  color: #ffb4be;
  background: rgba(89, 29, 45, 0.62);
}

.meta-text {
  color: var(--muted);
}

.mode-btn,
.ghost-btn {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(40, 57, 86, 0.78), rgba(24, 35, 55, 0.84));
  color: #d1e3ff;
  font-family: "IBM Plex Mono", monospace;
}

.mode-btn:hover,
.ghost-btn:hover {
  border-color: rgba(135, 182, 255, 0.86);
  background: linear-gradient(160deg, rgba(50, 71, 107, 0.9), rgba(34, 50, 77, 0.9));
  color: #ecf4ff;
}

.mode-btn.active,
.ghost-btn.active {
  color: #041423;
  border-color: rgba(170, 212, 255, 0.95);
  background: linear-gradient(160deg, #a8d6ff, #7db7ff);
  box-shadow:
    0 12px 26px rgba(14, 73, 161, 0.42),
    inset 0 1px 0 rgba(250, 255, 255, 0.78);
}

.mode-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.44;
}

.search-input,
.breadcrumb-row,
.search-hit,
.miller-columns,
.miller-col,
.miller-item,
.diff-output,
.table-output {
  border-color: var(--line);
  background: rgba(16, 26, 43, 0.78);
  color: #d4e5ff;
}

.crumb {
  color: #b4d3ff;
}

.crumb:hover {
  background: rgba(107, 158, 234, 0.18);
}

.crumb-sep {
  color: #7b9bcf;
}

.search-hit:hover,
.miller-item:hover {
  border-color: var(--accent);
}

.miller-head {
  border-bottom: 1px solid var(--line);
  color: #9ebae3;
}

.miller-item.active {
  border-color: rgba(137, 185, 255, 0.92);
  background: linear-gradient(130deg, rgba(69, 115, 190, 0.36), rgba(39, 73, 130, 0.3));
}

.item-meta {
  color: #91acd5;
}

.diff-output.empty-state,
.table-output.empty-state,
.miller-columns.empty-state {
  color: #9ab3d8;
}

.diff-summary {
  border-bottom: 1px solid var(--line);
  color: #bdd6ff;
}

.udiff-row {
  border-bottom: 1px solid rgba(109, 146, 201, 0.36);
}

.udiff-gap {
  border-bottom: 1px solid rgba(109, 146, 201, 0.36);
  background: rgba(30, 46, 71, 0.68);
  color: #9bb8e4;
}

.udiff-ln {
  border-right: 1px solid rgba(109, 146, 201, 0.36);
  color: #95b1dc;
}

.udiff-txt {
  color: #d3e3ff;
}

.json-table {
  color: #d3e3ff;
}

.json-table thead th {
  border-bottom: 1px solid var(--line-strong);
  border-right: 1px solid var(--line);
  background: rgba(27, 41, 65, 0.94);
  color: #c2dbff;
}

.json-table tbody th,
.json-table tbody td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.json-table-index-head,
.json-table-index-cell {
  color: #9ab5df;
  background: rgba(24, 37, 58, 0.92);
}

.table-cell-empty {
  color: #8ea7cb;
}

.table-cell-null {
  color: #ff9aac;
}

.table-cell-number {
  color: #e7be8d;
}

.table-cell-boolean {
  color: #cfa6dc;
}

.table-cell-array,
.table-cell-object {
  color: #9bc8ff;
}

.status-bar {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(25, 37, 58, 0.9), rgba(15, 23, 38, 0.82));
}

.status-path {
  color: #bbd6ff;
}

.toggle-inline {
  color: #c2d9ff;
}

.toast {
  right: 16px;
  bottom: 16px;
  background: rgba(12, 22, 37, 0.94);
  color: #d8e9ff;
  border: 1px solid rgba(152, 189, 246, 0.58);
  border-radius: 8px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
}

.path-hud {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  min-width: 260px;
  max-width: min(560px, calc(100vw - 120px));
  border: 1px solid rgba(151, 187, 243, 0.52);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(20, 34, 58, 0.78), rgba(12, 21, 37, 0.72));
  box-shadow:
    0 18px 44px rgba(2, 8, 22, 0.55),
    inset 0 1px 0 rgba(213, 232, 255, 0.14);
  backdrop-filter: blur(14px);
  padding: 7px 11px;
  transition:
    left 220ms ease,
    right 220ms ease,
    transform 220ms ease,
    opacity 220ms ease;
  pointer-events: none;
}

.path-hud.left {
  left: clamp(156px, 24vw, 420px);
  right: auto;
  transform: translateX(-40%);
}

.path-hud.right {
  left: auto;
  right: clamp(16px, 8vw, 116px);
  transform: translateX(0);
}

.path-hud.center {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.path-hud-label {
  margin: 0;
  color: #95b8eb;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font: 600 0.6rem/1.2 "IBM Plex Mono", monospace;
}

.path-hud-path {
  margin: 4px 0 0;
  color: #d4e6ff;
  font: 600 0.78rem/1.35 "IBM Plex Mono", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: min(14vh, 110px) 18px 18px;
  background: rgba(3, 7, 15, 0.58);
  backdrop-filter: blur(7px);
}

.command-panel {
  width: min(680px, calc(100vw - 36px));
  border-radius: 14px;
  border: 1px solid rgba(160, 196, 250, 0.56);
  background: linear-gradient(165deg, rgba(16, 27, 45, 0.94), rgba(10, 18, 33, 0.9));
  box-shadow:
    0 34px 64px rgba(1, 4, 12, 0.7),
    inset 0 1px 0 rgba(216, 232, 255, 0.14);
  overflow: hidden;
}

.command-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(140, 176, 233, 0.36);
}

.command-title {
  margin: 0;
  font: 600 0.95rem/1 "Red Hat Display", sans-serif;
  color: #e4efff;
}

.command-hint {
  margin: 0;
  color: #9ab7e4;
  font: 600 0.64rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-input {
  width: calc(100% - 24px);
  margin: 11px 12px 10px;
  border: 1px solid rgba(138, 176, 235, 0.52);
  border-radius: 10px;
  background: rgba(14, 22, 38, 0.84);
  color: #ddeafe;
  padding: 10px 12px;
  font: 500 0.9rem/1.35 "Manrope", sans-serif;
}

.command-input::placeholder {
  color: rgba(155, 181, 223, 0.8);
}

.command-input:focus {
  outline: 2px solid rgba(120, 180, 255, 0.44);
  outline-offset: 1px;
}

.command-results {
  max-height: min(56vh, 440px);
  overflow: auto;
  padding: 0 10px 10px;
  display: grid;
  gap: 7px;
}

.command-item {
  border: 1px solid rgba(127, 167, 228, 0.42);
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(28, 42, 67, 0.78), rgba(18, 29, 48, 0.76));
  text-align: left;
  color: #d7e7ff;
  padding: 9px 11px;
  cursor: pointer;
}

.command-item:hover {
  border-color: rgba(138, 192, 255, 0.92);
}

.command-item.active {
  border-color: rgba(168, 210, 255, 0.95);
  background: linear-gradient(150deg, rgba(68, 109, 181, 0.52), rgba(42, 73, 127, 0.52));
  box-shadow: 0 0 0 1px rgba(122, 172, 248, 0.36) inset;
}

.command-item-copy {
  display: grid;
  gap: 3px;
}

.command-item-label {
  font: 600 0.83rem/1.2 "IBM Plex Mono", monospace;
}

.command-item-hint {
  color: #9eb9e3;
  font-size: 0.73rem;
}

.command-empty {
  margin: 4px 2px;
  padding: 10px;
  border: 1px dashed rgba(127, 167, 228, 0.36);
  border-radius: 10px;
  color: #aac5ec;
  font-size: 0.8rem;
}

.command-palette-open .page-shell {
  filter: saturate(0.88) brightness(0.92);
}

@media (max-width: 1220px) {
  .path-hud {
    bottom: 14px;
    max-width: calc(100vw - 26px);
  }

  .path-hud.left,
  .path-hud.right,
  .path-hud.center {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  .top-bar {
    padding: 10px;
  }

  .row-actions {
    width: 100%;
  }

  .row-actions .ghost-btn {
    flex: 1;
    min-width: 0;
  }

  .path-hud {
    bottom: 8px;
    border-radius: 10px;
    padding: 6px 8px;
  }

  .path-hud-path {
    font-size: 0.72rem;
  }

  .command-panel {
    width: calc(100vw - 24px);
  }

  .command-input {
    margin: 10px;
    width: calc(100% - 20px);
  }

  .command-results {
    padding: 0 8px 8px;
  }
}

/* Flat refinement for simple utility workflow */
:root {
  --line: #464c59;
  --line-strong: #5c6474;
  --accent: #6b7382;
  --accent-strong: #5b6271;
  --muted: #b7beca;
  --ink: #eceff4;
}

body {
  font-family: "Nunito Sans", sans-serif;
  background-color: #121316;
  background-image: none;
}

body::before {
  display: none;
}

.page-shell {
  border-radius: 8px;
  border-color: #2f333a;
  background: #1a1d22;
  box-shadow: none;
  backdrop-filter: none;
}

.top-bar {
  border-bottom-color: #32363f;
  background: #20242a;
}

.brand-wrap h1 {
  color: #f2f3f5;
  font: 700 1.2rem/1 "Nunito Sans", sans-serif;
  letter-spacing: 0;
}

.workspace-grid {
  padding: 10px;
}

.pane {
  border-radius: 8px;
  border-color: #313641;
  background: #232831;
  box-shadow: none;
  backdrop-filter: none;
}

.pane::before {
  content: none;
  display: none;
}

.workspace-grid .pane:nth-of-type(2)::before {
  content: none;
  display: none;
}

.pane-resizer::before {
  width: 2px;
  border-radius: 999px;
  background: rgba(167, 173, 184, 0.55);
}

.pane-resizer:hover::before,
.workspace-grid.is-resizing .pane-resizer::before {
  background: rgba(196, 202, 212, 0.95);
}

.syntax-highlight,
.code-area,
.line-number,
.overlay-code {
  font-family: "JetBrains Mono", monospace;
}

.syntax-highlight,
.code-area {
  border-radius: 8px;
  border-color: #3a4050;
  background: #171b22;
  color: #eceef2;
}

.code-area::placeholder {
  color: #9ba3b1;
}

.syntax-token.tok-punc {
  color: #b9c0cb;
}

.syntax-token.tok-key {
  color: #d8dde6;
}

.syntax-token.tok-string {
  color: #c6d3bc;
}

.syntax-token.tok-number {
  color: #d8caa7;
}

.syntax-token.tok-boolean {
  color: #cab8cd;
}

.syntax-token.tok-null {
  color: #d6b1b8;
}

.line-gutter {
  border-right-color: #3a404d;
}

.line-number {
  color: #8f97a6;
}

.state-pill,
.mode-btn,
.ghost-btn,
.toggle-inline,
.status-path,
.item-key,
.item-meta,
.miller-head,
.udiff-gap,
.udiff-ln,
.udiff-txt,
.json-table,
.path-hud-label,
.path-hud-path,
.command-hint,
.command-item-label,
.command-input {
  font-family: "Nunito Sans", sans-serif;
}

.command-title {
  font-family: "Nunito Sans", sans-serif;
  letter-spacing: 0;
}

.mode-btn,
.ghost-btn,
.state-pill,
.status-path,
.command-hint {
  text-transform: none;
  letter-spacing: 0.01em;
}

.path-hud-label {
  text-transform: none;
  letter-spacing: 0.02em;
}

.mode-btn,
.ghost-btn {
  border-radius: 6px;
  border-color: #4b5160;
  background: #2b303a;
  box-shadow: none;
  color: #e8ebf0;
}

.mode-btn:hover,
.ghost-btn:hover {
  background: #363d49;
}

.mode-btn.active,
.ghost-btn.active {
  border-color: #697183;
  color: #ffffff;
  background: #4a5363;
  box-shadow: none;
}

.state-pill.neutral {
  color: #d6dbe5;
  background: #363d49;
}

.state-pill.valid {
  color: #d7eee0;
  background: #395145;
}

.state-pill.invalid {
  color: #f4d5da;
  background: #574047;
}

.search-input,
.breadcrumb-row,
.search-hit,
.miller-columns,
.miller-col,
.miller-item,
.diff-output,
.table-output {
  border-color: #464c59;
  background: #2a3039;
  color: #e6e9ef;
}

.miller-item.active {
  background: #3b4350;
}

.search-input::placeholder {
  color: #a3aab7;
}

.crumb {
  color: #d5dae3;
}

.crumb:hover {
  background: #3a414d;
}

.crumb-sep {
  color: #a0a8b8;
}

.search-hit:hover,
.miller-item:hover {
  border-color: #5a6272;
}

.status-path {
  color: #e4e8ef;
}

.meta-text,
.item-meta,
.command-hint,
.path-hud-label {
  color: #c4cad6;
}

.path-hud-path,
.command-title {
  color: #eceff4;
}

.status-bar {
  border-top-color: #323846;
  background: #1f242d;
}

.toast {
  border-radius: 6px;
  border-color: #5a6272;
  background: #303743;
  color: #f1f3f7;
  box-shadow: none;
}

.path-hud {
  border-radius: 8px;
  border-color: #565e6e;
  background: #2d3440;
  box-shadow: none;
  backdrop-filter: none;
}

.command-palette {
  background: rgba(8, 10, 14, 0.62);
  backdrop-filter: none;
}

.command-panel {
  border-radius: 10px;
  border-color: #5a6274;
  background: #262c35;
  box-shadow: none;
}

.command-item {
  border-radius: 8px;
  border-color: #4e5564;
  background: #333947;
  color: #e9ecf2;
}

.command-item.active {
  border-color: #666f82;
  background: #474f5f;
  box-shadow: none;
}

.code-area:focus,
.mode-btn:focus-visible,
.ghost-btn:focus-visible,
.search-input:focus,
.crumb:focus-visible,
.miller-item:focus-visible,
.command-input:focus,
.command-item:focus-visible {
  outline: 2px solid rgba(185, 193, 206, 0.5);
  outline-offset: 1px;
}