:root {
  color-scheme: light;
  --bg: #f5f3ef;
  --panel: #fffdfa;
  --panel-strong: #f0f6f4;
  --ink: #1d2522;
  --muted: #69746f;
  --line: #d9ded7;
  --accent: #0e6b5b;
  --accent-dark: #084f43;
  --danger: #a33b2f;
  --shadow: 0 20px 60px rgba(29, 37, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea,
pre {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

button.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

button.secondary:hover {
  background: var(--panel-strong);
}

.app-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 20px;
  min-height: calc(100vh - 56px);
}

.editor-pane,
.result-pane {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

header,
.result-toolbar,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.55rem;
}

h2 {
  font-size: 1rem;
}

textarea {
  flex: 1;
  width: 100%;
  min-height: 520px;
  resize: none;
  border: 0;
  border-block: 1px solid var(--line);
  padding: 18px;
  outline: none;
  background: #fff;
  color: var(--ink);
  line-height: 1.55;
}

textarea:focus {
  box-shadow: inset 0 0 0 2px rgba(14, 107, 91, 0.18);
}

footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-pane {
  background: #111716;
  color: #e9f3ef;
}

.result-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.result-toolbar button.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: #1e2a27;
  color: #e9f3ef;
}

pre {
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

.is-error {
  color: var(--danger);
}

@media (max-width: 900px) {
  .app-shell {
    padding: 14px;
  }

  .workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  textarea,
  pre {
    min-height: 360px;
  }
}
