.grid-2 {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.grid-2 .panel {
  min-width: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.grid-2 .lined {
  height: 280px;
}

.lined {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input);
}

.lined:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.lined-gutter {
  margin: 0;
  width: 42px;
  flex-shrink: 0;
  min-height: 0;
  padding: 10px 8px;
  overflow: hidden;
  text-align: right;
  color: var(--color-muted);
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  user-select: none;
}

.lined textarea.input {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  resize: none;
  white-space: pre;
  overflow: auto;
  scrollbar-gutter: stable;
}

.lined textarea.input:focus {
  border-color: transparent;
  box-shadow: none;
}

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

  .grid-2 .panel + .panel {
    margin-top: var(--space-4);
  }
}
