/* ── GBP AUDIT PAGE ─────────────────────────────── */
/* Extends theme.css tokens. Only app-specific styles here. */

.audit-page { min-height: 100vh; }

.audit-hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.audit-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 0.75rem;
}
.audit-hero p {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

/* URL input form */
.gbp-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
}
.gbp-form input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}
.gbp-form input:focus { border-color: var(--accent); }
.gbp-form input::placeholder { color: var(--fg-muted); }

.btn-primary {
  background: var(--accent);
  color: #0D1117;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Score display */
.score-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
}
.score-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: start;
}
.score-ring { position: relative; width: 140px; height: 140px; }
.score-ring svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 8; }
.score-track { stroke: var(--bg-3); }
.score-fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.score-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}
.score-slash { font-size: 0.8rem; color: var(--fg-muted); }

.score-details h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; margin-bottom: 0.25rem; color: var(--fg); }
.score-cat { font-size: 0.8rem; color: var(--fg-muted); margin-bottom: 1.5rem; }

.breakdown { display: flex; flex-direction: column; gap: 0.75rem; }
.breakdown-row { display: flex; align-items: center; gap: 0.75rem; }
.bd-name { font-size: 0.8rem; color: var(--fg-muted); width: 100px; flex-shrink: 0; }
.bd-bar { flex: 1; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.bd-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.bd-fill.high { background: var(--accent); }
.bd-fill.mid { background: var(--amber); }
.bd-fill.low { background: var(--red); }
.bd-pct { font-size: 0.75rem; font-weight: 600; color: var(--fg-muted); width: 32px; text-align: right; }

.quick-wins { margin-top: 1.25rem; }
.quick-wins h3 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 0.6rem; }
.quick-wins ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.quick-wins li { font-size: 0.82rem; color: var(--fg-muted); padding-left: 1.2rem; position: relative; }
.quick-wins li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

/* Heatmap section */
.heatmap-section { max-width: 860px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.section-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; margin-bottom: 1.5rem; color: var(--fg); }

.heatmap-controls { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.heatmap-controls input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--fg);
  outline: none;
}
.heatmap-controls input:focus { border-color: var(--accent); }

.geo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 360px;
  margin: 0 auto 1rem;
}
.geo-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: #0D1117;
  transition: transform 0.15s;
}
.geo-cell:hover { transform: scale(1.05); }
.cell-high { background: var(--accent); box-shadow: 0 0 12px rgba(0,212,167,0.4); }
.cell-mid { background: var(--amber); }
.cell-low { background: var(--bg-3); border: 1px solid rgba(248,81,73,0.3); color: var(--red); }

.heatmap-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.hl { font-size: 0.72rem; font-weight: 500; display: flex; align-items: center; gap: 0.4rem; }
.hl::before { content: ''; width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hl-high::before { background: var(--accent); box-shadow: 0 0 6px var(--accent); color: var(--accent); }
.hl-mid::before { background: var(--amber); }
.hl-low::before { background: var(--bg-3); border: 1px solid rgba(248,81,73,0.4); }
.hl-high { color: var(--accent); }
.hl-mid { color: var(--amber); }
.hl-low { color: var(--fg-muted); }

/* Posts section */
.posts-section { max-width: 860px; margin: 0 auto; padding: 0 2rem 4rem; }
.posts-list { display: flex; flex-direction: column; gap: 1rem; }
.post-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.post-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.post-badge { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; background: var(--accent-glow); color: var(--accent); border-radius: 20px; padding: 0.2rem 0.6rem; }
.post-date { font-size: 0.72rem; color: var(--fg-muted); }
.post-content { font-size: 0.9rem; color: var(--fg); line-height: 1.65; }
.post-keywords { margin-top: 0.75rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.post-kw { font-size: 0.65rem; background: var(--bg-3); color: var(--fg-muted); border-radius: 4px; padding: 0.2rem 0.5rem; }

/* Loading state */
.loading { text-align: center; padding: 3rem; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--bg-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.9rem; color: var(--fg-muted); }

/* Error */
.error-msg { max-width: 560px; margin: 1rem auto; background: rgba(248,81,73,0.1); border: 1px solid rgba(248,81,73,0.3); border-radius: 8px; padding: 0.75rem 1rem; font-size: 0.85rem; color: var(--red); text-align: center; }

/* Responsive */
@media (max-width: 768px) {
  .score-card { grid-template-columns: 1fr; }
  .score-ring { margin: 0 auto; }
  .gbp-form { flex-direction: column; }
  .geo-grid { max-width: 280px; }
}