@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #1b1611;
  --bg-deep: #14100c;
  --panel: #241d16;
  --panel-line: #3a2f22;
  --amber: #ffb000;
  --amber-dim: #b57e12;
  --pass: #6ede8a;
  --warn: #ffb000;
  --fail: #ff5c5c;
  --info: #8aa0b3;
  --text: #f2e9d8;
  --text-dim: #a89a83;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(ellipse at top, #241c14 0%, var(--bg-deep) 65%);
  color: var(--text);
  font-family: var(--sans);
}

.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.06) 0px,
    rgba(0,0,0,0.06) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.5;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* ── Hero ── */

.hero { text-align: center; }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--amber-dim);
  margin: 0 0 18px;
}

.title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(34px, 7vw, 56px);
  letter-spacing: 0.03em;
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 176, 0, 0.35);
  margin: 0 0 20px;
}

.cursor {
  display: inline-block;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.subtitle {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 36px;
}

.prompt-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  overflow: hidden;
}

.prompt-label {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--amber);
  display: flex;
  align-items: center;
  padding: 0 6px 0 16px;
  font-size: 15px;
  user-select: none;
}

#target {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  padding: 14px 8px;
  outline: none;
}

#target::placeholder { color: var(--text-dim); }

#scan-btn {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--bg-deep);
  background: var(--amber);
  border: none;
  padding: 0 22px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

#scan-btn:hover { background: #ffc233; }
#scan-btn:active { transform: scale(0.98); }
#scan-btn:disabled {
  background: var(--amber-dim);
  color: rgba(20,16,12,0.7);
  cursor: progress;
}

#target:focus-visible,
#scan-btn:focus-visible,
.ghost-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.hint {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 14px;
  font-family: var(--mono);
}

.hint.error { color: var(--fail); }

/* ── Summary strip ── */

.summary-strip {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 44px 0 20px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  flex-wrap: wrap;
}

.summary-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
}

.summary-count {
  font-size: 24px;
  font-weight: 700;
}

.summary-item.pass .summary-count { color: var(--pass); }
.summary-item.warn .summary-count { color: var(--warn); }
.summary-item.fail .summary-count { color: var(--fail); }

.summary-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-meta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
}

.ghost-btn {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--amber);
  background: transparent;
  border: 1px solid var(--amber-dim);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ghost-btn:hover {
  background: rgba(255, 176, 0, 0.1);
}

/* ── Terminal ── */

.terminal {
  background: var(--bg-deep);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-line);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--panel-line);
}

.terminal-title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 22px 22px 26px;
  min-height: 160px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
}

.terminal-placeholder {
  color: var(--text-dim);
  margin: 0;
}

.section-block { margin-bottom: 22px; }
.section-block:last-child { margin-bottom: 0; }

.section-heading {
  color: var(--amber);
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-bottom: 1px dashed var(--panel-line);
  padding-bottom: 6px;
}

.check-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 3px 0;
  opacity: 0;
  animation: reveal 0.28s ease forwards;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.check-icon { flex-shrink: 0; width: 16px; }
.check-line.pass .check-icon { color: var(--pass); }
.check-line.warn .check-icon { color: var(--warn); }
.check-line.fail .check-icon { color: var(--fail); }
.check-line.info .check-icon { color: var(--info); }

.check-text { color: var(--text); word-break: break-word; }
.check-line.warn .check-text { color: #f2d9a8; }
.check-line.fail .check-text { color: #ffb3b3; }
.check-line.info .check-text { color: var(--info); }

.terminal-error {
  color: var(--fail);
  margin: 0;
}

@media (max-width: 480px) {
  .prompt-form { flex-direction: column; }
  .prompt-label { padding: 10px 16px 0; }
  #target { padding: 8px 16px 14px; }
  #scan-btn { padding: 12px; }
}