h1 {
  margin-top: 32px;
  margin-bottom: 8px;
  font-size: 2rem;
}

.lede {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 28px;
  max-width: 60ch;
}

.tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.input-col label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

textarea {
  width: 100%;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
  min-height: 200px;
}

.controls-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.controls-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.controls-row select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}

.stats {
  display: flex;
  gap: 16px;
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

.stat { display: flex; align-items: center; gap: 6px; }
.stat strong { color: var(--ink); }

.stat__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.stat__dot--added { background: #1e8e3e; }
.stat__dot--removed { background: #c0392b; }
.stat__dot--unchanged { background: var(--line); border: 1px solid var(--muted); }

.hint {
  color: #c0392b;
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  min-height: 80px;
  max-height: 520px;
  overflow: auto;
}

.diff-empty {
  color: var(--muted);
  padding: 16px;
  margin: 0;
  font-size: 0.9rem;
}

.diff-line {
  display: flex;
  gap: 10px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  padding: 1px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.diff-line__marker {
  flex: none;
  width: 1ch;
  color: var(--muted);
  user-select: none;
}

.diff-line--added { background: #e3f5e9; }
.diff-line--added .diff-line__marker { color: #1e8e3e; }
.diff-line--removed { background: #fbe6e4; }
.diff-line--removed .diff-line__marker { color: #c0392b; }

.diff-prose {
  padding: 16px;
  line-height: 1.7;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.diff-word--added { background: #e3f5e9; color: #1e8e3e; text-decoration: none; margin: 0 1px; border-radius: 3px; }
.diff-word--removed { background: #fbe6e4; color: #c0392b; text-decoration: line-through; margin: 0 1px; border-radius: 3px; }

.faq { margin-top: 48px; max-width: 70ch; }

.faq h2 { font-size: 1.3rem; margin-top: 32px; }

details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 640px) {
  .inputs { grid-template-columns: 1fr; }
  .stats { margin-left: 0; flex-wrap: wrap; }
}
