:root {
  --bg: #ffffff;
  --slate: #1e2530;
  --orange: #f6820c;
  --hivis: #c8e600;
  --grey: #6b7280;
  --line: #e5e7eb;
  --radius: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--slate); }
body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}
.wordmark { font-weight: 500; letter-spacing: 0.02em; }
.status {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--grey);
}
.status[data-kind="captured"] { color: var(--slate); border-color: var(--hivis); }
.status[data-kind="searching"] { color: var(--slate); }
.status[data-kind="error"] { color: #b00020; border-color: #b00020; }

main { padding: 16px; display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin: 0 auto; }

.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 14px; font-weight: 500; text-transform: lowercase; color: var(--grey); letter-spacing: 0.02em; }

textarea, input[type="search"] {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--slate);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  resize: vertical;
}
textarea:focus, input[type="search"]:focus { outline: 2px solid var(--slate); outline-offset: -1px; border-color: var(--slate); }

.row { display: flex; gap: 8px; margin-top: 12px; }

button {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--slate);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

button.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--bg);
}
button.primary:active { background: #d96e00; border-color: #d96e00; }

button.secondary { background: var(--bg); }
button.secondary.listening {
  background: var(--hivis);
  border-color: var(--hivis);
  color: var(--slate);
}

.results { list-style: none; margin: 12px 0 0; padding: 0; }
.results li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.results li:first-child { border-top: 0; padding-top: 0; }
.results .meta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--grey);
}
.results .body { font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.results .empty { color: var(--grey); padding: 12px 0; }
