/* AS-21 — full unlocked InkScore report screen. Theme-aware, responsive, no external assets. */
.afr-card {
  --afr-bg: #fffdf9; --afr-fg: #1a1a1a; --afr-muted: #6b6b6b; --afr-line: #ece5d8;
  --afr-track: #efe8db; --afr-good: #2f9e5f; --afr-ok: #e0a13a; --afr-low: #c0503a;
  font-family: var(--sans, system-ui, sans-serif);
  background: var(--afr-bg); color: var(--afr-fg);
  border: 1px solid var(--afr-line); border-radius: 14px; padding: 18px;
  margin-top: 10px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}
.afr-empty { color: var(--afr-muted); font-size: 13px; }

.afr-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.afr-gauge { --ring: var(--afr-ok); position: relative; width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(var(--ring) calc(var(--pct,0) * 1%), var(--afr-track) 0); }
.afr-good { --ring: var(--afr-good); } .afr-ok { --ring: var(--afr-ok); } .afr-low { --ring: var(--afr-low); }
.afr-gauge::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--afr-bg); }
.afr-gauge-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; z-index: 1; }
.afr-headlab { display: flex; flex-direction: column; gap: 2px; }
.afr-title { font-weight: 600; font-size: 14px; }
.afr-grade.afr-good { color: #2f7d4f; } .afr-grade.afr-ok { color: #a5741f; } .afr-grade.afr-low { color: #a3352b; }
.afr-potential { font-size: 12px; color: var(--afr-muted); } .afr-potential { font-weight: 600; }
.afr-stamp { font-size: 9px; letter-spacing: .04em; color: var(--afr-muted); opacity: .7; }
.afr-dl { margin-left: auto; font: 700 13px var(--sans, sans-serif); color: #1a1a1a; background: #e9c46a; border: none; border-radius: 999px; padding: 10px 16px; cursor: pointer; }
.afr-dl:hover { background: #efd08a; }

.afr-pillars { display: flex; flex-direction: column; gap: 8px; }
.afr-pillar-top { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.afr-pillar-name { font-weight: 600; } .afr-pillar-wt { color: var(--afr-muted); font-size: 10px; }
.afr-lc { color: #a5741f; font-size: 10px; font-weight: 600; margin-left: auto; }
.afr-track { height: 7px; border-radius: 999px; background: var(--afr-track); margin-top: 4px; overflow: hidden; }
.afr-fill { height: 100%; border-radius: 999px; }
.afr-fill.afr-good { background: var(--afr-good); } .afr-fill.afr-ok { background: var(--afr-ok); } .afr-fill.afr-low { background: var(--afr-low); }
.afr-pillar-score { font-size: 11px; color: var(--afr-muted); text-align: right; margin-top: 2px; font-variant-numeric: tabular-nums; }

.afr-issues { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--afr-line); padding-top: 12px; }
.afr-issues-h { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--afr-muted); }
.afr-issue { padding: 9px 11px; border-radius: 9px; background: var(--afr-track); }
.afr-issue-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.afr-lock { opacity: .6; }
.afr-issue-title { flex: 1 1 auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.afr-issue-impact { font-weight: 700; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.afr-sev-critical .afr-issue-impact, .afr-sev-major .afr-issue-impact { color: var(--afr-low); }
.afr-sev-minor .afr-issue-impact, .afr-sev-info .afr-issue-impact { color: #a5741f; }
.afr-issue-why { font-size: 12px; color: #444; margin-top: 5px; }
.afr-issue-actions { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.afr-issue-loc { font: 500 11px ui-monospace, Menlo, monospace; color: var(--afr-muted); flex: 1 1 auto; }
.afr-fix, .afr-jump { font: 700 11px var(--sans, sans-serif); border: none; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.afr-fix { color: #1a1a1a; background: #e9c46a; } .afr-fix:hover { background: #efd08a; }
.afr-jump { color: var(--afr-fg); background: transparent; border: 1px solid var(--afr-line); }
.afr-xray-link { align-self: flex-start; font: 600 12px var(--sans, sans-serif); color: #7a5a12; background: none; border: none; cursor: pointer; padding: 4px 0; }
.afr-unlock { font: 700 14px var(--sans, sans-serif); color: #1a1a1a; background: #e9c46a; border: none; border-radius: 999px; padding: 12px 18px; cursor: pointer; text-align: center; }
.afr-unlock:hover { background: #efd08a; }

@media (max-width: 520px) { .afr-dl { margin-left: 0; } }

@media (prefers-color-scheme: dark) {
  .afr-card { --afr-bg: #23201b; --afr-fg: #f0ece4; --afr-muted: #9a9488; --afr-line: #3a332a;
    --afr-track: #322c24; --afr-good: #45b877; --afr-ok: #e0a13a; --afr-low: #d96a54; }
  .afr-issue-why { color: #cbc5ba; } .afr-dl, .afr-fix, .afr-unlock { color: #1a1a1a; }
}
:root[data-theme="dark"] .afr-card { --afr-bg: #23201b; --afr-fg: #f0ece4; --afr-muted: #9a9488; --afr-line: #3a332a;
  --afr-track: #322c24; --afr-good: #45b877; --afr-ok: #e0a13a; --afr-low: #d96a54; }

/* AS interactive-issues: the per-issue "what do I do" hint (shown when no one-click Fix exists) */
.afr-issue-hint { font-size: 12px; color: #2d6a4f; margin-top: 5px; font-weight: 500; }
@media (prefers-color-scheme: dark) { .afr-issue-hint { color: #7fbf9e; } }

/* missing-keyword gap-fill chips (issue.terms) */
.afr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.afr-chip { font: 600 11.5px var(--sans, sans-serif); color: #2d6a4f; background: #e7f6ec;
  border: 1px solid #bfe0cc; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.afr-chip:hover { background: #d8efe0; }
@media (prefers-color-scheme: dark) {
  .afr-chip { color: #7fbf9e; background: #183a29; border-color: #2a5a41; }
  .afr-chip:hover { background: #1f4833; }
}
