@media screen {
  html[data-fh-theme] {
    --fh-violet: #6345c5;
    --fh-blue-viz: #225eae;
    --fh-teal: #07716a;
    --fh-rose: #a73268;
    --fh-amber: #8f4c13;
    --fh-loss: #b33851;
    --fh-plot-track: #e8e8f1;
  }

  html[data-fh-theme="dark"] {
    --fh-violet: #c1a6ff;
    --fh-blue-viz: #89b8ff;
    --fh-teal: #69e2c3;
    --fh-rose: #fc9bc6;
    --fh-amber: #ffbc71;
    --fh-loss: #ff9bac;
    --fh-plot-track: #31384c;
  }

  .fh-tone-violet { --fh-accent: var(--fh-violet); }
  .fh-tone-blue { --fh-accent: var(--fh-blue-viz); }
  .fh-tone-teal { --fh-accent: var(--fh-teal); }
  .fh-tone-rose { --fh-accent: var(--fh-rose); }
  .fh-tone-amber { --fh-accent: var(--fh-amber); }
  .fh-tone-loss { --fh-accent: var(--fh-loss); }

  .fh-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    color: var(--fh-accent, var(--fh-violet));
    background: color-mix(in srgb, currentColor 13%, transparent);
  }

  .fh-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .nav .fh-icon { width: 27px; height: 27px; border-radius: 8px; vertical-align: middle; }
  .nav .fh-icon svg { width: 16px; height: 16px; }
  .nav .nav-group-head > span:first-child > .fh-icon { margin-inline-end: 9px; }
  .nav .nav-group-head > .fh-icon { margin-inline-end: 8px; }
  .nav .nav-group-head > .fh-icon + span { margin-inline-end: auto; }
  .nav .nav-link:has(> .fh-icon) { column-gap: 9px; }

  .metric-card:has(> .fh-icon), .fh-data-panel, .owner-dashboard :is(.od-metric,.od-gap,.od-panel) {
    border-color: color-mix(in srgb, var(--fh-accent, var(--fh-violet)) 15%, var(--line));
  }

  .metric-card > div > strong, .owner-dashboard .od-metric > strong {
    font-variant-numeric: tabular-nums;
    letter-spacing: -.035em;
  }

  .owner-dashboard :is(.od-metric,.od-gap) > span:first-child:has(.fh-icon) {
    display: flex;
    gap: 9px;
    align-items: center;
    justify-content: flex-start;
  }

  .owner-dashboard .od-metric > span:first-child > i { margin-inline-start: auto; }
  .od-metric .fh-icon, .od-gap .fh-icon { width: 30px; height: 30px; border-radius: 9px; }
  .owner-dashboard .od-sales-kpis > div > span { display: flex; align-items: center; gap: 7px; }
  .owner-dashboard .od-sales-kpis > div > span > .fh-icon {
    display: inline-grid;
    width: 27px;
    height: 27px;
    margin: 0;
    color: var(--fh-accent);
  }
  .owner-dashboard .od-sales-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .owner-dashboard .od-sales-kpis strong { font-size: clamp(16px, 1.65vw, 23px); overflow-wrap: normal; }
  @media (max-width: 600px) {
    .owner-dashboard .od-sales-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  }

  .fh-data-panel { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); min-width: 0; }
  .fh-data-panel h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 16px; }
  .fh-data-panel h3 .fh-icon { width: 30px; height: 30px; border-radius: 9px; }
  .fh-coverage-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 12px; margin: 15px 0; }
  .fh-coverage-grid[hidden] { display: none; }
  .fh-coverage-details summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }
  [data-fh-action-icon] { display: inline-flex; align-items: center; gap: 7px; }
  [data-fh-action-icon] .fh-icon { width: 17px; height: 17px; background: none; color: inherit; }
  .fh-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 14px 0 0; gap: 12px; }
  .fh-counts dt { color: var(--muted); font-size: 12px; }
  .fh-counts dd { margin: 4px 0 0; font-weight: 680; font-variant-numeric: tabular-nums; }
  .fh-progress { margin: 10px 0; }
  .fh-progress-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
  .fh-progress-label strong { color: var(--fh-accent); font-variant-numeric: tabular-nums; flex: none; }

  .fh-progress meter, .owner-dashboard .od-track {
    display: block;
    width: 100%;
    height: 8px;
    margin: 6px 0 0;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--fh-plot-track);
  }

  .fh-progress meter { appearance: none; }
  .fh-progress meter::-webkit-meter-bar { border: 0; background: var(--fh-plot-track); }
  .fh-progress meter::-webkit-meter-optimum-value { border: 0; border-radius: 999px; background: var(--fh-accent); }
  .fh-progress meter::-moz-meter-bar { border: 0; border-radius: 999px; background: var(--fh-accent); }
  .owner-dashboard .od-track > span { background: var(--fh-accent, var(--fh-violet)); }
  .owner-dashboard .od-bar-row:nth-child(4n+1) { --fh-accent: var(--fh-violet); }
  .owner-dashboard .od-bar-row:nth-child(4n+2) { --fh-accent: var(--fh-teal); }
  .owner-dashboard .od-bar-row:nth-child(4n+3) { --fh-accent: var(--fh-blue-viz); }
  .owner-dashboard .od-bar-row:nth-child(4n+4) { --fh-accent: var(--fh-amber); }
  .owner-dashboard .od-wb:has(+ .fh-wb-split) { margin-bottom: 12px; }

  .fh-delta { display: inline-flex; gap: 4px; align-items: center; }
  .fh-delta .fh-icon { width: 20px; height: 20px; background: none; }
  .fh-delta .fh-icon svg { width: 16px; height: 16px; }
  .fh-delta[data-direction="up"] { color: var(--fh-teal); }
  .fh-delta[data-direction="down"] { color: var(--fh-loss); }
  .br-change.fh-delta .fh-icon { color: var(--fh-accent); }
  .fh-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  @media (forced-colors: active) {
    .fh-icon { border: 1px solid currentColor; }
    .fh-progress meter { appearance: auto; forced-color-adjust: auto; }
  }
}

@media print { .fh-icon { display: none; } }
