:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #0d1117;
  color: #e6edf3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 760px;
}

button,
select,
textarea {
  font: inherit;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem max(2rem, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid #30363d;
  background: #161b22;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 1.6rem;
}

.eyebrow {
  margin-bottom: 0.25rem;
  color: #8b949e;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.controls,
.actions {
  display: flex;
  align-items: end;
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.25rem;
  color: #8b949e;
  font-size: 0.8rem;
}

button,
select {
  padding: 0.55rem 0.75rem;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #21262d;
  color: #e6edf3;
  cursor: pointer;
}

button:hover {
  background: #30363d;
}

main {
  width: min(1200px, calc(100% - 4rem));
  margin: 1.5rem auto 3rem;
}

.page-footer {
  padding: 0 2rem 2rem;
  text-align: center;
}

.page-footer a {
  color: #58a6ff;
}

.status {
  min-height: 1.5rem;
  margin-bottom: 1rem;
  color: #8b949e;
}

.status.error {
  color: #ff7b72;
}

.actions {
  margin-bottom: 1.25rem;
}

.actions span {
  color: #8b949e;
  font-size: 0.875rem;
}

.subtitle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #30363d;
  border-radius: 8px;
}

.language-header {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #30363d;
  background: #161b22;
  font-weight: 700;
}

.language-header:nth-child(2) {
  border-left: 1px solid #30363d;
}

.subtitle-rows {
  display: contents;
}

.subtitle-row {
  display: grid;
  grid-template-columns: 5.75rem 1fr;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.75rem;
  border-bottom: 1px solid #21262d;
}

.subtitle-row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.subtitle-row:nth-child(even) {
  border-left: 1px solid #30363d;
  background: #0d1117;
}

.cue-meta {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  color: #8b949e;
  font-size: 0.75rem;
}

.cue-number {
  color: #58a6ff;
  font-weight: 700;
}

.cue-text {
  width: 100%;
  min-height: 3.5rem;
  resize: vertical;
  padding: 0.5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  line-height: 1.4;
}

.cue-text:focus {
  outline: none;
  border-color: #58a6ff;
  background: #161b22;
}
