:root {
  color-scheme: dark;
  --bg: #0d0f0e;
  --panel: #141715;
  --panel-2: #191d1a;
  --line: #303731;
  --text: #edf1ed;
  --muted: #89938b;
  --green: #79e7a8;
  --yellow: #e7cc79;
  --red: #f38275;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(121, 231, 168, .09), transparent 30rem),
    var(--bg);
}

button, input, textarea { font: inherit; }

button {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-2);
  cursor: pointer;
}

button:hover:not(:disabled) { border-color: #59635b; }
button:disabled { opacity: .28; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

main {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.header-actions {
  display: flex;
  gap: 7px;
}

h1, h2, p { margin: 0; }

h1 {
  font-size: 17px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.quiet {
  padding: 8px 11px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.entry, .results {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 23, 21, .94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

textarea {
  display: block;
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 20px;
  border: 0;
  border-radius: 12px 12px 0 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    #101311;
  background-size: 100% 28px;
  font: 19px/28px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em;
  overflow-wrap: anywhere;
}

textarea::placeholder { color: #454c47; }

.entry-bar {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.entry-bar.ready span:last-child { color: var(--green); }

.controls {
  display: grid;
  grid-template-columns: 74px 74px 1fr;
  gap: 9px;
  padding: 12px;
}

.controls button { min-height: 52px; padding: 0 18px; }
.controls .bit { padding: 0; font: 27px/1 ui-monospace, monospace; }
.controls .analyze {
  border-color: rgba(121, 231, 168, .42);
  color: #07100b;
  background: var(--green);
  font-weight: 750;
}

.results { margin-top: 14px; overflow: hidden; }

.verdict {
  display: grid;
  min-height: 190px;
  place-content: center;
  padding: 28px;
  text-align: center;
  background: radial-gradient(circle, rgba(121,231,168,.07), transparent 65%);
}

.verdict span {
  color: var(--green);
  font: 10px/1 ui-monospace, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.verdict strong {
  margin: 10px 0 7px;
  font: 300 70px/1 ui-monospace, monospace;
}

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

.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics div {
  display: grid;
  min-height: 94px;
  place-content: center;
  text-align: center;
}

.metrics div + div { border-left: 1px solid var(--line); }
.metrics span {
  color: var(--muted);
  font: 9px/1.2 ui-monospace, monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.metrics strong { margin-top: 8px; font: 400 22px/1 ui-monospace, monospace; }
.metrics small {
  margin-top: 6px;
  color: var(--muted);
  font: 9px/1 ui-monospace, monospace;
  letter-spacing: .1em;
}

.working { cursor: progress; }
.working button { pointer-events: none; }

@media (max-width: 680px) {
  main { width: min(100% - 20px, 520px); padding-top: 16px; }
  textarea { min-height: 190px; }
  .controls { grid-template-columns: 1fr 1fr; }
  .controls .analyze { grid-column: 1 / -1; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metrics div:nth-child(4) { border-top: 1px solid var(--line); }
  .metrics div:nth-child(5) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}
