:root {
  --bg: #07080b;
  --panel: #0f1117;
  --panel-2: #14171f;
  --line: #232734;
  --ink: #e8eaf0;
  --muted: #878ea3;
  --accent: #6ee7a8;
  --accent-dim: #2f7f5b;
  --bad: #ff6b6b;
  --warn: #ffc46b;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(1200px 700px at 50% -10%, #131826 0%, var(--bg) 60%);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 3px);
  opacity: 0.5;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 56px) clamp(16px, 4vw, 24px) 48px;
}

/* ── masthead ─────────────────────────────────────── */
.masthead {
  margin-bottom: 28px;
}

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

.brand h1 {
  font-family: var(--mono);
  font-size: clamp(24px, 6vw, 34px);
  letter-spacing: -0.03em;
  margin: 0;
  font-weight: 700;
}

.brand h1 span {
  color: var(--accent);
  margin-left: 0.35ch;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(110, 231, 168, 0.6);
  animation: breathe 2.6s ease-in-out infinite;
  flex: none;
}

.dot.live {
  background: var(--bad);
  animation: breathe 0.9s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(110, 231, 168, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(110, 231, 168, 0);
  }
}

.tagline {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 15px;
  max-width: 52ch;
}

/* ── panels ───────────────────────────────────────── */
.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(18px, 4vw, 28px);
  margin-bottom: 16px;
}

.hidden {
  display: none !important;
}

.lede {
  margin: 0 0 16px;
  font-size: 16px;
}

.rules {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.rules li {
  margin-bottom: 6px;
}

.label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.label.bad {
  color: var(--bad);
}
.label.good {
  color: var(--accent);
}

.fineprint {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

/* ── buttons ──────────────────────────────────────── */
.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
  width: 100%;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--accent);
  color: #06120c;
}

.btn.primary:hover:not(:disabled) {
  background: #8bf0bd;
}

.btn.primary:disabled {
  background: #26312c;
  color: #5d6a63;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--muted);
}

/* ── interview ────────────────────────────────────── */
.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.progress i {
  height: 3px;
  flex: 1;
  background: var(--line);
  border-radius: 2px;
}

.progress i.done {
  background: var(--accent-dim);
}

.progress i.active {
  background: var(--accent);
}

.question-block {
  margin-bottom: 22px;
}

.question {
  font-size: clamp(19px, 4.5vw, 24px);
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.01em;
}

.mic-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 26px 0;
}

.mic {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #171b24;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
}

.mic svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  position: relative;
  z-index: 1;
}

.mic:hover {
  border-color: var(--accent-dim);
}

.mic.recording {
  background: var(--bad);
  color: #fff;
  border-color: var(--bad);
}

.mic .pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--bad);
  opacity: 0;
}

.mic.recording .pulse {
  animation: ring 1.4s ease-out infinite;
}

@keyframes ring {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.mic-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  font-family: var(--mono);
}

.transcript-wrap {
  margin-bottom: 16px;
}

textarea {
  width: 100%;
  background: #0a0c11;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.read {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  background: #0c1712;
  border-radius: 0 10px 10px 0;
}

.read.tell {
  border-left-color: var(--bad);
  background: #180d0d;
}

.read.neutral {
  border-left-color: var(--muted);
  background: #101218;
}

.read p {
  margin: 0;
  font-size: 15px;
}

/* ── thinking ─────────────────────────────────────── */
.thinking {
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
}

.bars {
  display: flex;
  gap: 5px;
  justify-content: center;
  height: 34px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.bars i {
  width: 5px;
  background: var(--accent);
  border-radius: 3px;
  animation: eq 1s ease-in-out infinite;
}

.bars i:nth-child(2) {
  animation-delay: 0.12s;
}
.bars i:nth-child(3) {
  animation-delay: 0.24s;
}
.bars i:nth-child(4) {
  animation-delay: 0.36s;
}
.bars i:nth-child(5) {
  animation-delay: 0.48s;
}

@keyframes eq {
  0%,
  100% {
    height: 8px;
    opacity: 0.4;
  }
  50% {
    height: 32px;
    opacity: 1;
  }
}

/* ── verdict ──────────────────────────────────────── */
.verdict-head {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dial {
  position: relative;
  width: 132px;
  height: 132px;
  flex: none;
}

.dial svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dial circle {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
}

.dial .track {
  stroke: var(--line);
}

.dial .fill {
  stroke: var(--accent);
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.4s ease;
}

.dial-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.dial-num strong {
  display: block;
  font-family: var(--mono);
  font-size: 38px;
  line-height: 1;
}

.dial-num small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.verdict-meta {
  flex: 1;
  min-width: 220px;
}

.tier {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  margin-bottom: 10px;
}

.verdict-line {
  font-size: clamp(18px, 4vw, 21px);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.meter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.meter .bar {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.meter .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.meter b {
  color: var(--ink);
}

.summary {
  font-size: 15px;
  color: #c9cede;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 0 0 20px;
}

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.col li {
  margin-bottom: 14px;
  font-size: 14px;
}

.col li q {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 4px;
}

.col li span {
  color: var(--muted);
}

.col .empty {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.broke {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.broke b {
  color: var(--ink);
  font-weight: 600;
}

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

.error {
  background: #1c0f10;
  border: 1px solid #52262a;
  color: #ffb3b3;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin: 0 0 16px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4e5568;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding-top: 8px;
}

@media (max-width: 560px) {
  .cols {
    grid-template-columns: 1fr;
  }
  .actions {
    flex-direction: column;
  }
  .dial {
    width: 108px;
    height: 108px;
  }
  .dial-num strong {
    font-size: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
