:root {
  --bg: #f7f4ec;
  --bg-alt: #efe6d3;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --text: #1c1a17;
  --muted: #5d5a52;
  --accent: #0f766e;
  --accent-2: #d9480f;
  --ok: #2b8a3e;
  --warn: #c92a2a;
  --radius-lg: 24px;
  --radius-md: 14px;
  --shadow: 0 20px 60px rgba(16, 24, 40, 0.12);
  --shadow-soft: 0 10px 26px rgba(16, 24, 40, 0.08);
}

html[data-theme='dark'] {
  --bg: #0f141b;
  --bg-alt: #121c27;
  --surface: rgba(18, 24, 33, 0.82);
  --surface-strong: #121a23;
  --text: #e8eef6;
  --muted: #9eb0c4;
  --accent: #14b8a6;
  --accent-2: #fb923c;
  --shadow: 0 20px 60px rgba(2, 8, 23, 0.5);
  --shadow-soft: 0 10px 26px rgba(2, 8, 23, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Space Grotesk', 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, #ffd8a8 0%, rgba(255, 216, 168, 0) 36%),
    radial-gradient(circle at 90% 0%, #99e9f2 0%, rgba(153, 233, 242, 0) 42%),
    linear-gradient(140deg, var(--bg) 0%, var(--bg-alt) 100%);
  min-height: 100vh;
}

html[data-theme='dark'] body {
  background:
    radial-gradient(circle at 10% 12%, rgba(251, 146, 60, 0.22) 0%, rgba(251, 146, 60, 0) 38%),
    radial-gradient(circle at 90% 0%, rgba(34, 211, 238, 0.2) 0%, rgba(34, 211, 238, 0) 42%),
    linear-gradient(145deg, #0b1118 0%, #131f2b 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

body.page-json-compare .container {
  width: min(1120px, 92vw);
}

body.page-text-compare .container,
body.page-xml-validator .container {
  width: min(1120px, 92vw);
}

body.page-json-compare main.container.hero,
body.page-json-compare footer.container {
  width: 100%;
  max-width: none;
  padding-left: 12px;
  padding-right: 12px;
}

body.page-text-compare main.container.hero,
body.page-text-compare footer.container,
body.page-xml-validator main.container.hero,
body.page-xml-validator footer.container {
  width: 100%;
  max-width: none;
  padding-left: 12px;
  padding-right: 12px;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(247, 244, 236, 0.8);
  border-bottom: 1px solid rgba(28, 26, 23, 0.08);
  transition: transform 0.24s ease, opacity 0.2s ease;
  will-change: transform, opacity;
}

html[data-theme='dark'] header.site-header {
  background: rgba(12, 18, 26, 0.8);
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

header.site-header.is-scroll-hidden {
  transform: translateY(calc(-100% - 4px));
  opacity: 0.03;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  header.site-header {
    transition: none;
  }

  .nav-pill,
  .nav-pill::after {
    transition: none;
  }
}

.header-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 18px 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 2rem;
  line-height: 1.05;
  transform: translateY(3px);
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #111827 url('/assets/branding/logo-merge-icon.svg') center / cover no-repeat;
  box-shadow: var(--shadow-soft);
}

.top-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  width: min(860px, 100%);
  justify-content: end;
  align-items: center;
  gap: 8px 10px;
  overflow: visible;
  padding-bottom: 0;
  justify-self: end;
}

.top-nav .nav-pill {
  flex: 0 0 auto;
  width: 100%;
}

.nav-pill-seo-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nav-pill {
  display: inline-flex;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  min-height: 40px;
  color: var(--muted);
  border: 1px solid rgba(28, 26, 23, 0.09);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
  transition:
    transform 0.24s ease,
    color 0.24s ease,
    border-color 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
}

.nav-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(130% 120% at 15% 0%, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0) 52%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

html[data-theme='dark'] .nav-pill::after {
  background: radial-gradient(130% 120% at 15% 0%, rgba(45, 212, 191, 0.24) 0%, rgba(45, 212, 191, 0) 58%);
}

.nav-pill:hover,
.nav-pill.active {
  color: var(--text);
  border-color: rgba(15, 118, 110, 0.52);
  background: linear-gradient(120deg, rgba(15, 118, 110, 0.16), rgba(217, 72, 15, 0.14));
  box-shadow:
    0 8px 18px rgba(15, 118, 110, 0.2),
    0 0 0 1px rgba(15, 118, 110, 0.18) inset;
}

.nav-pill:hover {
  transform: translateY(-1px);
}

.nav-pill:hover::after,
.nav-pill.active::after {
  opacity: 1;
}

.nav-pill:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.34);
  outline-offset: 2px;
}

html[data-theme='dark'] .nav-pill,
html[data-theme='dark'] .lang-trigger {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.68);
  color: #d7e2ef;
}

html[data-theme='dark'] .nav-pill:hover,
html[data-theme='dark'] .nav-pill.active {
  color: #f2f7ff;
  border-color: rgba(20, 184, 166, 0.58);
  background: linear-gradient(120deg, rgba(20, 184, 166, 0.24), rgba(251, 146, 60, 0.22));
  box-shadow:
    0 10px 22px rgba(7, 12, 20, 0.54),
    0 0 0 1px rgba(20, 184, 166, 0.3) inset;
}

html[data-theme='dark'] .nav-pill:focus-visible {
  outline-color: rgba(45, 212, 191, 0.52);
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  align-self: start;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  align-self: start;
}

.theme-toggle {
  width: 58px;
  height: 34px;
  border: 1px solid rgba(28, 26, 23, 0.14);
  border-radius: 999px;
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  color: #64748b;
  transition: 0.24s ease;
}

.theme-toggle:focus {
  outline: 2px solid rgba(15, 118, 110, 0.3);
  border-color: rgba(15, 118, 110, 0.45);
}

.theme-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  z-index: 2;
}

.theme-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.theme-icon path,
.theme-icon line,
.theme-icon circle {
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-knob {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
  left: 4px;
  top: 4px;
  transition: 0.22s ease;
}

.lang-trigger {
  border-radius: 999px;
  border: 1px solid rgba(28, 26, 23, 0.09);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.86rem;
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-trigger:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  border-color: rgba(15, 118, 110, 0.45);
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-label {
  font-weight: 600;
}

.lang-caret {
  color: var(--muted);
  font-size: 0.74rem;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(28, 26, 23, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  z-index: 40;
}

.lang-menu[hidden] {
  display: none !important;
}

.lang-option {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  min-height: 36px;
  padding: 7px 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lang-option:hover,
.lang-option.is-active {
  background: rgba(15, 118, 110, 0.12);
}

html[data-theme='dark'] .lang-menu {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.96);
}

html[data-theme='dark'] .lang-option:hover,
html[data-theme='dark'] .lang-option.is-active {
  background: rgba(20, 184, 166, 0.22);
}

html[data-theme='dark'] .theme-toggle {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

html[data-theme='dark'] .theme-knob {
  transform: translateX(24px);
  background: #0f172a;
  box-shadow: 0 4px 10px rgba(2, 8, 23, 0.4);
}

.lang-select {
  border-radius: 999px;
  border: 1px solid rgba(28, 26, 23, 0.09);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  padding: 9px 32px 9px 12px;
  font-size: 0.86rem;
  cursor: pointer;
}

.lang-select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  border-color: rgba(15, 118, 110, 0.45);
}

.mobile-nav-toggle {
  display: none;
  border: 1px solid rgba(28, 26, 23, 0.12);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  gap: 8px;
}

html[data-theme='dark'] .mobile-nav-toggle {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.42);
  color: #e2e8f0;
}

html[data-theme='dark'] .mobile-nav-toggle:hover {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(148, 163, 184, 0.58);
}

.hero {
  padding: 34px 0 26px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid rgba(28, 26, 23, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3.8vw, 34px);
  position: relative;
  overflow: hidden;
}

html[data-theme='dark'] .hero-card,
html[data-theme='dark'] .quick-tools,
html[data-theme='dark'] .next-step-card,
html[data-theme='dark'] .card,
html[data-theme='dark'] .faq-item,
html[data-theme='dark'] .ad-card,
html[data-theme='dark'] .metric,
html[data-theme='dark'] .json-workbench-editor,
html[data-theme='dark'] .json-inline-diff-view,
html[data-theme='dark'] .json-tree-panel,
html[data-theme='dark'] .json-diff-item,
html[data-theme='dark'] .line-number-wrap,
html[data-theme='dark'] .json-empty-result {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.28);
}

.hero-card::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 72, 15, 0.25) 0%, rgba(217, 72, 15, 0) 72%);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.45vw, 2.15rem);
  line-height: 1.16;
  max-width: 20ch;
}

.hero p {
  color: var(--muted);
  max-width: 66ch;
  font-size: 0.95rem;
}

body.page-home .hero h1 {
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
  max-width: 17ch;
}

body.page-tools .hero-card {
  padding: clamp(18px, 3vw, 28px);
}

body.page-tools .hero h1 {
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  line-height: 1.2;
  max-width: 28ch;
}

body.page-tools .hero p {
  max-width: 74ch;
  font-size: 0.92rem;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.quick-tools {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(28, 26, 23, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
}

.quick-tools-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.quick-tools-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.quick-tools-list {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-tool-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(28, 26, 23, 0.14);
  background: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  transition: 0.2s ease;
}

html[data-theme='dark'] .quick-tool-link {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(30, 41, 59, 0.84);
}

.quick-tool-link:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.5);
}

.quick-tool-link.is-featured {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(130deg, var(--accent), #0ea5a6);
}

.next-step {
  margin-top: 16px;
}

.next-step-card {
  padding: 18px 20px;
  border: 1px solid rgba(28, 26, 23, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.next-step-card h2 {
  margin: 6px 0 8px;
  font-size: 1.2rem;
}

.next-step-card p {
  margin: 0;
  color: var(--muted);
}

.next-step-actions {
  margin-top: 14px;
}

.quick-links-inline {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ad-zone {
  margin: 18px 0 34px;
}

.ad-card {
  border: 1px dashed rgba(28, 26, 23, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.64);
  padding: 14px;
}

.ad-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.ad-slot {
  min-height: 120px;
  border-radius: 10px;
  background: rgba(247, 244, 236, 0.75);
  display: block;
  overflow: hidden;
}

.btn {
  border: 0;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(130deg, var(--accent), #0ea5a6);
  box-shadow: var(--shadow-soft);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(28, 26, 23, 0.14);
  background: rgba(255, 255, 255, 0.75);
}

html[data-theme='dark'] .btn-ghost {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
}

.btn:hover {
  transform: translateY(-1px);
}

.icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  flex: 0 0 auto;
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.icon path,
.icon line,
.icon polyline,
.icon rect,
.icon circle {
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section {
  margin: 30px 0 56px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(28, 26, 23, 0.1);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  transition: 0.22s ease;
}

.card h3 {
  margin: 0 0 10px;
}

.card h3 a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card.card-clickable {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card.card-clickable::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 3px;
  border-radius: 0 0 10px 10px;
  background: transparent;
  transition: 0.22s ease;
}

.card.card-clickable:hover,
.card.card-clickable:focus-within {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.48);
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.16);
}

.card.card-clickable:hover::before,
.card.card-clickable:focus-within::before {
  opacity: 1;
}

.card.card-clickable.card-type-compare::before {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.card.card-clickable.card-type-json::before {
  background: linear-gradient(90deg, #7c3aed, #6366f1);
}

.card.card-clickable.card-type-token::before {
  background: linear-gradient(90deg, #475569, #1f2937);
}

.card.card-clickable.card-type-xml::before {
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.card.card-clickable.card-type-count::before {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.card.card-clickable.card-type-lorem::before {
  background: linear-gradient(90deg, #0891b2, #0ea5e9);
}

.card.card-clickable.card-type-compare:hover,
.card.card-clickable.card-type-compare:focus-within {
  border-color: rgba(15, 118, 110, 0.52);
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.2);
}

.card.card-clickable.card-type-json:hover,
.card.card-clickable.card-type-json:focus-within {
  border-color: rgba(99, 102, 241, 0.46);
  box-shadow: 0 18px 36px rgba(99, 102, 241, 0.2);
}

.card.card-clickable.card-type-token:hover,
.card.card-clickable.card-type-token:focus-within {
  border-color: rgba(51, 65, 85, 0.5);
  box-shadow: 0 18px 36px rgba(31, 41, 55, 0.2);
}

.card.card-clickable.card-type-xml:hover,
.card.card-clickable.card-type-xml:focus-within {
  border-color: rgba(37, 99, 235, 0.46);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.2);
}

.card.card-clickable.card-type-count:hover,
.card.card-clickable.card-type-count:focus-within {
  border-color: rgba(217, 119, 6, 0.48);
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.2);
}

.card.card-clickable.card-type-lorem:hover,
.card.card-clickable.card-type-lorem:focus-within {
  border-color: rgba(14, 165, 233, 0.48);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.2);
}

.faq {
  margin-top: 22px;
}

.faq-item {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(28, 26, 23, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.faq-item h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.tool-layout.compare-layout {
  grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.between-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  gap: 8px;
}

.between-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  width: 114px;
}

.json-center-diff-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.json-center-diff-nav .btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  justify-content: center;
  gap: 0;
}

.json-center-diff-nav .btn .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
}

.json-center-diff-counter {
  min-width: 52px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 600 0.74rem/1 'IBM Plex Mono', 'Fira Code', monospace;
  color: #64748b;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #fff;
}

.btn-compare-prominent {
  min-height: 46px;
  padding: 10px 14px;
  font-size: 0.95rem;
  line-height: 1.1;
  border-radius: 12px;
  justify-content: center;
  border: 1px solid rgba(15, 118, 110, 0.4);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.16);
}

.btn-compare-prominent.btn-icon-lg {
  min-width: 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 12px;
}

.btn-icon-compact {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.btn-swap-icon {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.btn-swap-icon .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

body.page-json-compare .field .json-side-title,
body.page-xml-validator .field .json-side-title {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: text;
  user-select: text;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.page-json-compare .json-side-title-wrap,
body.page-xml-validator .json-side-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
}

body.page-json-compare .json-side-title-wrap .json-side-title,
body.page-xml-validator .json-side-title-wrap .json-side-title {
  padding-right: 2px;
}

body.page-json-compare .json-side-title-pencil,
body.page-xml-validator .json-side-title-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.82);
  cursor: text;
  flex: 0 0 auto;
}

body.page-json-compare .json-side-title-pencil .icon,
body.page-xml-validator .json-side-title-pencil .icon {
  width: 12px;
  height: 12px;
}

body.page-json-compare .field .json-side-title:focus,
body.page-xml-validator .field .json-side-title:focus {
  border-color: rgba(15, 118, 110, 0.42);
  background: rgba(15, 118, 110, 0.08);
}

html[data-theme='dark'] body.page-json-compare .field .json-side-title:focus,
html[data-theme='dark'] body.page-xml-validator .field .json-side-title:focus {
  border-color: rgba(45, 212, 191, 0.54);
  background: rgba(20, 184, 166, 0.14);
}

html[data-theme='dark'] body.page-json-compare .json-side-title-pencil,
html[data-theme='dark'] body.page-xml-validator .json-side-title-pencil {
  color: #9fb3c8;
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(15, 23, 42, 0.82);
}

.lorem-controls {
  display: grid;
  gap: 12px;
}

.lorem-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lorem-control {
  display: grid;
  gap: 6px;
}

.lorem-control.wide {
  grid-column: 1 / -1;
}

.lorem-control label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.input-control {
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(28, 26, 23, 0.18);
  background: #fff;
  padding: 0 10px;
  color: var(--text);
  font: 600 0.87rem/1 'Manrope', sans-serif;
}

.lorem-steps {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.input-mini {
  width: 76px;
  text-align: center;
}

.lorem-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lorem-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.lorem-toggle input {
  width: 16px;
  height: 16px;
}

.lorem-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lorem-presets .btn-mini {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(100, 116, 139, 0.32);
}

.lorem-presets .btn-mini:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: rgba(100, 116, 139, 0.5);
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-height: 30px;
}

.field-stats {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.field-stats span {
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(28, 26, 23, 0.1);
  border-radius: 999px;
  padding: 3px 8px;
}

.field-stats b {
  color: var(--text);
}

html[data-theme='dark'] .field-stats span {
  color: #dbe6f2;
  background: rgba(226, 232, 240, 0.14);
  border-color: rgba(148, 163, 184, 0.38);
}

html[data-theme='dark'] .field-stats b {
  color: #f8fafc;
}

html[data-theme='dark'] .input-control {
  background: #0b1320;
  border-color: rgba(148, 163, 184, 0.3);
  color: #dbe6f2;
}

html[data-theme='dark'] .lorem-control label,
html[data-theme='dark'] .lorem-toggle {
  color: #c8d5e5;
}

html[data-theme='dark'] .lorem-presets .btn-mini {
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme='dark'] .lorem-presets .btn-mini:hover {
  background: rgba(30, 41, 59, 0.84);
}

.btn-mini {
  border: 1px solid rgba(28, 26, 23, 0.16);
  background: #fff6f6;
  color: #8f1f1f;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.18s ease;
}

.btn-mini:hover {
  color: #7b1717;
  border-color: rgba(179, 45, 45, 0.45);
  background: #ffe9e9;
  transform: translateY(-1px);
}

#clear-all {
  border-color: rgba(179, 45, 45, 0.45);
  color: #7b1717;
  background: #fff0f0;
}

.field-inline-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.json-editor-toolbar .field-inline-actions.json-toolbar-actions {
  margin-top: 0;
  margin-left: auto;
  gap: 5px;
  align-items: center;
}

.json-editor-toolbar .field-inline-actions.json-toolbar-actions .field-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.field-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(28, 26, 23, 0.18);
  background: #fff;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s ease;
}

.field-action-btn:hover {
  border-color: rgba(15, 118, 110, 0.45);
  color: #0f766e;
  transform: translateY(-1px);
}

.field-action-btn.is-done {
  border-color: rgba(43, 138, 62, 0.5);
  color: #2b8a3e;
  background: #eefdf2;
}

html[data-theme='dark'] .field-action-btn {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.36);
  color: #cbd5e1;
}

html[data-theme='dark'] .field-action-btn:hover {
  border-color: rgba(45, 212, 191, 0.56);
  color: #99f6e4;
  background: rgba(15, 23, 42, 0.92);
}

html[data-theme='dark'] .field-action-btn.is-done {
  border-color: rgba(74, 222, 128, 0.5);
  color: #bbf7d0;
  background: rgba(20, 83, 45, 0.45);
}

.json-error-hint {
  margin-top: 10px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  background: linear-gradient(180deg, #fff4f4 0%, #ffecec 100%);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.08);
}

.json-error-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #9f1239;
}

.json-error-reason {
  margin-top: 6px;
  color: #7f1d1d;
  font-size: 0.82rem;
}

.json-error-meta {
  margin-top: 8px;
  color: #7a2e2e;
  font-size: 0.78rem;
}

.json-error-code {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 500 0.85rem/1.35 'IBM Plex Mono', 'Fira Code', monospace;
  color: #6f1d1b;
}

.json-error-caret {
  color: #b91c1c;
  font-weight: 700;
}

.json-error-mark {
  background: #fbbf24;
  color: #111827;
  border-radius: 4px;
  padding: 0 2px;
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.35);
}

.json-error-list-title {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7f1d1d;
}

.json-error-list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #5f2424;
  font-size: 0.78rem;
}

.json-error-list li {
  margin: 4px 0;
}

.json-side-error {
  margin-top: 8px;
  border: 1px solid rgba(220, 38, 38, 0.42);
  background: #fff1f1;
  color: #8f1d1d;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.json-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid rgba(28, 26, 23, 0.1);
  border-radius: 12px;
  background: #fff;
}

.json-diff-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
}

.json-diff-table th,
.json-diff-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(28, 26, 23, 0.08);
  text-align: left;
  vertical-align: top;
}

.json-diff-table th {
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5b5b5b;
  background: #fafafa;
}

.json-diff-table td code {
  font: 500 0.82rem/1.35 'IBM Plex Mono', 'Fira Code', monospace;
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
}

.json-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.json-badge-add {
  color: #166534;
  background: #dcfce7;
}

.json-badge-remove {
  color: #991b1b;
  background: #fee2e2;
}

.json-badge-change {
  color: #92400e;
  background: #fef3c7;
}

.json-empty-result {
  margin-top: 10px;
  border: 1px dashed rgba(28, 26, 23, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  color: #5f5f5f;
  background: #fcfcfc;
}

.json-compare-nav {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.json-compare-nav .btn {
  padding: 8px 12px;
}

.json-split-handle {
  width: 8px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(28, 26, 23, 0.12);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  cursor: col-resize;
  margin-bottom: 0;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.json-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 7px;
  width: 100%;
}

.json-mode-tabs {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(28, 26, 23, 0.16);
  border-radius: 9px;
  overflow: hidden;
  background: #f8fafc;
  flex: 0 0 auto;
}

.json-mode-tab {
  border: 0;
  border-right: 1px solid rgba(28, 26, 23, 0.16);
  background: transparent;
  padding: 6px 12px;
  font: 600 0.82rem/1 'Manrope', sans-serif;
  color: #334155;
  cursor: pointer;
}

.json-mode-tab:last-child {
  border-right: 0;
}

.json-mode-tab.is-active {
  background: #7ea264;
  color: #fff;
}

.json-toolbar-core {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.xml-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.btn-mini-work {
  padding: 5px 6px;
  font-size: 0.76rem;
  min-height: 30px;
}

.btn-mini-icon {
  width: 30px;
  min-width: 30px;
  padding: 0;
  justify-content: center;
  font-size: 0.86rem;
  line-height: 1;
  flex: 0 0 auto;
}

.btn-mini-text {
  width: auto;
  min-width: 84px;
  padding: 0 10px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.json-editor-toolbar .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.json-sort-dropdown {
  position: fixed;
  z-index: 135;
  min-width: 250px;
  max-width: min(340px, calc(100vw - 16px));
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(28, 26, 23, 0.16);
  background: #fff;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.18);
  display: grid;
  gap: 2px;
}

.json-sort-dropdown[hidden] {
  display: none !important;
}

.json-sort-option {
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  font: 600 0.8rem/1.3 'Manrope', sans-serif;
  color: #1f2937;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.json-sort-option:hover {
  background: #eef5ff;
}

.json-sort-option.is-active {
  background: rgba(126, 162, 100, 0.2);
  color: #245f2b;
}

.json-search-dropdown {
  position: fixed;
  z-index: 136;
  width: min(360px, calc(100vw - 16px));
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(28, 26, 23, 0.16);
  background: #fff;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.18);
}

.json-search-dropdown[hidden] {
  display: none !important;
}

.json-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.json-search-head strong {
  font: 700 0.8rem/1.2 'Manrope', sans-serif;
  color: #334155;
}

.json-search-field {
  display: grid;
  gap: 4px;
  margin-bottom: 7px;
}

.json-search-field span {
  font: 600 0.72rem/1.2 'Manrope', sans-serif;
  color: #64748b;
}

.json-search-field input {
  height: 32px;
  border: 1px solid rgba(28, 26, 23, 0.16);
  border-radius: 8px;
  padding: 0 9px;
  font: 500 0.83rem/1 'Manrope', sans-serif;
}

.json-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.json-search-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.json-compare-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 11px;
  min-height: 42px;
  padding: 0 12px;
  background: #ececec;
  border: 1px solid rgba(28, 26, 23, 0.12);
  color: #374151;
  box-shadow: none;
}

.json-compare-toggle.btn-icon-lg {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 0.8rem;
}

.json-compare-toggle.is-active {
  background: #dff6e8;
  border-color: rgba(43, 138, 62, 0.36);
  color: #1f6f36;
}

.json-compare-toggle-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.6px solid currentColor;
  border-radius: 4px;
  position: relative;
  flex: 0 0 auto;
}

.json-compare-toggle.is-active .json-compare-toggle-box::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: translate(-50%, -56%) rotate(-45deg);
  top: 50%;
  left: 50%;
}

.json-compare-toggle-label {
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1;
  letter-spacing: 0;
}

.json-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 18px;
}

.json-modal-backdrop[hidden] {
  display: none !important;
}

.json-modal-card {
  width: min(460px, 96vw);
  background: #fff;
  border: 1px solid rgba(28, 26, 23, 0.16);
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.25);
  padding: 16px;
}

.json-modal-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.json-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.json-modal-head h3 {
  margin: 0;
}

.json-close-x {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.json-modal-field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.json-modal-field span {
  font-size: 0.8rem;
  color: #64748b;
}

.json-modal-field input {
  height: 34px;
  border: 1px solid rgba(28, 26, 23, 0.16);
  border-radius: 8px;
  padding: 0 10px;
  font: 500 0.88rem/1 'Manrope', sans-serif;
}

.json-modal-radio {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  font-size: 0.88rem;
}

.json-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.json-workbench-editor {
  border: 1px solid rgba(28, 26, 23, 0.14);
  border-radius: 12px;
  overflow: hidden;
  min-height: 390px;
  background: #fff;
}

.json-workbench-editor .jsoneditor {
  border: 0;
}

.json-workbench-editor .jsoneditor-menu {
  display: none;
}

.json-workbench-editor .jsoneditor-outer {
  height: 390px;
}

body.page-json-compare .json-workbench-editor .jsoneditor .jsoneditor-tree td {
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.04;
}

body.page-json-compare .json-workbench-editor .jsoneditor .jsoneditor-text-errors,
body.page-json-compare .json-workbench-editor .jsoneditor table.jsoneditor-text-errors,
body.page-json-compare .json-workbench-editor .jsoneditor .jsoneditor-validation-errors {
  display: none !important;
}

body.page-json-compare .json-workbench-editor .jsoneditor .jsoneditor-tree tr {
  height: auto;
}

body.page-json-compare .json-workbench-editor .jsoneditor .jsoneditor-tree .jsoneditor-field,
body.page-json-compare .json-workbench-editor .jsoneditor .jsoneditor-tree .jsoneditor-value,
body.page-json-compare .json-workbench-editor .jsoneditor .jsoneditor-tree .jsoneditor-readonly,
body.page-json-compare .json-workbench-editor .jsoneditor .jsoneditor-tree .jsoneditor-separator {
  line-height: 1.04;
  padding-top: 0;
  padding-bottom: 0;
}

.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff .jsoneditor-field,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff .jsoneditor-value,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff .jsoneditor-readonly {
  border-radius: 6px;
  padding: 0 3px;
}

.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-changed .jsoneditor-field,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-changed .jsoneditor-value,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-changed .jsoneditor-readonly {
  background: #fef3c7;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.35);
}

.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-added .jsoneditor-field,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-added .jsoneditor-value,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-added .jsoneditor-readonly {
  background: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.35);
}

.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-removed .jsoneditor-field,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-removed .jsoneditor-value,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-removed .jsoneditor-readonly {
  background: #fee2e2;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-active .jsoneditor-field,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-active .jsoneditor-value,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-active .jsoneditor-readonly {
  box-shadow:
    inset 0 0 0 1px rgba(15, 118, 110, 0.3),
    inset 0 0 0 2px rgba(15, 118, 110, 0.52);
}

.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-search-active .jsoneditor-field,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-search-active .jsoneditor-value,
.json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-search-active .jsoneditor-readonly {
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.52);
}

.json-inline-diff-view {
  border: 1px solid rgba(28, 26, 23, 0.14);
  border-radius: 12px;
  min-height: 390px;
  max-height: 390px;
  overflow: auto;
  background: #fff;
}

.json-inline-pre {
  margin: 0;
  min-height: 390px;
  padding: 12px 14px;
  font: 500 0.92rem/1.5 'IBM Plex Mono', 'Fira Code', monospace;
  color: #111827;
}

.json-inline-line {
  display: block;
  padding: 0 6px;
}

body.page-xml-validator .json-inline-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 0 4px;
}

.json-inline-mark {
  display: inline-flex;
  align-items: baseline;
  width: fit-content;
  max-width: 100%;
  border-radius: 6px;
  padding: 0 4px;
}

.json-inline-mark.is-context {
  background: rgba(191, 219, 254, 0.28);
}

.json-inline-mark.is-added {
  background: rgba(34, 197, 94, 0.22);
}

.json-inline-mark.is-removed {
  background: rgba(239, 68, 68, 0.22);
}

.json-inline-mark.is-changed {
  background: rgba(245, 158, 11, 0.26);
}

.json-inline-line.is-active .json-inline-mark {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.9);
}

.json-field-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #fff;
  padding: 10px 12px;
  border-radius: 0;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
}

.json-field-fullscreen .json-workbench-editor,
.json-field-fullscreen .json-workbench-editor .jsoneditor-outer,
.json-field-fullscreen .json-inline-diff-view,
.json-field-fullscreen .json-inline-pre {
  height: calc(100vh - 72px);
  max-height: calc(100vh - 72px);
}

body.page-xml-validator .json-field-fullscreen .line-number-wrap,
body.page-xml-validator .json-field-fullscreen .line-number-wrap textarea {
  height: calc(100vh - 140px);
  max-height: calc(100vh - 140px);
}

body.page-json-compare.is-editor-fullscreen header.site-header,
body.page-xml-validator.is-editor-fullscreen header.site-header {
  display: none;
}

.json-diff-counter {
  font: 700 0.86rem/1 'Manrope', sans-serif;
  color: #334155;
  min-width: 56px;
  text-align: center;
}

.json-compare-workspace {
  margin-top: 12px;
  display: none;
}

.json-tree-panel {
  border: 1px solid rgba(28, 26, 23, 0.1);
  border-radius: 12px;
  background: #fff;
  min-height: 260px;
  overflow: hidden;
}

.json-tree-head {
  padding: 8px 10px;
  font: 700 0.82rem/1 'Manrope', sans-serif;
  color: #334155;
  border-bottom: 1px solid rgba(28, 26, 23, 0.08);
  background: #f8fafc;
}

.json-tree {
  padding: 6px 8px;
  max-height: 480px;
  overflow: auto;
  font: 500 0.8rem/1.22 'IBM Plex Mono', 'Fira Code', monospace;
}

.json-tree-inner {
  min-height: 8px;
}

.json-node {
  border-radius: 5px;
  margin: 0;
}

.json-node summary {
  cursor: pointer;
  list-style: none;
  display: block;
  padding: 1px 2px;
}

.json-node summary::-webkit-details-marker {
  display: none;
}

.json-children {
  margin-left: 12px;
  padding-left: 4px;
  border-left: 1px dashed rgba(148, 163, 184, 0.35);
}

.json-leaf {
  padding: 1px 2px;
}

.json-tree-line {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: baseline;
  gap: 4px;
}

.json-line-no {
  width: 24px;
  text-align: right;
  color: #94a3b8;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.json-line-content {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  border-radius: 6px;
  padding: 1px 4px;
}

.json-node-key {
  color: #0f172a;
  font-weight: 600;
}

.json-node-sep {
  color: #64748b;
  margin-right: 2px;
}

.json-node-meta {
  color: #64748b;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.json-node-meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  min-height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(226, 232, 240, 0.45);
}

.json-node-value {
  color: #111827;
}

.json-type-string {
  color: #166534;
}

.json-type-number {
  color: #b45309;
}

.json-type-boolean {
  color: #7c2d12;
}

.json-type-null {
  color: #6b7280;
}

.json-node.has-diff > summary .json-line-content,
.json-node.has-diff.json-leaf .json-line-content {
  background: #fff7d6;
}

.json-node.is-changed > summary .json-line-content,
.json-node.is-changed.json-leaf .json-line-content {
  background: #fef3c7;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.35);
}

.json-node.is-added > summary .json-line-content,
.json-node.is-added.json-leaf .json-line-content {
  background: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.35);
}

.json-node.is-removed > summary .json-line-content,
.json-node.is-removed.json-leaf .json-line-content {
  background: #fee2e2;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.json-node.is-active-node > summary .json-line-content,
.json-node.is-active-node.json-leaf .json-line-content {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: 1px;
}

.json-diff-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.json-diff-item {
  border: 1px solid rgba(28, 26, 23, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
  background: #fff;
  cursor: pointer;
  transition: 0.16s ease;
}

.json-diff-item:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.json-diff-item.is-active {
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
}

.json-diff-path {
  font: 700 0.82rem/1.3 'IBM Plex Mono', 'Fira Code', monospace;
  color: #1e3a8a;
}

.json-diff-values {
  display: grid;
  gap: 2px;
  color: #334155;
  font-size: 0.8rem;
}

@media (max-width: 960px) {
  .json-compare-workspace {
    grid-template-columns: 1fr;
  }

  .json-split-handle {
    display: none;
  }
}

textarea {
  min-height: 290px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid rgba(28, 26, 23, 0.14);
  padding: 14px;
  font: 500 0.95rem/1.45 'IBM Plex Mono', 'Fira Code', monospace;
  background: #fff;
  color: #171717;
}

textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.26);
  border-color: rgba(15, 118, 110, 0.5);
}

.line-number-wrap {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 56px 1fr;
  border: 1px solid rgba(28, 26, 23, 0.14);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.line-number-wrap:focus-within {
  outline: 2px solid rgba(15, 118, 110, 0.26);
  border-color: rgba(15, 118, 110, 0.5);
}

.line-number-wrap.has-errors {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.18);
}

.line-number-wrap.has-errors:focus-within {
  outline: 2px solid rgba(220, 38, 38, 0.24);
  border-color: rgba(220, 38, 38, 0.5);
}

.line-number-gutter {
  min-height: 290px;
  max-height: 620px;
  overflow: hidden;
  background: #f8fafc;
  border-right: 1px solid rgba(148, 163, 184, 0.28);
  color: #64748b;
  font: 500 0.95rem/1.45 'IBM Plex Mono', 'Fira Code', monospace;
  text-align: right;
  padding: 14px 8px 14px 6px;
  user-select: none;
}

.line-number-gutter span {
  display: block;
  border-radius: 6px;
  padding-right: 2px;
}

.line-number-gutter span.is-error {
  color: #b91c1c;
  background: rgba(248, 113, 113, 0.18);
}

.line-number-gutter span.is-primary {
  color: #fff;
  background: #dc2626;
}

.line-number-wrap textarea {
  margin: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  min-height: 290px;
}

.line-number-wrap textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.line-number-wrap textarea:focus {
  outline: 0;
  border-color: transparent;
}

body.page-json-compare .json-workbench-editor .line-number-wrap {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  grid-template-columns: 46px 1fr;
  background: transparent;
}

body.page-text-compare .line-number-wrap,
body.page-xml-validator .line-number-wrap {
  margin-top: 0;
  grid-template-columns: 46px 1fr;
}

body.page-json-compare .json-workbench-editor .line-number-wrap:focus-within,
body.page-json-compare .json-workbench-editor .line-number-wrap.has-errors,
body.page-json-compare .json-workbench-editor .line-number-wrap.has-errors:focus-within {
  outline: 0;
  border-color: transparent;
  box-shadow: none;
}

body.page-json-compare .json-workbench-editor .line-number-gutter {
  min-height: 390px;
  max-height: 390px;
  padding: 12px 6px 12px 4px;
  border-right-color: rgba(148, 163, 184, 0.24);
}

body.page-text-compare .line-number-gutter,
body.page-xml-validator .line-number-gutter {
  padding: 12px 6px 12px 4px;
}

body.page-json-compare .json-workbench-editor .line-number-gutter span {
  border-radius: 4px;
  padding-right: 1px;
}

html[data-theme='dark'] textarea,
html[data-theme='dark'] .line-number-wrap,
html[data-theme='dark'] .line-number-gutter,
html[data-theme='dark'] .json-inline-pre {
  background: #0b1320;
  color: #dbe6f2;
}

html[data-theme='dark'] .line-number-wrap textarea::placeholder {
  color: #64748b;
}

html[data-theme='dark'] textarea,
html[data-theme='dark'] .line-number-wrap {
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme='dark'] .between-stack {
  background: transparent;
  border-color: transparent;
}

html[data-theme='dark'] .json-center-diff-counter {
  background: rgba(15, 23, 42, 0.84);
  color: #9fb3c8;
  border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme='dark'] .json-split-handle {
  border-color: rgba(148, 163, 184, 0.3);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  color: #cbd5e1;
}

html[data-theme='dark'] .json-mode-tabs {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme='dark'] .json-mode-tab {
  color: #cbd5e1;
  border-right-color: rgba(148, 163, 184, 0.35);
}

html[data-theme='dark'] .json-mode-tab.is-active {
  background: #5f8b49;
  color: #fff;
}

html[data-theme='dark'] .json-compare-toggle {
  background: rgba(30, 41, 59, 0.9);
  color: #dbe6f2;
  border-color: rgba(148, 163, 184, 0.4);
}

html[data-theme='dark'] .json-compare-toggle.is-active {
  background: rgba(22, 101, 52, 0.45);
  border-color: rgba(34, 197, 94, 0.35);
  color: #d1fae5;
}

html[data-theme='dark'] .json-sort-dropdown {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.55);
}

html[data-theme='dark'] .json-sort-option {
  color: #e2e8f0;
}

html[data-theme='dark'] .json-sort-option:hover {
  background: rgba(56, 189, 248, 0.16);
}

html[data-theme='dark'] .json-sort-option.is-active {
  background: rgba(34, 197, 94, 0.2);
  color: #d1fae5;
}

html[data-theme='dark'] .json-search-dropdown {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.55);
}

html[data-theme='dark'] .json-search-head strong {
  color: #e2e8f0;
}

html[data-theme='dark'] .json-search-field span {
  color: #94a3b8;
}

html[data-theme='dark'] .json-search-field input {
  background: #0b1320;
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

html[data-theme='dark'] .json-modal-card {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.35);
  color: #dbe6f2;
}

html[data-theme='dark'] .json-modal-field span {
  color: #94a3b8;
}

html[data-theme='dark'] .json-modal-field input {
  background: #0b1320;
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

html[data-theme='dark'] .json-workbench-editor,
html[data-theme='dark'] .json-workbench-editor .jsoneditor,
html[data-theme='dark'] .json-workbench-editor .jsoneditor-outer {
  background: #071426;
  color: #dbeafe;
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-tree,
html[data-theme='dark'] .json-workbench-editor .jsoneditor table.jsoneditor-tree {
  background: #071426 !important;
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor table,
html[data-theme='dark'] .json-workbench-editor .jsoneditor tbody,
html[data-theme='dark'] .json-workbench-editor .jsoneditor tr,
html[data-theme='dark'] .json-workbench-editor .jsoneditor td {
  background: transparent !important;
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor textarea,
html[data-theme='dark'] .json-workbench-editor .jsoneditor input,
html[data-theme='dark'] .json-workbench-editor .jsoneditor pre,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-field,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-value,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-separator,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-readonly {
  color: #dbeafe;
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-field[contenteditable='true'],
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-value[contenteditable='true'] {
  background: rgba(30, 41, 59, 0.55);
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor td {
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-separator {
  color: #9fb3c8;
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor button.jsoneditor-button {
  opacity: 0.9;
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor button.jsoneditor-button:hover {
  opacity: 1;
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-changed .jsoneditor-field,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-changed .jsoneditor-value,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-changed .jsoneditor-readonly {
  background: rgba(245, 158, 11, 0.2);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.42);
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-added .jsoneditor-field,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-added .jsoneditor-value,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-added .jsoneditor-readonly {
  background: rgba(34, 197, 94, 0.2);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.42);
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-removed .jsoneditor-field,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-removed .jsoneditor-value,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-removed .jsoneditor-readonly {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.42);
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-active .jsoneditor-field,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-active .jsoneditor-value,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-diff-active .jsoneditor-readonly {
  box-shadow:
    inset 0 0 0 1px rgba(45, 212, 191, 0.34),
    inset 0 0 0 2px rgba(45, 212, 191, 0.56);
}

html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-search-active .jsoneditor-field,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-search-active .jsoneditor-value,
html[data-theme='dark'] .json-workbench-editor .jsoneditor .jsoneditor-values.json-tree-search-active .jsoneditor-readonly {
  background: rgba(56, 189, 248, 0.16);
  box-shadow: inset 0 0 0 2px rgba(125, 211, 252, 0.62);
}

html[data-theme='dark'] .json-line-no {
  color: #64748b;
}

html[data-theme='dark'] .line-number-gutter {
  border-right-color: rgba(148, 163, 184, 0.32);
}

html[data-theme='dark'] body.page-json-compare .json-workbench-editor .line-number-gutter {
  background: #071426;
  color: #6f89a7;
  border-right-color: rgba(100, 116, 139, 0.38);
}

html[data-theme='dark'] body.page-xml-validator .line-number-gutter {
  background: #071426;
  color: #6f89a7;
  border-right-color: rgba(100, 116, 139, 0.38);
}

html[data-theme='dark'] body.page-json-compare .json-inline-diff-view {
  background: #071426;
  border-color: rgba(148, 163, 184, 0.32);
}

html[data-theme='dark'] body.page-xml-validator .json-inline-diff-view {
  background: #071426;
  border-color: rgba(148, 163, 184, 0.32);
}

html[data-theme='dark'] body.page-xml-validator .json-inline-pre {
  color: #dbeafe;
}

html[data-theme='dark'] body.page-json-compare .json-inline-mark.is-context {
  background: rgba(59, 130, 246, 0.16);
}

html[data-theme='dark'] body.page-xml-validator .json-inline-mark.is-context {
  background: rgba(59, 130, 246, 0.16);
}

html[data-theme='dark'] body.page-json-compare .json-inline-mark.is-changed {
  background: rgba(245, 158, 11, 0.2);
}

html[data-theme='dark'] body.page-xml-validator .json-inline-mark.is-changed {
  background: rgba(245, 158, 11, 0.2);
}

html[data-theme='dark'] body.page-json-compare .json-inline-mark.is-added {
  background: rgba(34, 197, 94, 0.2);
}

html[data-theme='dark'] body.page-xml-validator .json-inline-mark.is-added {
  background: rgba(34, 197, 94, 0.2);
}

html[data-theme='dark'] body.page-json-compare .json-inline-mark.is-removed {
  background: rgba(239, 68, 68, 0.2);
}

html[data-theme='dark'] body.page-xml-validator .json-inline-mark.is-removed {
  background: rgba(239, 68, 68, 0.2);
}

html[data-theme='dark'] body.page-json-compare .json-inline-line.is-active .json-inline-mark {
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.72);
}

html[data-theme='dark'] body.page-xml-validator .json-inline-line.is-active .json-inline-mark {
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.72);
}

html[data-theme='dark'] .diff-inline-remove {
  background: rgba(239, 68, 68, 0.34);
  color: #fecaca;
}

html[data-theme='dark'] .diff-inline-add {
  background: rgba(34, 197, 94, 0.34);
  color: #bbf7d0;
}

html[data-theme='dark'] .diff-line-empty {
  color: #94a3b8;
}

html[data-theme='dark'] body.page-json-compare .json-tree {
  background: #071426;
}

html[data-theme='dark'] body.page-json-compare .json-children {
  border-left-color: rgba(100, 116, 139, 0.52);
}

html[data-theme='dark'] body.page-json-compare .json-line-content {
  color: #dbeafe;
}

html[data-theme='dark'] body.page-json-compare .json-node-key {
  color: #bfdbfe;
}

html[data-theme='dark'] body.page-json-compare .json-node-sep,
html[data-theme='dark'] body.page-json-compare .json-node-meta {
  color: #94a3b8;
}

html[data-theme='dark'] body.page-json-compare .json-node-meta-badge {
  border-color: rgba(100, 116, 139, 0.7);
  background: rgba(30, 41, 59, 0.7);
}

html[data-theme='dark'] body.page-json-compare .json-node-value {
  color: #e2e8f0;
}

html[data-theme='dark'] body.page-json-compare .json-type-string {
  color: #86efac;
}

html[data-theme='dark'] body.page-json-compare .json-type-number {
  color: #fcd34d;
}

html[data-theme='dark'] body.page-json-compare .json-type-boolean {
  color: #fdba74;
}

html[data-theme='dark'] body.page-json-compare .json-type-null {
  color: #cbd5e1;
}

html[data-theme='dark'] body.page-json-compare .json-node.has-diff > summary .json-line-content,
html[data-theme='dark'] body.page-json-compare .json-node.has-diff.json-leaf .json-line-content {
  background: rgba(59, 130, 246, 0.12);
}

html[data-theme='dark'] body.page-json-compare .json-node.is-changed > summary .json-line-content,
html[data-theme='dark'] body.page-json-compare .json-node.is-changed.json-leaf .json-line-content {
  background: rgba(245, 158, 11, 0.2);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.42);
}

html[data-theme='dark'] body.page-json-compare .json-node.is-added > summary .json-line-content,
html[data-theme='dark'] body.page-json-compare .json-node.is-added.json-leaf .json-line-content {
  background: rgba(34, 197, 94, 0.2);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.42);
}

html[data-theme='dark'] body.page-json-compare .json-node.is-removed > summary .json-line-content,
html[data-theme='dark'] body.page-json-compare .json-node.is-removed.json-leaf .json-line-content {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.42);
}

html[data-theme='dark'] body.page-json-compare .json-node.is-active-node > summary .json-line-content,
html[data-theme='dark'] body.page-json-compare .json-node.is-active-node.json-leaf .json-line-content {
  outline-color: rgba(96, 165, 250, 0.75);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.metrics-single {
  grid-template-columns: minmax(180px, 240px);
}

.metric-wide {
  grid-column: 1 / -1;
}

.metric {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(28, 26, 23, 0.1);
  border-radius: 14px;
  padding: 12px;
}

.metric strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.2;
}

.jwt-mono {
  font-family: 'IBM Plex Mono', 'Fira Code', monospace;
  font-size: 0.88rem;
}

.jwt-disclaimer {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(28, 26, 23, 0.22);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.86rem;
}

html[data-theme='dark'] .jwt-disclaimer {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.62);
  color: #c8d5e5;
}

.compare-result {
  margin-top: 18px;
  margin-bottom: 0;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.result-box {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(28, 26, 23, 0.1);
  padding: 10px;
  min-height: 130px;
}

.result-box h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.result-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.89rem;
}

#list-left li,
#list-right li,
#list-common li {
  margin-bottom: 7px;
  padding: 7px 9px;
  border-radius: 8px;
  list-style-position: inside;
}

#list-left li {
  background: #fff5f5;
  border-left: 3px solid #e03131;
}

#list-right li {
  background: #ebfbee;
  border-left: 3px solid #2b8a3e;
}

#list-common li {
  background: #eef7ff;
  border-left: 3px solid #1971c2;
}

.diff-preview {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
}

.diff-controls {
  margin-top: 10px;
  margin-bottom: 8px;
}

.diff-legend {
  margin-top: 10px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diff-legend-item {
  font-size: 0.84rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid rgba(28, 26, 23, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
}

.diff-select {
  border-radius: 999px;
  border: 1px solid rgba(28, 26, 23, 0.14);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.88rem;
}

.diff-paired {
  border: 1px solid rgba(28, 26, 23, 0.12);
  border-radius: 12px;
  background: #fff;
  font: 500 0.9rem/1.4 'IBM Plex Mono', 'Fira Code', monospace;
}

.diff-pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid rgba(28, 26, 23, 0.08);
}

.diff-pair-row:last-child {
  border-bottom: 0;
}

.diff-side {
  display: grid;
  grid-template-columns: 34px 18px 1fr;
  gap: 8px;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
  border: 1px solid rgba(28, 26, 23, 0.12);
}

.diff-side .line-no {
  font-size: 0.74rem;
  line-height: 1.5;
  color: #8a8f98;
  text-align: right;
  user-select: none;
}

.diff-side .marker {
  font-weight: 700;
  opacity: 0.85;
}

.diff-side .marker-remove {
  color: #a51111;
}

.diff-side .marker-add {
  color: #1f7a35;
}

.diff-side .code {
  white-space: pre-wrap;
  word-break: break-word;
}

.diff-line-item + .diff-line-item {
  margin-top: 4px;
}

.diff-line-empty {
  color: #9ca3af;
  font-style: italic;
}

.diff-inline-remove,
.diff-inline-add {
  border-radius: 4px;
  padding: 0 2px;
}

.diff-inline-remove {
  background: rgba(224, 49, 49, 0.25);
  color: #7a0f0f;
}

.diff-inline-add {
  background: rgba(43, 138, 62, 0.25);
  color: #185c28;
}

.diff-side.empty {
  background: #f8f9fa;
  color: #868e96;
  border: 1px dashed rgba(28, 26, 23, 0.16);
}

.diff-side.equal {
  background: #f8f9fa;
  color: #6c757d;
}

.diff-empty {
  border-radius: 12px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px dashed rgba(28, 26, 23, 0.2);
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.14);
  color: #0b5b56;
}

html[data-theme='dark'] .pill {
  background: rgba(20, 184, 166, 0.18);
  color: #7ef2e7;
  border: 1px solid rgba(20, 184, 166, 0.34);
}

footer {
  padding: 18px 0 42px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-seo-links {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.65s ease forwards;
}

.fade-up.delay-1 {
  animation-delay: 0.12s;
}

.fade-up.delay-2 {
  animation-delay: 0.24s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1220px) {
  .top-nav {
    grid-template-columns: repeat(3, minmax(165px, 1fr));
    width: min(700px, 100%);
  }
}

@media (max-width: 880px) {
  .tool-layout,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .lorem-control-grid {
    grid-template-columns: 1fr;
  }

  .tool-layout.compare-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .between-action {
    padding-top: 0;
  }

  .between-stack {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: fit-content;
    margin: 0 auto;
  }

  .btn-compare-prominent {
    width: auto;
    min-height: 44px;
    font-size: 0.94rem;
    padding: 10px 14px;
  }

  .btn-compare-prominent.btn-icon-lg {
    width: 50px;
    height: 50px;
    min-height: 50px;
    padding: 0;
    font-size: 1.08rem;
  }

  .json-compare-toggle.btn-icon-lg {
    min-width: 104px;
    height: 38px;
    min-height: 38px;
    font-size: 0.8rem;
  }

  .btn-swap-icon {
    width: 38px;
    height: 38px;
  }

  .json-split-handle {
    display: none;
  }

  .json-workbench-editor,
  .json-workbench-editor .jsoneditor-outer,
  .json-inline-diff-view,
  .json-inline-pre {
    min-height: 340px;
    height: 340px;
    max-height: 340px;
  }

  .field-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-meta {
    width: 100%;
    justify-content: space-between;
  }

  .metrics-single {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 38px;
  }

  .header-wrap {
    gap: 10px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    display: flex;
    position: relative;
  }

  .brand {
    transform: translateY(1px);
  }

  .mobile-nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .top-nav {
    width: min(420px, calc(100vw - 24px));
    display: none;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    background: #ffffff;
    border: 1px solid rgba(28, 26, 23, 0.1);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--shadow-soft);
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 35;
  }

  .top-nav.is-open {
    display: flex;
  }

  html[data-theme='dark'] .top-nav {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.32);
  }

  .top-nav .lang-switch {
    margin: 2px 0 0;
    width: 100%;
    justify-content: stretch;
  }

  .top-nav .lang-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .header-wrap > .lang-switch {
    display: none;
  }
}

body.page-json-compare .hero {
  padding-top: 20px;
}

body.page-xml-validator .hero {
  padding-top: 20px;
}

body.page-json-compare .hero-card {
  padding: 18px 18px 18px 12px;
}

body.page-xml-validator .hero-card {
  padding: 18px 18px 18px 12px;
}

body.page-json-compare .hero h1 {
  max-width: none;
}

body.page-xml-validator .hero h1 {
  max-width: none;
}

body.page-json-compare .hero p {
  max-width: none;
}

body.page-xml-validator .hero p {
  max-width: none;
}

body.page-json-compare .metrics {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-xml-validator .metrics {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-json-compare .metric {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(28, 26, 23, 0.14);
  min-height: 36px;
}

body.page-xml-validator .metric {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(28, 26, 23, 0.14);
  min-height: 36px;
}

body.page-json-compare .metric:first-child {
  flex: 0 0 auto;
}

body.page-xml-validator .metric:first-child {
  flex: 0 0 auto;
}

body.page-json-compare .metric small {
  font-size: 0.8rem;
  line-height: 1;
  color: var(--muted);
}

body.page-xml-validator .metric small {
  font-size: 0.8rem;
  line-height: 1;
  color: var(--muted);
}

body.page-json-compare .metric strong {
  font-size: 0.95rem;
  line-height: 1;
  margin-top: 0;
  white-space: nowrap;
}

body.page-xml-validator .metric strong {
  font-size: 0.95rem;
  line-height: 1;
  margin-top: 0;
  white-space: nowrap;
}

html[data-theme='dark'] body.page-json-compare .metric {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme='dark'] body.page-xml-validator .metric {
  background: rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.3);
}

body.page-xml-validator .field-inline-actions {
  display: none !important;
}

@media (max-width: 860px) {
  body.page-json-compare .metric,
  body.page-json-compare .metric:first-child {
    flex: 1 1 calc(50% - 4px);
  }

  body.page-xml-validator .metric,
  body.page-xml-validator .metric:first-child {
    flex: 1 1 calc(50% - 4px);
  }
}

@media (max-width: 520px) {
  body.page-json-compare .metric,
  body.page-json-compare .metric:first-child {
    flex: 1 1 100%;
  }
}
