/* Minimal black & white theme */
:root {
  --bg: #ffffff;
  --fg: #0b0b0b;
  --muted: #777;
  --accent: #000;
  --panel: #f7f7f7;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.card {
  width: 100%;
  max-width: 900px;
  border-radius: 10px;
  padding: 20px;
  background: transparent;
}

h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.2px;
}

p.lead {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  background: var(--panel);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #eee;
}

textarea#inputText {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e6e6e6;
  font-size: 14px;
  color: var(--fg);
  background: white;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

button.btn {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--fg);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}

button.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

button.btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

button.ghost {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.mode-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.howto {
  margin-top: 22px;
  padding: 18px;
  border-radius: 10px;
  background: white;
  border: 1px solid #e6e6e6;
  color: black;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.howto h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.1px;
}

.howto-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--fg);
}

.mode-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-weight: 600;
  border: 1px solid #d6d6d6;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  appearance: none;
}

.mode-pill.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  transform: translateY(-1px);
}

.mode-pill:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: white;
  border: 1px solid #ececec;
  min-height: 120px;
}

.orig {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: white;
  border: 1px solid #f0f0f0;
  max-height: 220px;
  overflow: auto;
}

.sentence {
  display: inline-block;
  margin: 4px 6px 6px 0;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--fg);
}

.sentence.highlight {
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

footer.note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* responsive */
@media(max-width:680px) {
  .row {
    flex-direction: column;
    align-items: stretch;
  }
}