/* RankMender design system — layered on top of Pico v2.
   Professional SaaS look: Inter, refined indigo accent, neutral palette. */

:root {
  --pico-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pico-font-family-sans-serif: var(--pico-font-family);
  --pico-line-height: 1.55;
  --pico-border-radius: 10px;

  /* Brand accent */
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --pico-primary: var(--brand);
  --pico-primary-background: var(--brand);
  --pico-primary-hover: var(--brand-hover);
  --pico-primary-hover-background: var(--brand-hover);
  --pico-primary-focus: rgba(79, 70, 229, 0.25);
  --pico-primary-inverse: #ffffff;

  /* Neutrals */
  --pico-background-color: #f7f8fb;
  --pico-color: #0f172a;
  --pico-h1-color: #0f172a;
  --pico-h2-color: #0f172a;
  --pico-muted-color: #64748b;
  --pico-muted-border-color: #e6e8ee;
  --pico-card-background-color: #ffffff;
  --pico-card-border-color: #e6e8ee;
  --pico-card-box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);

  --pico-form-element-border-color: #d8dce4;
  --pico-spacing: 1rem;
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

h1, h2, h3 { letter-spacing: -0.015em; font-weight: 700; }
hgroup > * { margin-bottom: 0; }

/* ---------- App header ---------- */
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 2rem;
}
.app-header > nav { padding-top: 0.85rem; padding-bottom: 0.85rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.1rem; color: var(--pico-color);
  text-decoration: none; letter-spacing: -0.02em;
}
.brand:hover { color: var(--pico-color); }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff; flex: none;
}
.app-header nav a { --pico-color: #475569; font-weight: 500; text-decoration: none; }
.app-header nav a:hover { --pico-color: var(--brand); }
.app-header ul { align-items: center; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  font-weight: 600; font-size: 0.78rem; line-height: 1.6;
}
.badge--plan { background: #eef2ff; color: var(--brand); text-transform: uppercase; letter-spacing: 0.04em; }

.score-badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }
.score-good { background: #dcfce7; color: #166534; }
.score-warn { background: #fef3c7; color: #92400e; }
.score-bad  { background: #fee2e2; color: #991b1b; }
.sev-info   { background: #dbeafe; color: #1e40af; }

/* Severity pill with a leading status dot (no emoji) */
.sev { border: 1px solid transparent; }
.sev::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: currentColor; flex: none; }
.sev--critical { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.sev--warning  { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.sev--info     { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* ---------- Cards / grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.card-grid article { margin: 0; height: 100%; }

.site-card { transition: box-shadow 0.15s ease, transform 0.15s ease; }
.site-card:hover { box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08); transform: translateY(-1px); }
.site-card a { text-decoration: none; }

/* ---------- Issues (grouped scan results) ---------- */
.issue-card { margin-bottom: 0.85rem; padding: 1.1rem 1.25rem; }
.issue-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.issue-title { font-weight: 600; font-size: 1.02rem; }
.issue-meta { margin-left: auto; color: var(--pico-muted-color); font-size: 0.85rem; white-space: nowrap; }
.issue-fix { margin: 0.5rem 0 0; color: #475569; }
.issue-card details { margin-top: 0.6rem; }
.issue-card summary { color: var(--brand); font-size: 0.85rem; }
.issue-card details ul { margin: 0.5rem 0 0; }

/* ---------- Banners ---------- */
.banner { padding: 0.75rem 1rem; border-radius: var(--pico-border-radius); margin-bottom: 1.25rem; font-size: 0.95rem; }
.banner--info { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ---------- Auth / centered cards ---------- */
.auth-shell { display: grid; place-items: center; min-height: 70vh; }
.auth-card { width: 100%; max-width: 420px; text-align: center; padding: 2.25rem 2rem; }
.auth-card h1 { margin-bottom: 0.25rem; }
.btn-block { width: 100%; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.status-line { min-height: 1.5rem; margin-top: 1rem; color: var(--pico-muted-color); font-size: 0.9rem; }

/* ---------- Marketing (landing / coming soon) ---------- */
.hero { max-width: 760px; margin: 12vh auto 0; text-align: center; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; color: var(--brand); font-weight: 600; margin-bottom: 0.75rem; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); line-height: 1.05; margin-bottom: 0.75rem; }
.hero .lead { font-size: 1.2rem; color: var(--pico-muted-color); margin-bottom: 2rem; }
.cta { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.cta a { text-decoration: none; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; max-width: 960px; margin: 5rem auto 0; }
.features article { margin: 0; height: 100%; }
.features h3 { font-size: 1.1rem; }
.site-footer { text-align: center; color: var(--pico-muted-color); padding: 4rem 1rem 2.5rem; font-size: 0.9rem; }

.center-shell { display: grid; min-height: 100vh; place-items: center; padding: 2rem; }
.center-shell .eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; color: var(--brand); font-weight: 600; margin-bottom: 0.75rem; }
.center-shell h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; margin-bottom: 1rem; }
.center-shell p { font-size: 1.1rem; color: var(--pico-muted-color); max-width: 34rem; }
