.release32-c-format {
  --r32-c-ink: var(--text, #162332);
  --r32-c-muted: var(--muted, #617083);
  --r32-c-line: color-mix(in srgb, var(--border) 78%, #8aa0b8);
  --r32-c-accent: #b45309;
  --r32-c-accent-soft: color-mix(in srgb, var(--r32-c-accent) 8%, var(--surface));
  color: var(--r32-c-ink);
}

[data-theme="dark"] .release32-c-format {
  --r32-c-accent: #f0b878;
}

.release32-c-format .r32-c-format-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid var(--r32-c-line);
  border-top: 4px solid var(--r32-c-accent);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(118deg, color-mix(in srgb, var(--r32-c-accent-soft) 74%, var(--surface)), transparent 58%),
    var(--surface);
  box-shadow: 0 14px 32px rgb(22 35 50 / 8%);
}

.release32-c-format .r32-c-format-kicker,
.release32-c-format .r32-c-format-label {
  color: var(--r32-c-accent);
  font: 700 0.72rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.release32-c-format .r32-c-format-hero h2,
.release32-c-format .r32-c-format-panel h3 {
  margin: 4px 0 0;
  color: var(--r32-c-ink);
}

.release32-c-format .r32-c-format-hero p {
  max-width: 52rem;
  margin: 8px 0 0;
  color: var(--r32-c-muted);
}

.release32-c-format .r32-c-format-contract {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--r32-c-accent) 34%, var(--r32-c-line));
  border-radius: 999px;
  color: var(--r32-c-accent);
  background: var(--r32-c-accent-soft);
  font: 700 0.77rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.release32-c-format .r32-c-format-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.release32-c-format .r32-c-format-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--r32-c-line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.release32-c-format .r32-c-format-input-panel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--r32-c-accent-soft) 60%, var(--surface)), var(--surface) 140px);
}

.release32-c-format .r32-c-format-output-panel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 68%, var(--surface)), var(--surface) 140px);
}

.release32-c-format .r32-c-format-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.release32-c-format .r32-c-format-panel-head > span:last-child {
  max-width: 48%;
  overflow: hidden;
  color: var(--r32-c-muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release32-c-format .r32-c-format-file-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px dashed color-mix(in srgb, var(--r32-c-accent) 42%, var(--r32-c-line));
  border-radius: 8px;
  color: var(--r32-c-muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 0.86rem;
}

.release32-c-format .r32-c-format-file-label input {
  max-width: 60%;
  color: var(--r32-c-muted);
  font-size: 0.8rem;
}

.release32-c-format .r32-c-format-code-label,
.release32-c-format .r32-c-format-code-label textarea {
  display: block;
  width: 100%;
}

.release32-c-format .r32-c-format-code-label textarea {
  min-height: 320px;
  margin: 0;
  resize: vertical;
  border-color: color-mix(in srgb, var(--r32-c-accent) 30%, var(--border));
  background: var(--surface-2);
  color: var(--r32-c-ink);
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  tab-size: 4;
}

.release32-c-format .r32-c-format-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.release32-c-format .r32-c-format-options label {
  display: grid;
  gap: 4px;
  color: var(--r32-c-muted);
  font-size: 0.78rem;
}

.release32-c-format .r32-c-format-options select {
  min-width: 0;
}

.release32-c-format .r32-c-format-check {
  display: flex !important;
  align-items: center;
  align-self: end;
  min-height: 36px;
  gap: 7px !important;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.release32-c-format .r32-c-format-check input {
  margin: 0;
}

.release32-c-format .r32-c-format-output {
  min-height: 320px;
  max-height: 560px;
  margin: 0;
  padding: 13px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--r32-c-ink);
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  overflow-wrap: normal;
}

.release32-c-format .r32-c-format-diagnostics {
  min-height: 1.6em;
  margin-top: 9px;
  color: var(--danger, #9a3412);
  font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.release32-c-format .r32-c-format-output-note {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--r32-c-muted);
  font-size: 0.78rem;
}

.release32-c-format .r32-c-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.release32-c-format .r32-c-format-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--r32-c-muted);
}

.release32-c-format .r32-c-format-status[data-tone='error'] {
  color: var(--danger, #b42318);
}

.release32-c-format .r32-c-format-status[data-tone='success'] {
  color: var(--success, #166534);
}

@media (max-width: 840px) {
  .release32-c-format .r32-c-format-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .release32-c-format .r32-c-format-hero {
    flex-direction: column;
    padding: 16px;
  }

  .release32-c-format .r32-c-format-file-label,
  .release32-c-format .r32-c-format-output-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .release32-c-format .r32-c-format-file-label input {
    max-width: 100%;
  }

  .release32-c-format .r32-c-format-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .release32-c-format *,
  .release32-c-format *::before,
  .release32-c-format *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
