/* =============================================
   Screenly — results.css
   Score circles, verdict, tabs, panel cards,
   keywords, gaps, strengths, ATS view
   ============================================= */

.results-section { padding: 64px var(--page-pad) 80px; animation: fade-in 0.5s ease forwards; }
.results-container { max-width: var(--page-max); margin: 0 auto; }

.results-header {
  text-align: center; margin-bottom: 48px;
  padding-bottom: 32px; border-bottom: 2px solid var(--border);
}

.results-title { font-family: var(--font-display); font-size: 2.5rem; font-weight: 900; letter-spacing: -1px; margin-bottom: 6px; color: var(--text); }
.results-filename { font-family: var(--font-mono); font-size: 0.875rem; color: var(--text-muted); }

/* ── Score circles ── */
.scores-row {
  display: flex; align-items: center; justify-content: center;
  gap: 40px; margin-bottom: 40px; flex-wrap: wrap;
}

.score-circle-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; }
.score-side { flex-shrink: 0; }
.score-side .score-svg   { width: 120px; height: 120px; }
.score-center .score-svg { width: 180px; height: 180px; }

.score-svg { transform: rotate(-90deg); overflow: visible; }

.score-track  { fill: none; stroke: var(--border); stroke-width: 8; }
.score-fill   { fill: none; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset 1.5s cubic-bezier(0.4,0,0.2,1); }

.score-center .score-track { stroke-width: 10; }
.score-center .score-fill  { stroke-dasharray: 439.8; stroke-dashoffset: 439.8; stroke-width: 10; }

.score-fill-ats     { stroke: var(--score-ats); }
.score-fill-content { stroke: var(--score-content); }
.score-fill-overall { stroke: var(--score-overall); }

.score-inner {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) translateY(-6px);
  text-align: center; line-height: 1;
}

.score-number { font-family: var(--font-display); font-weight: 900; font-size: 1.75rem; display: block; color: var(--text); }
.score-center .score-number { font-size: 2.5rem; }
.score-label-num { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.score-grade { display: block; font-family: var(--font-display); font-weight: 900; font-size: 1rem; color: var(--score-overall); margin-top: 4px; }
.score-label { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); font-family: var(--font-body); text-align: center; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Verdict ── */
.verdict-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 36px; box-shadow: var(--shadow-card);
}
.verdict-text { font-size: 1.05rem; color: var(--text); line-height: 1.65; }

/* ── Tabs ── */
.results-tabs {
  display: flex; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px;
  margin-bottom: 24px; overflow-x: auto;
}

.tab-btn {
  flex: 1; padding: 11px 18px;
  background: none; border: none; border-radius: var(--radius-sm);
  color: var(--text-muted); font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: all var(--transition); white-space: nowrap; letter-spacing: 0.01em;
}
.tab-btn:hover { color: var(--text); background: var(--bg-subtle); }
.tab-btn.active { background: var(--accent); color: #fff; }

.tab-panel { animation: fade-in 0.25s ease; }

/* ── Panel grid ── */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.panel-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-card);
}
.panel-card.full-width { grid-column: 1 / -1; }

.card-title {
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 900;
  color: var(--text); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.card-icon { font-size: 1rem; }

/* ── Issue list ── */
.issue-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.issue-list li {
  font-size: 0.9rem; color: var(--text-muted); padding: 9px 12px;
  border-radius: var(--radius-sm); background: var(--warning-light);
  border-left: 3px solid var(--warning); line-height: 1.5;
}
.issue-list li.danger  { background: var(--danger-light);  border-left-color: var(--danger);  color: var(--text); }
.issue-list li.success { background: var(--success-light); border-left-color: var(--success); color: var(--text); }
.empty-state { font-size: 0.9rem; color: var(--success); font-weight: 700; }

/* ── Tags ── */
.tags-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 11px; border-radius: 4px; font-size: 0.8rem; font-family: var(--font-mono); border: 1px solid; font-weight: 500; }
.tag.readable   { border-color: var(--success); color: var(--success); background: var(--success-light); }
.tag.unreadable { border-color: var(--danger);  color: var(--danger);  background: var(--danger-light); }

/* ── Keywords grid ── */
.keywords-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 8px; }
.keyword-item {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-family: var(--font-mono);
  border: 1px solid var(--border); background: var(--bg);
}
.keyword-item.found   { border-color: rgba(26,122,74,0.25); background: var(--success-light); color: var(--text); }
.keyword-item.missing { border-color: var(--border); color: var(--text-dim); background: var(--bg); }
.keyword-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.found   .keyword-dot { background: var(--success); }
.missing .keyword-dot { background: var(--border-dark); }

/* ── Content stats ── */
.content-stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; text-align: center; box-shadow: var(--shadow-card); }
.stat-number { font-family: var(--font-display); font-size: 2rem; font-weight: 900; display: block; margin-bottom: 4px; color: var(--text); }
.stat-label  { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Gaps ── */
.gaps-list { display: flex; flex-direction: column; gap: 12px; }
.gap-item  { border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; background: var(--bg-card); }
.gap-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-subtle); }
.gap-severity { padding: 2px 9px; border-radius: 3px; font-size: 0.72rem; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.gap-severity.high   { background: var(--danger-light);  color: var(--danger);  border: 1px solid var(--danger); }
.gap-severity.medium { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning); }
.gap-severity.low    { background: var(--accent-light);  color: var(--accent);  border: 1px solid var(--accent); }
.gap-category { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.gap-body { padding: 12px 16px; border-top: 1px solid var(--border); }
.gap-description { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.55; }
.gap-suggestion { font-size: 0.875rem; color: var(--text); background: var(--success-light); border: 1px solid rgba(26,122,74,0.2); border-radius: var(--radius-sm); padding: 9px 12px; line-height: 1.55; }
.gap-suggestion::before { content: '→ '; color: var(--success); font-weight: 700; }

/* ── Strengths ── */
.strength-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.strength-list li { font-size: 0.9rem; color: var(--text-muted); padding: 9px 12px; border-radius: var(--radius-sm); border-left: 3px solid var(--success); background: var(--success-light); line-height: 1.5; }

/* ── ATS view ── */
.ats-view-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.ats-view-pre  { background: var(--text); color: #f0ede6; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; font-family: var(--font-mono); font-size: 0.8rem; overflow-x: auto; max-height: 500px; overflow-y: auto; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }

/* ── Refine CTA ── */
.refine-section {
  margin-top: 48px; padding: 48px 36px;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); text-align: center; box-shadow: var(--shadow-lift);
}
.refine-title { font-family: var(--font-display); font-size: 2rem; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 10px; color: var(--text); }
.refine-desc  { font-size: 1rem; color: var(--text-muted); max-width: 520px; margin: 0 auto 28px; line-height: 1.7; }
.refine-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 52px; background: var(--accent); color: #fff;
  font-family: var(--font-body); font-weight: 700; font-size: 1.05rem;
  border-radius: var(--radius-sm); cursor: pointer; border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
  letter-spacing: 0.02em;
}
.refine-btn:hover:not(:disabled) { background: #a93226; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(192,57,43,0.3); }
.refine-btn:disabled { opacity: 0.55; cursor: not-allowed; }
