:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #262b36;
  --fg: #e6e8ee;
  --muted: #9aa3b2;
  --pt: 34, 197, 94;   /* green */
  --en: 59, 130, 246;  /* blue */
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; }

h1 { font-size: 2rem; margin: 0 0 8px; display: flex; align-items: center; gap: 12px; }
.logo { border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; width: 48px; height: 48px; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
h3 { font-size: 1rem; margin: 20px 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }
code { background: #222733; padding: 1px 5px; border-radius: 4px; font-size: .9em; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.label { display: block; font-weight: 600; margin-bottom: 8px; }

textarea {
  width: 100%;
  resize: vertical;
  background: #0f1218;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  font-size: 1.1rem;
}
textarea:focus { outline: 2px solid rgba(var(--en), .6); border-color: transparent; }

.examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.examples button {
  background: #222733;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}
.examples button:hover { border-color: var(--muted); }

.controls { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; color: var(--muted); font-size: .95rem; }
select {
  margin-left: 6px;
  background: #0f1218;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  font: inherit;
}
.check { display: flex; gap: 6px; align-items: center; cursor: pointer; }

.verdict { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; }

.bar {
  height: 14px;
  border-radius: 999px;
  background: rgb(var(--en));
  overflow: hidden;
}
.bar-pt { height: 100%; width: 50%; background: rgb(var(--pt)); transition: width .25s ease; }
.bar-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin-top: 6px; }
.scores { color: var(--muted); font-size: .85rem; margin-top: 10px; font-variant-numeric: tabular-nums; }

.hint { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.sw { padding: 0 4px; border-radius: 3px; color: #fff; }
.sw-pt { background: rgba(var(--pt), .8); }
.sw-en { background: rgba(var(--en), .8); }

.transitions {
  font: 1.35rem/2 ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
  min-height: 2em;
}
.transitions span { padding: 2px 1px; border-radius: 3px; cursor: default; }
.transitions .start { color: var(--muted); }
.transitions .space { opacity: .9; }
.detail { color: var(--muted); font-size: .9rem; margin-top: 8px; min-height: 1.5em; font-variant-numeric: tabular-nums; }

.steps { padding-left: 20px; margin: 0; }
.steps li { margin-bottom: 6px; }

.acc { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.acc th, .acc td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.acc th { color: var(--muted); font-weight: 500; }
.acc tr.current td { color: #fff; font-weight: 600; }

footer { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 28px; }
