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

:root {
  --bg: #fafafa;
  --ink: #111;
  --ink-2: #444;
  --ink-3: #888;
  --panel: #fff;
  --line: #e5e5e5;
  --accent: #111;
  --accent-soft: #f5f5f5;
  --danger: #e11;
  --danger-soft: #fef2f2;
  --good: #22c55e;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }

h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.15; }
h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
h3 { font-size: 1rem; font-weight: 600; }
p { line-height: 1.6; color: var(--ink-2); }

.container {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── Nav ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Buttons ── */
.btn, button {
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 150ms;
}

.btn:hover, button:hover { opacity: 0.85; }

.btn-primary, button.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary, button.btn-secondary {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* ── Card ── */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--panel);
}

/* ── Forms ── */
.form-group { margin-bottom: 14px; }

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--ink-2);
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.93rem;
  color: var(--ink);
  background: var(--panel);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink-3);
}

textarea { min-height: 250px; resize: vertical; }

/* ── Auth ── */
.auth-wrap {
  max-width: 380px;
  margin: 80px auto;
}

.auth-wrap .card { padding: 28px; }

.sub {
  color: var(--ink-3);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.auth-footer a { font-weight: 600; color: var(--ink); }

/* ── Banners ── */
.inline-banner {
  border-radius: 8px;
  font-size: 0.88rem;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.inline-banner.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.inline-banner.success {
  background: #f0fdf4;
  color: #15803d;
}

.inline-banner.warning {
  background: #fffbeb;
  color: #a16207;
}

.hidden { display: none !important; }

/* ── Badge / Pill ── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink-2);
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--ink-2);
}

.score-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--ink);
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  padding: 48px 0 32px;
  align-items: start;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 8px;
}

/* ── 1px gap grid ── */
.gap-grid {
  gap: 1px;
  background: var(--line);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.gap-grid > * { background: var(--panel); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.metric-grid > * { background: var(--panel); padding: 16px; }
.metric strong { display: block; font-size: 0.93rem; margin-bottom: 2px; }
.metric p { font-size: 0.82rem; margin-bottom: 0; }

/* ── Features ── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 32px;
}

.features > * {
  background: var(--panel);
  padding: 24px;
}

.features h3 { margin-bottom: 4px; }
.features p { font-size: 0.88rem; margin-bottom: 0; }

/* ── Dashboard ── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dash-header h1 { font-size: 1.15rem; margin-bottom: 0; }

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 16px;
}

.status-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* ── Results ── */
.big-score {
  font-size: clamp(2.8rem, 7vw, 4.1rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.kpi {
  background: var(--panel);
  padding: 12px;
}

.kpi strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.kpi .muted { font-size: 0.78rem; }

/* ── Issues ── */
.issue-list, .plan-list, .history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.issue-item, .plan-item, .history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.issue-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.severity {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
}

.severity.high { background: #fff1f0; color: #b42318; }
.severity.medium { background: #fffbeb; color: #a16207; }
.severity.low { background: #f0fdf4; color: #15803d; }

/* ── History ── */
.history-item { font-size: 0.9rem; }

/* ── Plan table ── */
.plan-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.plan-card {
  background: var(--panel);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-card.featured { background: var(--accent-soft); }

.plan-price {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 4px 0;
}

.plan-price span {
  font-size: 1rem;
  color: var(--ink-3);
  font-weight: 400;
}

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

.plan-card .plan-list { gap: 4px; }
.plan-card .plan-item {
  border: none;
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

/* ── Utilities ── */
.stack-8 { display: grid; gap: 8px; }
.stack-12 { display: grid; gap: 12px; }
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.muted { color: var(--ink-3); }
.page-header { padding: 40px 0 24px; }
.page-header p { max-width: 480px; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--ink-3);
  font-size: 0.82rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero,
  .features,
  .dashboard-grid,
  .plan-table,
  .kpis,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .container { width: calc(100% - 24px); }
  .card { padding: 18px; }
  .hero { padding: 24px 0 16px; }
  .auth-wrap { margin: 40px auto; }
}
