/* Prompt Inspector — clean, modern, minimal CSS */

:root {
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-header-bg: #0f172a;
  --color-header-text: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-accent: #7c3aed;
  --color-border: #e2e8f0;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-header-text);
  text-decoration: none;
}
.logo span { color: var(--color-primary); font-weight: 700; }
.logo span { color: #60a5fa; }

.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a {
  color: var(--color-header-text);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
}
.site-nav a:hover { opacity: 1; }
.nav-cta {
  border: 1px solid #60a5fa;
  border-radius: 999px;
  padding: 4px 14px;
  color: #60a5fa !important;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--color-header-bg) 0%, #1e293b 100%);
  color: var(--color-header-text);
  text-align: center;
  padding: 72px 0 96px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subtitle {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: #94a3b8;
}

/* ---------- Tool ---------- */
.tool-section { margin-top: -48px; padding-bottom: 64px; }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.tool-input, .tool-results {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.tool-input h2, .tool-results h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
}

#prompt-input {
  width: 100%;
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  resize: vertical;
  min-height: 220px;
  color: var(--color-text);
  background: #fbfdff;
}
#prompt-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: var(--color-primary);
}

.input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 16px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  width: 100%;
  padding: 13px 20px;
  font-size: 1rem;
}
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 5px 12px;
  font-size: 0.8rem;
}
.btn-ghost:hover { background: var(--color-bg); color: var(--color-text); }

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  width: 100%;
  margin-top: 10px;
  font-weight: 500;
  padding: 8px;
}
.btn-link:hover { text-decoration: underline; }

.btn-large { padding: 15px 32px; font-size: 1.1rem; width: auto; }

/* ---------- Results ---------- */
.results-empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: 60px 20px;
  border: 2px dashed var(--color-border);
  border-radius: 8px;
}

.scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.score-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.score-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.score-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.score-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--color-success);
  transition: width 0.6s ease, background 0.3s ease;
}
.score-fill.mid { background: var(--color-warning); }
.score-fill.low { background: var(--color-error); }

.score-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.score-note {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.finding-block { margin-top: 20px; }
.finding-block h3 { margin: 0 0 8px; font-size: 1rem; }

.finding-list { margin: 0; padding-left: 20px; }
.finding-list li { margin-bottom: 6px; font-size: 0.92rem; }
.finding-list li:only-child { color: var(--color-text-muted); }

.improved-block {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 16px;
}

.improved-text {
  font-family: var(--font);
  white-space: pre-wrap;
  word-wrap: break-word;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 14px;
  font-size: 0.92rem;
  margin: 0 0 12px;
}

/* ---------- How it works ---------- */
.how-section { padding: 24px 0 72px; text-align: center; }
.how-section h2 { font-size: 1.6rem; margin-bottom: 32px; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}

.how-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.how-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.how-card p { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }

.how-note {
  margin-top: 28px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---------- CTA ---------- */
.cta-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
  color: #fff;
  text-align: center;
  padding: 72px 0;
}
.cta-section h2 { font-size: 1.8rem; margin: 0 0 12px; }
.cta-section p { color: #c7d2fe; margin: 0 0 28px; }
.cta-section .btn-primary { background: #fff; color: var(--color-primary); width: auto; }
.cta-section .btn-primary:hover { background: #e0e7ff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-header-bg);
  color: #94a3b8;
  text-align: center;
  padding: 32px 0;
  font-size: 0.85rem;
}
.site-footer p { margin: 4px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .tool-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.85rem; }
  .hero { padding: 48px 0 80px; }
}
