.tn-compound-grid {
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 0;
}

.tn-compound-input,
.tn-compound-result {
  width: 100%;
  padding: 16px;
}

.tn-compound-input {
  border-right: 0;
  border-bottom: 1px solid var(--tn-compound-line);
}

.tn-compound-fields {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.tn-compound-advanced-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tn-compound-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
}

.tn-compound-secondary,
.tn-compound-actions .tn-compound-secondary:first-child {
  display: grid;
  place-items: center;
  padding: 11px 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.tn-compound-result {
  display: grid;
  gap: 14px;
}

.tn-compound-result > * {
  margin-top: 0;
  margin-bottom: 0;
}

.tn-compound-main {
  padding: 14px 0;
}

.tn-compound-metrics {
  border-top: 0;
}

.tn-compound-chart {
  min-width: 0;
  overflow: hidden;
  border-top: 1px solid var(--tn-compound-line);
  border-bottom: 1px double var(--tn-compound-line);
  padding: 12px 0 14px;
}

.tn-compound-chart .tn-compound-pane-label {
  margin-bottom: 10px;
}

.tn-compound-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 8px;
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tn-compound-chart-key {
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--tn-compound-accent);
}

.tn-compound-chart-key--contributions {
  background: var(--tn-compound-muted);
}

#compoundChart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 220px;
  overflow: hidden;
  color: var(--tn-compound-ink);
  -webkit-text-fill-color: currentColor;
}

.tn-compound-chart-grid line {
  stroke: var(--tn-compound-soft-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.tn-compound-chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.tn-compound-chart-line--balance {
  stroke: var(--tn-compound-accent);
}

.tn-compound-chart-line--contributions {
  stroke: var(--tn-compound-muted);
  stroke-dasharray: 7 5;
}

#compoundChartEmpty {
  fill: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 700 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-schedule {
  margin-top: 0;
}

body[data-scheme="dark"] .tn-compound-chart-key--balance,
body[data-scheme="inverse"] .tn-compound-chart-key--balance,
body[data-scheme="auto"][data-l="dark"] .tn-compound-chart-key--balance,
body[data-scheme="auto"][data-d="dark"] .tn-compound-chart-key--balance,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-chart-key--balance {
  background: #e38b4f;
}

@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-compound-chart-key--balance,
  body:not([data-scheme]) .tn-compound-chart-key--balance {
    background: #e38b4f;
  }
}

@media (max-width: 960px) {
  .tn-compound-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tn-compound-advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tn-compound-input,
  .tn-compound-result {
    padding: 12px;
  }

  .tn-compound-fields,
  .tn-compound-advanced-grid,
  .tn-compound-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tn-compound-field input,
  .tn-compound-field select {
    font-size: 14px;
  }

  .tn-compound-field b {
    min-width: 31px;
    padding: 0 6px;
  }

  #compoundChart {
    height: 190px;
  }
}

@media (max-width: 370px) {
  .tn-compound-fields,
  .tn-compound-advanced-grid,
  .tn-compound-actions,
  .tn-compound-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tn-compound-field span {
    font-size: 10.5px;
  }

  .tn-compound-field input,
  .tn-compound-field select {
    font-size: 13px;
  }
}
