/* CV Mojo app (v2 preview): CV analytics (an-*).
   One series colour for charts: brand indigo one step lighter (#3442b5), validated
   for the chart lightness band and 8:1 contrast on white. Vote colours are a status
   trio checked for colour-blind separation; they always ship with labels and counts. */
.an {
  --an-series: #3442b5;
  --an-series-hot: #27349f;
  --an-grid: #e9eaf3;
  --an-axis: #cfd2e6;
  --an-decent: #2a7d00;
  --an-needs: #e0a800;
  --an-rework: #d93f43;
}
.an-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.an-muted { color: var(--muted); }
.an-none { margin: 0; padding: 16px 18px; font-size: 14.5px; color: var(--muted); background: var(--mist); border-radius: 14px; }
.an-count { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.an-card--cyan { --accent: var(--cyan); }
.an-card--channel { --accent: var(--channel); }
.an-card--indigo { --accent: var(--indigo); }
#anBody { display: grid; gap: 24px; }
.an-panel { display: grid; gap: 24px; }
.an-panel:focus { outline: none; }
.an-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }

/* Hero: the latest CV and its one headline number. */
.an-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 32px; padding: 30px 32px; }
.an-hero-main { flex: 1 1 320px; min-width: 0; }
.an-hero .db-label { margin-bottom: 8px; }
.an-hero h2 { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy); overflow-wrap: anywhere; }
.an-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 18px; font-size: 14px; color: var(--muted); }
.an-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.an-fig-n { font-size: clamp(3.4rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.05em; line-height: .95; color: var(--navy); }
.an-fig-of { font-size: 15px; font-weight: 700; color: var(--muted); }
.an-fig-l { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0 0; font-size: 14.5px; color: var(--muted); }
.an-fig-l b { color: var(--navy); }
.an-hero-text { max-width: 52ch; margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }
.an-hero-side { display: flex; align-items: center; gap: 20px; }
.an-sheet { flex: none; padding: 18px 20px; background: var(--channel-soft); border: 0; border-radius: 18px; cursor: pointer; }
.an-sheet:hover .cvm-sheet, .an-sheet:focus-visible .cvm-sheet { transform: rotate(0deg) translateY(-3px); }
.an-sheet:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.an-hero-actions { display: grid; gap: 10px; }
.an-hero--empty .ap-actions { margin-top: 16px; }
.an-meter { display: block; height: 8px; overflow: hidden; background: var(--mist); border-radius: 4px; }
.an-meter i { display: block; height: 100%; border-radius: 4px; transition: width 1s ease; }
.an-meter--ok i { background: var(--an-decent); }
.an-meter--warn i { background: var(--an-needs); }
.an-meter--low i { background: var(--an-rework); }
.an-meter--hero { max-width: 360px; margin-top: 14px; }
.an-kpis .ap-stat-n { overflow-wrap: anywhere; }

/* Cards */
.an-for { margin: -8px 0 16px; font-size: 13.5px; color: var(--muted); }
.an-score { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.an-score-l { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.an-score .an-muted { margin: 0; font-size: 13.5px; line-height: 1.5; }
.an-votes { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.an-votes li { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.2em; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.an-votes b { color: var(--navy); font-variant-numeric: tabular-nums; }
.an-votes .an-muted { text-align: right; font-variant-numeric: tabular-nums; }
.an-vote-l { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.an-key { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.an-key--decent, .an-vfill--decent { background: var(--an-decent); }
.an-key--needs, .an-vfill--needs { background: var(--an-needs); }
.an-key--rework, .an-vfill--rework { background: var(--an-rework); }
.an-vtrack { grid-column: 1 / -1; display: block; height: 6px; overflow: hidden; background: var(--mist); border-radius: 3px; }
.an-vfill { display: block; height: 100%; border-radius: 3px; }
.an-cmp { margin: 18px 0 0; padding-top: 14px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.an-cmp b { color: var(--navy); }
.an-facts { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.an-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.an-facts b { color: var(--navy); font-variant-numeric: tabular-nums; }
.an-cta { margin: 16px 0 0; font-size: 14px; font-weight: 700; }
.an-cta--center { text-align: center; }

/* Job readiness and references */
.an-ready .db-bar { margin-bottom: 6px; }
.an-checks { display: grid; gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; }
.an-checks li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 4px; }
.an-check { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: #fff; border: 2px solid #cfd2e6; border-radius: 50%; }
.an-checks li.is-done .an-check { background: var(--ok); border-color: var(--ok); }
.an-check-text { display: grid; gap: 2px; min-width: 0; }
.an-check-text b { font-size: 14.5px; color: var(--navy); }
.an-check-text > span { font-size: 13px; color: var(--muted); }
.an-check-text .ap-linkish { justify-self: start; margin-top: 2px; font-size: 13.5px; font-weight: 700; }
.an-checks li.is-done .an-check-text b { color: var(--muted); }
.an-refs-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.an-big { flex: none; display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 10px; font-size: 2rem; font-weight: 800; letter-spacing: -.04em; color: var(--navy); background: var(--channel-soft); border-radius: 18px; transform: rotate(-4deg); }
.an-refs-msg { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; color: var(--navy); }
.an-refs-top .an-muted { margin: 0; font-size: 13.5px; }
.an-progress { margin-bottom: 18px; }

/* Visitors */
.an-lead { margin: -6px 0 12px; font-size: 13.5px; }
.an-visitors { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.an-visitor { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; }
.an-visitor:hover { background: var(--mist); }
.an-visitor .ap-row-main b { display: block; overflow: hidden; font-size: 15px; color: var(--navy); white-space: nowrap; text-overflow: ellipsis; }
.an-visitor .ap-row-main span { display: block; overflow: hidden; font-size: 13px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.an-when { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Score tracker link */
.an-strip { display: flex; align-items: center; gap: 14px; padding: 14px 18px; font-size: 14.5px; color: var(--text); text-decoration: none; background: var(--yellow-soft); border: 1px solid #e9ef8c; border-radius: 16px; }
.an-strip:hover { color: var(--text); text-decoration: none; border-color: var(--navy); }
.an-strip b { margin-right: 6px; color: var(--navy); }
.an-strip > span:nth-child(2) { flex: 1; min-width: 0; }
.an-strip > svg { flex: none; color: var(--indigo); }
.an-strip-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; color: var(--navy); background: var(--yellow); border-radius: 11px; transform: rotate(-4deg); }

/* Chart cards */
.an-chart { display: grid; gap: 16px; }
.an-chart-h { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.an-chart-h h2 { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; color: var(--navy); }
.an-chart-h p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.an-view button { padding: 6px 12px; font-size: 13px; }
.an-view button:focus-visible, .an-plot:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.an-plot { position: relative; border-radius: 10px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.an-plot[hidden], .an-tablewrap[hidden] { display: none; }
.an-svgwrap { overflow: hidden; }
.an-svg { display: block; max-width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.an-grid { stroke: var(--an-grid); stroke-width: 1; shape-rendering: crispEdges; }
.an-grid.an-axis { stroke: var(--an-axis); }
.an-tick, .an-xlab { font-size: 11.5px; font-weight: 600; fill: var(--muted); font-variant-numeric: tabular-nums; }
.an-val { font-size: 12.5px; font-weight: 800; fill: var(--navy); }
.an-bar { fill: var(--an-series); transition: fill .15s ease; }
.an-bar.is-on { fill: var(--an-series-hot); }
.an-line { fill: none; stroke: var(--an-series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.an-area { fill: var(--an-series); fill-opacity: .1; stroke: none; }
.an-dot, .an-hot { fill: var(--an-series); stroke: #fff; stroke-width: 2; }
.an-hot { fill: var(--an-series-hot); }
.an-xhair { stroke: var(--an-axis); stroke-width: 1; shape-rendering: crispEdges; }
.an-tip { position: absolute; z-index: 5; display: grid; gap: 2px; min-width: 120px; max-width: 240px; padding: 9px 12px; font-size: 12.5px; line-height: 1.4; color: var(--muted); pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(25, 29, 59, .12); }
.an-tip[hidden] { display: none; }
.an-tip b { font-size: 15px; font-weight: 800; color: var(--navy); }
.an-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.an-note svg { flex: none; margin-top: 2px; color: var(--indigo); }

/* Tables */
.an-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.an-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.an-table th, .an-table td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.an-table thead th { padding-top: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; border-bottom-color: var(--an-axis); }
.an-table tbody th { font-weight: 700; color: var(--navy); white-space: nowrap; }
.an-table tbody tr:last-child th, .an-table tbody tr:last-child td { border-bottom: 0; }
.an-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.an-table td { color: var(--text); }
.an-table a { font-weight: 700; white-space: nowrap; }
.an-table--versions { min-width: 640px; }
.an-table .an-role { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-table tr.is-latest { background: var(--yellow-soft); }
.an-latest { margin-left: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 800; color: var(--navy); background: var(--yellow); border-radius: 999px; }
.an-cell-score { font-weight: 800; color: var(--navy); }
.an-prov { display: block; font-size: 11.5px; font-weight: 600; color: var(--amber); }

@media (prefers-reduced-motion: reduce) { .an-meter i, .an-bar { transition: none; } }
@media (max-width: 1180px) { .an-grid2--charts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .an-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .an-hero { padding: 24px 20px; }
  .an-hero-side { width: 100%; }
  .an-sheet { display: none; }
  .an-hero-actions { display: flex; flex-wrap: wrap; width: 100%; }
  .an-hero-actions .btn { flex: 1; }
  .an-strip { align-items: flex-start; }
  .an-strip > svg { display: none; }
}
