/* Workforce analytics: reference-led dashboard layout, scoped to this section. */
.hc-dashboard {
  --hc-blue: #2463eb;
  --hc-ink: #111a38;
  --hc-muted: #68789f;
  --hc-border: #e0e7f4;
  --hc-soft: #f5f8fd;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(28px, 3vw, 40px);
  color: var(--hc-ink);
}
.hc-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--hc-border);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: 0 1px 2px rgb(16 24 40 / 4%), 0 8px 24px -12px rgb(16 24 40 / 10%);
  opacity: 1;
}
[data-theme='dark'] .hc-card { --hc-ink: #eef2ff; --hc-muted: #a9b6d4; --hc-border: #313b55; --hc-soft: #1b2336; }
.hc-heading { display: flex; align-items: center; gap: 14px; min-width: 0; position: relative; }
.hc-icon { width: 54px; height: 54px; display: grid; place-items: center; flex: none; border-radius: 10px; color: var(--hc-blue); background: #e8efff; }
[data-theme='dark'] .hc-icon { background: #1c315c; color: #83aaff; }
.hc-icon svg { width: 30px; height: 30px; }
.hc-title-group { min-width: 0; }
.hc-title-group h3 { margin: 0; color: var(--hc-ink); font-size: clamp(19px, 1.6vw, 25px); font-weight: 650; line-height: 1.2; letter-spacing: -.025em; }
.hc-title-group p { margin: 3px 0 0; color: var(--hc-muted); font-size: clamp(12px, 1vw, 14px); line-height: 1.35; }
.hc-badge { align-self: center; margin-left: auto; display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 5px 10px; border: 1px solid var(--hc-border); border-radius: 999px; color: var(--hc-muted); background: var(--hc-soft); font-size: 11px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; white-space: nowrap; }
.hc-badge i { width: 7px; height: 7px; border-radius: 50%; background: #7182a8; }
.hc-chart-area { position: relative; display: block; height: 278px; margin: 18px 0 14px; }
.hc-y-axis { position: absolute; z-index: 1; left: 0; top: 44px; bottom: 50px; display: flex; flex-direction: column; justify-content: space-between; color: var(--hc-muted); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.hc-y-axis span { line-height: 1; transform: translateY(-50%); }
.hc-plot { position: absolute; inset: 44px 0 50px 34px; min-width: 0; }
.hc-gridlines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.hc-gridlines i { display: block; height: 1px; background: color-mix(in srgb, var(--hc-border) 70%, transparent); }
.hc-gridlines i:last-child { background: #cbd4e3; }
.hc-bars { position: absolute; inset: 0; display: flex; align-items: stretch; padding: 0 4px; }
.hc-bar-item { position: relative; display: block; height: 100%; flex: 1 1 0; min-width: 0; }
.hc-value { position: absolute; z-index: 1; left: 50%; bottom: calc(var(--bar-value) + 4px); color: var(--hc-ink); font-size: 15px; line-height: 18px; font-weight: 650; font-variant-numeric: tabular-nums; translate: -50% 0; }
.hc-bar-wrap { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.hc-bar { display: block; width: clamp(36px, 3vw, 42px); max-width: calc(100% - 8px); height: var(--bar-value); transform: scaleY(1); transform-origin: center bottom; border-radius: 5px 5px 0 0; background: var(--bar-color); transition: transform 820ms cubic-bezier(.23,1,.32,1), filter 180ms ease; }
.hc-bar-item .hc-change { position: absolute; z-index: 2; top: -32px; left: 50%; width: 54px; height: 21px; display: grid; place-items: center; padding: 0; border-radius: 11px; font-size: 11px; font-weight: 650; line-height: 1; white-space: nowrap; opacity: 1; translate: -50% 0; }
.hc-up { color: #079866; background: #e7f7f1; }
.hc-down { color: #ed343b; background: #fff0ee; }
.hc-dept-icon { position: absolute; left: 50%; bottom: -29px; display: grid; place-items: center; width: 24px; height: 22px; color: var(--bar-color); translate: -50% 0; }
.hc-dept-icon svg { width: 21px; height: 21px; }
.hc-label { position: absolute; left: 50%; bottom: -49px; max-width: 100%; overflow: hidden; color: var(--hc-muted); font-size: 12px; line-height: 16px; text-align: center; text-overflow: ellipsis; white-space: nowrap; translate: -50% 0; }
.hc-summary { min-height: 70px; display: flex; align-items: center; border-radius: 10px; background: var(--hc-soft); }
.hc-summary-left { justify-content: space-around; padding: 8px 10px; }
.hc-metric { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; flex: 1; }
.hc-metric + .hc-metric { align-self: stretch; border-left: 1px solid #d6deed; }
[data-theme='dark'] .hc-metric + .hc-metric { border-color: #3a4764; }
.hc-metric-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; color: var(--hc-blue); background: #e5edff; transition: background-color 180ms ease, color 180ms ease; }
[data-theme='dark'] .hc-metric-icon { background: #1c315c; color: #83aaff; }
.hc-metric-icon svg { width: 26px; height: 26px; }
.hc-metric strong { display: block; color: var(--hc-ink); font-size: clamp(22px, 1.7vw, 29px); font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.hc-metric small { display: block; margin-top: 4px; color: var(--hc-muted); font-size: 12px; white-space: nowrap; }
.hc-growth { color: #0ba76e; }
.hc-growth strong { color: #0a9e69; }
.hc-growth-icon { color: #0ba76e; font-size: 31px; line-height: .8; }
.hc-type-content { display: grid; grid-template-columns: minmax(190px, .9fr) minmax(215px, 1.1fr); align-items: center; gap: clamp(14px, 2vw, 26px); min-height: 270px; padding: 14px 0; flex: 1; }
.hc-donut-wrap { position: relative; width: min(100%, 238px); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; }
.hc-donut { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.hc-donut-track, .hc-segment { fill: none; stroke-width: 13; }
.hc-donut-track { stroke: #e6e8ee; }
[data-theme='dark'] .hc-donut-track { stroke: #30394d; }
.hc-segment { stroke-linecap: butt; opacity: 1; transition: stroke-dasharray 1150ms cubic-bezier(.23,1,.32,1), opacity 180ms ease, filter 180ms ease; }
.hc-donut-center { position: absolute; inset: 24%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; text-align: center; pointer-events: none; }
.hc-donut-center strong { color: var(--hc-ink); font-size: clamp(34px, 2.5vw, 44px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hc-donut-center span { margin-top: 6px; color: var(--hc-ink); font-size: 14px; line-height: 1.2; }
.hc-dashboard.is-visible .hc-donut-center span { opacity: 0; translate: 0 5px; transition: opacity 300ms ease, translate 300ms ease; }
.hc-dashboard.is-center-ready .hc-donut-center span { opacity: 1; translate: 0 0; }
.hc-legend { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.hc-legend li { min-height: 49px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 6px 10px; border: 1px solid var(--hc-border); border-radius: 9px; background: color-mix(in srgb, var(--surface, #fff) 88%, var(--hc-soft)); opacity: 1; transition: background-color 180ms ease, border-color 180ms ease; }
.hc-legend li > i { width: 16px; height: 16px; border-radius: 50%; background: var(--legend-color); }
.hc-legend-name { color: var(--hc-ink); font-size: 13px; }
.hc-legend-data { text-align: right; }
.hc-legend-data strong { display: block; color: var(--hc-ink); font-size: 16px; line-height: 1.1; }
.hc-legend-data small { display: block; margin-top: 2px; color: var(--hc-muted); font-size: 10px; white-space: nowrap; }
.hc-note { gap: 12px; min-height: 62px; padding: 8px 12px; border-radius: 9px; opacity: 1; }
.hc-note-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-right: 1px solid #c8d5ef; padding-right: 10px; box-sizing: content-box; color: var(--hc-blue); }
.hc-note-icon svg { width: 27px; height: 27px; }
.hc-note-copy { min-width: 0; }
.hc-note-copy strong { display: block; color: var(--hc-ink); font-size: 12px; font-weight: 600; }
.hc-note-copy small { display: block; margin-top: 3px; color: var(--hc-muted); font-size: 10px; line-height: 1.3; }
.hc-note-bars { display: none; }
.hc-donut-tooltip { position: absolute; z-index: 2; top: 8%; left: 58%; padding: 9px 12px; border: 1px solid var(--hc-border); border-radius: 12px; background: var(--surface, #fff); box-shadow: 0 5px 16px rgb(31 61 119 / 10%); color: var(--hc-ink); font-size: 12px; line-height: 1.35; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity 160ms ease, transform 160ms ease; white-space: nowrap; }
.hc-donut-tooltip.is-visible { opacity: 1; transform: translateY(0); }
.hc-donut-tooltip strong, .hc-donut-tooltip span { display: block; }
.hc-card.is-ready { opacity: 0; transform: translateY(12px); }
.hc-dashboard.is-visible .hc-card { animation: hc-card-in 520ms cubic-bezier(.23,1,.32,1) both; }
.hc-dashboard.is-visible .hc-card:nth-child(2) { animation-delay: 80ms; }
.hc-dashboard.is-visible .hc-bar { transform: scaleY(0); }
.hc-dashboard.is-visible .hc-bar-item.is-counted .hc-bar { transform: scaleY(1); }
.hc-dashboard.is-visible .hc-value { opacity: 0; translate: -50% 4px; transition: opacity 300ms ease, translate 300ms ease; }
.hc-dashboard.is-visible .hc-bar-item.is-counted .hc-value { opacity: 1; translate: -50% 0; transition-delay: 80ms; }
.hc-dashboard.is-visible .hc-change, .hc-dashboard.is-visible .hc-dept-icon, .hc-dashboard.is-visible .hc-label { opacity: 0; transform: translateY(5px); transition: opacity 320ms ease, transform 320ms ease; }
.hc-dashboard.is-visible .hc-bar-item.is-counted .hc-change { opacity: 1; transform: none; transition-delay: 820ms; }
.hc-dashboard.is-visible .hc-bar-item.is-counted .hc-dept-icon, .hc-dashboard.is-visible .hc-bar-item.is-counted .hc-label { opacity: 1; transform: none; transition-delay: 560ms; }
.hc-dashboard.is-visible .hc-metric strong, .hc-dashboard.is-visible .hc-donut-center strong { font-variant-numeric: tabular-nums; }
.hc-dashboard.is-visible .hc-donut-track { opacity: .4; }
.hc-dashboard.is-visible .hc-gridlines { opacity: 0; transition: opacity 220ms ease; }
.hc-dashboard.is-visible.is-grid-ready .hc-gridlines { opacity: 1; }
.hc-dashboard.is-visible:not(.is-drawn) .hc-segment { stroke-dasharray: 0 100 !important; }
.hc-dashboard.is-visible.is-drawn .hc-segment { transition-delay: calc(var(--segment-order, 0) * 90ms); }
.hc-dashboard.is-visible .hc-legend li { opacity: 0; transform: translateX(8px); transition: opacity 320ms ease, transform 320ms ease, background-color 180ms ease, border-color 180ms ease; }
.hc-dashboard.is-visible.is-drawn .hc-legend li { opacity: 1; transform: none; transition-delay: calc(1450ms + var(--legend-order, 0) * 80ms); }
.hc-dashboard.is-visible .hc-note { opacity: 0; transition: opacity 320ms ease; }
.hc-dashboard.is-legend-ready .hc-note { opacity: 1; }
@keyframes hc-card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (hover:hover) and (pointer:fine) {
  .hc-bar-item:hover .hc-bar, .hc-bar-item:focus-within .hc-bar { transform: translateY(-2px) scaleY(1.01); filter: brightness(1.04); transition-duration: 180ms; }
  .hc-bar-item { cursor: default; }
  .hc-bar-item::after { content: attr(data-name) ' · ' attr(data-value) ' employees · ' attr(data-change) ' vs last year'; position: absolute; z-index: 4; left: 50%; bottom: 72px; width: max-content; max-width: 210px; padding: 8px 10px; border: 1px solid var(--hc-border); border-radius: 9px; color: var(--hc-ink); background: var(--surface, #fff); box-shadow: 0 5px 16px rgb(31 61 119 / 10%); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity 150ms ease, transform 150ms ease; }
  .hc-bar-item:hover::after { opacity: 1; transform: translate(-50%, 0); }
  .hc-metric { transition: background-color 180ms ease; border-radius: 12px; }
  .hc-metric:hover .hc-metric-icon { color: #124ecb; background: #d9e5ff; }
  [data-theme='dark'] .hc-metric:hover .hc-metric-icon { background: #294477; color: #adc4ff; }
  .hc-segment { cursor: pointer; transform-origin: 120px 120px; transition: stroke-dasharray 1150ms cubic-bezier(.23,1,.32,1), opacity 180ms ease, filter 180ms ease, transform 180ms ease; }
  .hc-segment:hover, .hc-segment:focus { opacity: .9; filter: brightness(1.07); transform: scale(1.018); outline: none; }
  .hc-legend li:hover, .hc-legend li.is-active { border-color: color-mix(in srgb, var(--legend-color, var(--hc-blue)) 35%, var(--hc-border)); background: var(--hc-soft); }
}
@media (max-width: 1100px) {
  .hc-dashboard { grid-template-columns: 1fr; gap: 18px; }
  .hc-card { padding: 20px; }
  .hc-type-content { grid-template-columns: minmax(220px, .85fr) minmax(250px, 1.15fr); min-height: 270px; }
  .hc-donut-wrap { max-width: 238px; }
}
@media (max-width: 620px) {
  .hc-dashboard { margin-top: 28px; }
  .hc-card { padding: 18px 16px; border-radius: 15px; }
  .hc-heading { gap: 12px; padding-right: 0; align-items: flex-start; }
  .hc-icon { width: 48px; height: 48px; border-radius: 13px; }
  .hc-icon svg { width: 28px; height: 28px; }
  .hc-title-group h3 { font-size: 19px; }
  .hc-title-group p { font-size: 12px; }
  .hc-badge { position: absolute; top: 58px; right: 0; margin: 0; padding: 4px 8px; font-size: 9px; }
  .hc-chart-area { height: 274px; margin: 35px 0 14px; }
  .hc-y-axis { top: 44px; bottom: 50px; font-size: 10px; }
  .hc-plot { inset: 44px 0 50px 28px; }
  .hc-bars { gap: 4px; padding: 0 4px; }
  .hc-bar { width: 36px; max-width: calc(100% - 6px); border-radius: 4px 4px 0 0; }
  .hc-bar-item .hc-change { top: -30px; width: 48px; height: 19px; font-size: 9px; }
  .hc-value { font-size: 13px; line-height: 16px; }
  .hc-label { font-size: 10px; }
  .hc-dept-icon { width: 22px; height: 22px; }
  .hc-dept-icon svg { width: 20px; height: 20px; }
  .hc-y-axis { font-size: 11px; }
  .hc-summary { min-height: 64px; }
  .hc-summary-left { padding: 7px 2px; }
  .hc-metric { gap: 6px; padding: 0 6px; }
  .hc-metric-icon { width: 30px; height: 30px; border-radius: 8px; }
  .hc-metric-icon svg { width: 20px; height: 20px; }
  .hc-metric strong { font-size: 18px; }
  .hc-metric small { font-size: 9px; white-space: normal; }
  .hc-growth-icon { font-size: 24px; }
  .hc-type-content { grid-template-columns: 1fr; gap: 12px; min-height: 0; padding: 18px 0 14px; }
  .hc-donut-wrap { width: min(64vw, 230px); }
  .hc-donut-center strong { font-size: 42px; }
  .hc-donut-center span { font-size: 15px; }
  .hc-legend { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .hc-legend li { min-height: 54px; grid-template-columns: 18px minmax(0,1fr); gap: 7px; padding: 6px 8px; border-radius: 8px; }
  .hc-legend li > i { width: 17px; height: 17px; }
  .hc-legend-name { font-size: 12px; }
  .hc-legend-data { grid-column: 2; display: flex; align-items: baseline; gap: 5px; text-align: left; }
  .hc-legend-data strong { font-size: 14px; }
  .hc-legend-data small { font-size: 9px; }
  .hc-note { gap: 8px; min-height: 56px; padding: 7px 8px; }
  .hc-note-icon { width: 27px; height: 30px; padding-right: 8px; }
  .hc-note-icon svg { width: 23px; height: 23px; }
  .hc-note-copy strong { font-size: 10px; }
  .hc-note-copy small { font-size: 9px; }
}
@media (max-width: 360px) {
  .hc-bar-item .hc-change { width: 42px; font-size: 8px; }
  .hc-label { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-dashboard *, .hc-dashboard::before, .hc-dashboard::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .hc-card.is-ready, .hc-dashboard.is-visible .hc-bar, .hc-dashboard.is-visible .hc-value, .hc-dashboard.is-visible .hc-change, .hc-dashboard.is-visible .hc-dept-icon, .hc-dashboard.is-visible .hc-label, .hc-dashboard.is-visible .hc-legend li { opacity: 1 !important; transform: none !important; }
  .hc-dashboard.is-visible .hc-donut-center span, .hc-dashboard.is-visible .hc-note { opacity: 1 !important; translate: none !important; }
  .hc-dashboard.is-visible:not(.is-drawn) .hc-segment { stroke-dasharray: initial !important; }
}
