body { background: var(--page); color: var(--text); }
.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 100;
  translate: 0 -160%;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  color: #111827;
}
.skip-link:focus { translate: 0; }

.tool-hero {
  width: min(1440px, calc(100% - 32px));
  margin: auto;
  padding-block: clamp(54px, 7vw, 96px) clamp(36px, 5vw, 62px);
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr);
  gap: clamp(36px, 8vw, 130px);
  align-items: end;
}
.eyebrow, .step-label {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tool-hero h1 {
  margin: 14px 0 22px;
  font-family: var(--font-mono);
  font-size: clamp(44px, 6vw, 86px);
  letter-spacing: -.055em;
  line-height: 1.04;
}
.tool-hero h1 em { color: var(--primary); font-style: normal; }
.hero-copy {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}
.privacy-card {
  display: flex;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.privacy-dot {
  width: 10px;
  height: 10px;
  flex: none;
  margin-block-start: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgb(74 222 128 / 12%);
}
.privacy-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.json-workspace {
  width: min(1500px, calc(100% - 24px));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(300px,.5fr);
  gap: 14px;
}
.editor-card, .stats-card, .content-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.editor-card { overflow: hidden; }
.card-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-block-end: 1px solid var(--line);
  background: var(--surface-soft);
}
.card-header h2, .stats-card h2 {
  margin: 7px 0 0;
  font-family: var(--font-mono);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toolbar label {
  color: var(--muted);
  font-size: 10px;
}
.toolbar select, .toolbar button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-deep);
  color: var(--text);
  padding-inline: 10px;
}
#json-input {
  width: 100%;
  min-height: 620px;
  resize: vertical;
  border: 0;
  background: var(--surface);
  color: var(--text);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
}
.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-block-start: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}
.editor-footer div {
  display: flex;
  gap: 8px;
}
.quiet-button, .primary-button, .copy-button, .download-button {
  min-height: 42px;
  border-radius: 10px;
  cursor: pointer;
}
.quiet-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding-inline: 14px;
}
.primary-button {
  border: 0;
  background: var(--primary);
  color: #07111f;
  font-weight: 800;
  padding-inline: 18px;
}

.stats-card { padding: 28px; align-self: start; }
.stats-card dl { display: grid; margin: 24px 0 0; }
.stats-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-block-start: 1px solid var(--line);
}
.stats-card dt { color: var(--muted); font-size: 11px; }
.stats-card dd { margin: 0; font-weight: 700; }

.status-panel {
  display: flex;
  gap: 12px;
  margin-block: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}
#status-dot {
  width: 10px;
  height: 10px;
  flex: none;
  margin-block-start: 4px;
  border-radius: 50%;
  background: var(--muted);
}
.status-panel[data-status="success"] #status-dot { background: var(--accent); }
.status-panel[data-status="error"] #status-dot { background: var(--danger); }
.status-panel strong { font-size: 12px; }
.status-panel p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.copy-button, .download-button {
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}
.download-button { margin-block-start: 8px; }
.copy-button:disabled, .download-button:disabled { opacity: .4; cursor: not-allowed; }

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding: clamp(22px, 4vw, 34px);
}
.content-section h2 { margin: 0 0 18px; font-family: var(--font-mono); }
.steps {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
}
.steps article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}
.steps p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .json-workspace { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .tool-hero { grid-template-columns: 1fr; }
  .card-header, .editor-footer { align-items: stretch; flex-direction: column; }
  .toolbar { overflow-x: auto; }
  .steps { grid-template-columns: 1fr; }
}
