:root {
  --ink: #101828;
  --muted: #667085;
  --hairline: #e4e7ec;
  --paper: #ffffff;
  --wash: #f9fafb;
}

* { box-sizing: border-box; }

body {
  width: 280px;
  margin: 0;
  padding: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
}

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hairline);
}

/* The wordmark is the one place with any personality: the Devanagari
   spelling sits full size with the Latin transliteration tucked under it,
   because the product's whole point is handling both scripts' worth of
   English. */
.wordmark {
  position: relative;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.wordmark__latin {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.status {
  font-size: 11px;
  color: var(--muted);
}
.status--ok { color: #067647; }
.status--bad { color: #b42318; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}
.row__label { font-size: 13px; }
#host { font-weight: 600; }

.switch {
  appearance: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d0d5dd;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
  flex: none;
  margin: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
.switch:checked { background: var(--ink); }
.switch:checked::after { transform: translateX(14px); }
.switch:focus-visible { outline: 2px solid #3e63dd; outline-offset: 2px; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 12px 0;
  font-size: 11px;
  color: var(--muted);
}
.legend__item { display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 2px; border-radius: 2px; display: inline-block; }
.dot--spelling { background: #e5484d; }
.dot--grammar  { background: #f5a524; }
.dot--clarity  { background: #3e63dd; }
.dot--tone     { background: #8e4ec6; }

.foot { display: flex; gap: 6px; }

.btn {
  flex: 1;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.btn:hover { background: #1d2939; }
.btn--quiet {
  flex: none;
  background: #fff;
  color: #344054;
  border-color: var(--hairline);
}
.btn--quiet:hover { background: var(--wash); }

@media (prefers-reduced-motion: reduce) {
  .switch, .switch::after { transition: none; }
}
