:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #242424;
  background: #f5f5f5;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 300px;
  background: #f5f5f5;
}

button, select, textarea, input { font: inherit; }

.panel {
  margin: 10px;
  padding: 18px;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
}

.panel__header,
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel__header {
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
}

h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.header-note {
  margin: 3px 0 0;
  color: #616161;
  font-size: 12px;
}

.field-group { margin-top: 16px; }

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}

label > span,
.label-row > label,
.preview__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
}

select,
textarea {
  width: 100%;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
  background: #ffffff;
  color: #242424;
}

select {
  height: 34px;
  padding: 0 8px;
}

textarea {
  min-height: 220px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid #0f6cbd;
  outline-offset: 1px;
}

.options {
  margin: 15px 0;
  display: grid;
  gap: 9px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.preview {
  margin: 15px 0;
  padding: 11px;
  border: 1px solid #dedede;
  border-radius: 5px;
  background: #fafafa;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
}

.preview__label { margin-bottom: 4px; }

.hint,
.status {
  margin: 7px 0 0;
  color: #616161;
  font-size: 12px;
  line-height: 1.4;
}

.primary-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid #0f6cbd;
  border-radius: 4px;
  background: #0f6cbd;
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
}

.primary-button:hover { background: #115ea3; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

.link-button,
.icon-button {
  border: 0;
  background: transparent;
  color: #0f6cbd;
  cursor: pointer;
}

.link-button {
  padding: 0;
  margin-bottom: 7px;
  font-size: 12px;
}

.icon-button {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-size: 18px;
}

.icon-button:hover,
.link-button:hover {
  color: #004578;
  background: #f0f0f0;
}

.status[data-kind="error"] { color: #a4262c; }
.status[data-kind="success"] { color: #107c10; }

.format-help {
  margin-top: 16px;
  color: #4d4d4d;
  font-size: 12px;
}

.format-help summary { cursor: pointer; }

.format-help pre {
  overflow: auto;
  padding: 9px;
  border-radius: 4px;
  background: #f3f3f3;
  font-family: Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.format-help p { line-height: 1.45; }

@media (max-width: 340px) {
  .grid-two { grid-template-columns: 1fr; }
}
