.json-tool-shell,
.json-tool-shell *,
.json-tool-shell *::before,
.json-tool-shell *::after {
  box-sizing: border-box;
}

.json-tool-shell {
  display: grid;
  gap: 24px;
  overflow-x: clip;
}

.json-tool-shell .section-inner,
.json-to-typescript-page .section-inner,
.json-schema-preview-page .section-inner,
.json-flatten-page .section-inner {
  max-width: min(var(--max), 100%);
}

.json-tool-workbench {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  max-width: 100%;
  min-width: 0;
}

.json-tool-panel,
.json-tool-side-panel,
.json-tool-card {
  background: #ffffff;
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(23, 32, 31, 0.07);
}

.json-tool-panel {
  display: grid;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
  padding: 22px;
}

.json-tool-side {
  align-content: start;
  display: grid;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
}

.json-tool-side-panel,
.json-tool-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.json-tool-heading,
.json-tool-subhead {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  max-width: 100%;
  min-width: 0;
}

.json-tool-heading > div,
.json-tool-subhead > div {
  max-width: 100%;
  min-width: 0;
}

.json-tool-heading h2,
.json-tool-side-panel h2,
.json-tool-card h3,
.json-tool-subhead h3,
.json-tool-empty h3 {
  color: #17201f;
  line-height: 1.3;
  margin: 0;
}

.json-tool-heading h2,
.json-tool-side-panel h2 {
  font-size: 20px;
}

.json-tool-card h3,
.json-tool-subhead h3,
.json-tool-empty h3 {
  font-size: 16px;
}

.json-tool-heading p,
.json-tool-side-panel p,
.json-tool-card p,
.json-tool-empty p,
.json-tool-help,
.json-tool-list li {
  color: #5f6c68;
  line-height: 1.6;
  margin: 0;
  overflow-wrap: anywhere;
}

.json-tool-chip {
  align-items: center;
  background: #e9f2ff;
  border: 1px solid rgba(43, 91, 143, 0.18);
  border-radius: 8px;
  color: #244f7f;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  min-height: 30px;
  padding: 5px 9px;
  white-space: nowrap;
}

.json-tool-field,
.json-tool-unlock {
  display: grid;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.json-tool-field span,
.json-tool-unlock span {
  color: #263331;
  font-size: 13px;
  font-weight: 850;
}

.json-tool-field textarea,
.json-tool-unlock input {
  background: #ffffff;
  border: 1px solid rgba(23, 32, 31, 0.18);
  border-radius: 8px;
  color: #17201f;
  font: inherit;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.json-tool-field textarea {
  min-height: 310px;
  resize: vertical;
}

.json-tool-field textarea:focus-visible,
.json-tool-unlock input:focus-visible,
.json-tool-button:focus-visible,
.json-tool-buy:focus-visible {
  outline: 2px solid #244f7f;
  outline-offset: 2px;
}

.json-tool-actions,
.json-tool-export-actions,
.json-tool-unlock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}

.json-tool-button,
.json-tool-buy {
  align-items: center;
  background: #17201f;
  border: 1px solid #17201f;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none;
}

.json-tool-button.is-secondary,
.json-tool-buy.is-secondary {
  background: #ffffff;
  color: #17201f;
}

.json-tool-button:disabled {
  background: #edf2ef;
  border-color: #d5ded9;
  color: #7a8581;
  cursor: not-allowed;
}

.json-tool-status {
  align-items: center;
  color: #5f6c68;
  display: inline-flex;
  line-height: 1.5;
  min-height: 42px;
}

.json-tool-alert,
.json-tool-error {
  background: #fff4e6;
  border: 1px solid rgba(181, 91, 11, 0.22);
  border-radius: 8px;
  color: #7a3f08;
  line-height: 1.6;
  padding: 12px 14px;
}

.json-tool-error:empty {
  display: none;
}

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

.json-tool-metric {
  background: #f8faf8;
  border: 1px solid rgba(23, 32, 31, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
}

.json-tool-metric span {
  color: #5f6c68;
  font-size: 12px;
  font-weight: 800;
}

.json-tool-metric strong {
  color: #17201f;
  font-size: 24px;
  line-height: 1.15;
}

.json-tool-preview-wrap {
  border: 1px solid rgba(23, 32, 31, 0.12);
  border-radius: 8px;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  width: 100%;
}

.json-tool-preview-table {
  border-collapse: collapse;
  min-width: 680px;
  width: 100%;
}

.json-tool-preview-table th,
.json-tool-preview-table td {
  border-bottom: 1px solid rgba(23, 32, 31, 0.08);
  color: #263331;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.json-tool-preview-table th {
  background: #f8faf8;
  color: #17201f;
  font-weight: 850;
}

.json-tool-preview-table td {
  word-break: break-word;
}

.json-tool-code {
  background: #101817;
  border-radius: 8px;
  color: #e9f2ef;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-height: 340px;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  padding: 14px;
  white-space: pre;
  width: 100%;
}

.json-tool-empty {
  background: #f8faf8;
  border: 1px dashed rgba(23, 32, 31, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.json-tool-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 940px) {
  .json-tool-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .json-tool-panel,
  .json-tool-side-panel,
  .json-tool-card {
    padding: 16px;
  }

  .json-tool-heading,
  .json-tool-subhead {
    display: grid;
  }

  .json-tool-chip,
  .json-tool-button,
  .json-tool-buy {
    width: 100%;
  }

  .json-tool-actions,
  .json-tool-export-actions,
  .json-tool-unlock-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .json-tool-results {
    grid-template-columns: 1fr;
  }

  .json-tool-preview-table {
    min-width: 100%;
    table-layout: fixed;
  }

  .json-tool-field textarea {
    min-height: 240px;
  }
}
