* {
  box-sizing: border-box;
}

body {
  background: #f4f8fb;
  color: #0f1f35;
}

.form-control,
.form-select,
.btn {
  border-radius: 0.4rem;
}

.brand-header {
  background: #ec5e00;
  color: #fff;
}

.header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.metadata-line {
  font-size: 0.82rem;
  opacity: 0.95;
}

.header-link {
  color: inherit;
  text-decoration: underline;
}

.split-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.editor-input {
  width: 100%;
}

.code-editor {
  position: relative;
  border: 1px solid #cdd8e5;
  border-radius: 0.4rem;
  background: #fff;
  overflow: hidden;
}

.editor-highlight,
.editor-input {
  margin: 0;
  border: 0;
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
  min-height: 7.5rem;
}

.editor-highlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 0.55rem 0.7rem;
  color: #0f1f35;
}

.editor-input {
  position: relative;
  z-index: 1;
  resize: vertical;
  background: transparent;
  color: transparent;
  caret-color: #0f1f35;
  padding: 0.55rem 0.7rem;
}

.editor-input::selection {
  background: rgba(25, 118, 210, 0.2);
}

.button-row,
.import-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.button-row {
  margin-top: 0.35rem;
}

.btn-small {
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: #0f1f35;
  border-color: #0f1f35;
}

.btn-primary:hover {
  background: #163153;
  border-color: #163153;
}

.btn-secondary {
  border-color: #9fb1c6;
}

.btn-secondary:hover {
  background: #edf2f8;
  border-color: #9fb1c6;
  color: #0f1f35;
}

.import-panel {
  margin: 1rem 0 1.4rem;
  border: 1px solid #d5dce5;
  border-radius: 0.45rem;
  background: #fff;
}

.import-panel summary {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.import-panel[open] .import-row {
  padding: 0 0.75rem 0.75rem;
}

h2 {
  font-size: 1.1rem;
  margin: 1rem 0 0.45rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.section-title h2 {
  margin-bottom: 0;
}

hr {
  border: 0;
  border-top: 1px solid #d5dce5;
  margin: 1rem 0;
}

.result-block {
  min-height: 3rem;
  margin: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.token-key {
  color: #0b57d0;
}

.token-string {
  color: #0a7f3f;
}

.token-number {
  color: #aa3a00;
}

.token-boolean,
.token-null,
.token-keyword {
  color: #6d28d9;
}

.token-operator {
  color: #334155;
}

.evaluation-line {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}
