:root {
  color-scheme: dark;
  --bg: #101311;
  --panel: #171c19;
  --panel-2: #202720;
  --line: #344137;
  --text: #edf4ee;
  --muted: #aebcaf;
  --accent: #9bcf8a;
  --accent-2: #dec978;
  --danger: #e18d86;
}

* {
  box-sizing: border-box;
}

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

button,
textarea,
input {
  font: inherit;
}

.shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  font-size: 30px;
  font-weight: 720;
}

h2 {
  font-size: 15px;
  color: var(--muted);
  font-weight: 650;
}

.status {
  min-width: 128px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  text-align: center;
  border-radius: 6px;
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.segment {
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 10px 14px;
  cursor: pointer;
}

.segment:last-child {
  border-right: 0;
}

.segment.is-active {
  background: var(--accent);
  color: #11170f;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.source-pane {
  grid-column: span 2;
}

.pane {
  min-height: 300px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

textarea,
pre {
  width: 100%;
  height: 252px;
  margin: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--text);
  padding: 14px;
  line-height: 1.5;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  overflow: auto;
}

button {
  border: 1px solid var(--line);
  background: #263025;
  color: var(--text);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

#translateBtn {
  background: var(--accent);
  color: #11170f;
  border-color: transparent;
  font-weight: 700;
}

.notes-pane {
  grid-column: span 2;
}

.notes-pane pre {
  height: 280px;
  white-space: pre-wrap;
}

@media (max-width: 820px) {
  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

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

  .notes-pane {
    grid-column: span 1;
  }
}
