.leslie-app {
  margin-top: 1.5em;
}

.leslie-app button,
.leslie-app select,
.leslie-app input {
  font: inherit;
}

.leslie-example-row,
.leslie-controls,
.leslie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
  align-items: end;
  margin: 1em 0;
}

.leslie-example-row button,
.leslie-actions button {
  border: 1px solid #bbb;
  background: #f5f5f5;
  color: #222;
  padding: 0.45em 0.75em;
  cursor: pointer;
}

.leslie-example-row button:hover,
.leslie-example-row button:focus,
.leslie-actions button:hover,
.leslie-actions button:focus {
  background: #e8e8e8;
}

.leslie-controls label {
  display: grid;
  gap: 0.25em;
}

.leslie-controls select,
.leslie-controls input {
  min-width: 10em;
  padding: 0.35em;
}

.leslie-table-wrap {
  overflow-x: auto;
  margin: 1em 0;
}

.leslie-input-table {
  width: 100%;
  min-width: 680px;
}

.leslie-input-table input {
  width: 5.5em;
  box-sizing: border-box;
  padding: 0.3em;
}

.leslie-input-table .inactive {
  opacity: 0.35;
}

.leslie-input-table input:disabled {
  cursor: not-allowed;
}

.leslie-status {
  min-height: 1.5em;
  color: #a33;
}

.leslie-results {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1em;
  margin: 1em 0;
}

.leslie-results h4 {
  margin-bottom: 0.3em;
}

.math-matrix-output {
  overflow-x: auto;
  padding: 0.6em 0;
}

.math-array {
  display: inline-block;
  position: relative;
  padding: 0.25em 0.85em;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.12em;
  line-height: 1.3;
}

.math-array::before,
.math-array::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.45em;
  border-color: #333;
  border-style: solid;
  content: "";
}

.math-array::before {
  left: 0;
  border-width: 2px 0 2px 2px;
}

.math-array::after {
  right: 0;
  border-width: 2px 2px 2px 0;
}

.math-array table {
  border-collapse: collapse;
  margin: 0;
}

.math-array td {
  min-width: 3.8em;
  padding: 0.1em 0.45em;
  text-align: right;
  white-space: nowrap;
}

.leslie-chart-panel {
  min-height: 360px;
  margin-top: 1em;
}

@media (max-width: 48em) {
  .leslie-results {
    grid-template-columns: 1fr;
  }
}
