/* libreflow.theme.css — variables ONLY (PublonCore.md §10).
   Desktop-instrument density per design/; accent re-declared (two-line rule)
   in a deep library green so the footer stripe is owned, not default red. */
body[data-system="libreflow"] {
    --hp-density: 0.85;
    --hp-avatar-size: 1.5rem;
    --hp-hue-accent: 158; --hp-sat-accent: 64%;

    --ui-space-1: calc(var(--hp-pad-base) * 0.5  * var(--hp-density));
    --ui-space-2: calc(var(--hp-pad-base) * 1    * var(--hp-density));
    --ui-space-3: calc(var(--hp-pad-base) * 1.5  * var(--hp-density));
    --ui-space-4: calc(var(--hp-pad-base) * 2    * var(--hp-density));
    --ui-space-5: calc(var(--hp-pad-base) * 2.5  * var(--hp-density));
    --ui-space-6: calc(var(--hp-pad-base) * 3    * var(--hp-density));
    --ui-space-7: calc(var(--hp-pad-base) * 4    * var(--hp-density));
    --ui-space-8: calc(var(--hp-pad-base) * 5    * var(--hp-density));
    --ui-space-10: calc(var(--hp-pad-base) * 6   * var(--hp-density));
    --ui-avatar-size: var(--hp-avatar-size);
    --ui-accent-500: hsl(var(--hp-hue-accent), var(--hp-sat-accent), calc(50% + var(--hp-l-shift-accent)));
    --ui-accent-600: hsl(var(--hp-hue-accent), var(--hp-sat-accent), calc(42% + var(--hp-l-shift-accent)));
    --ui-accent: var(--ui-accent-600);
}

/* P1 — the return workbench entry grid: compact numeric cells (16px font
   stays iOS-zoom-safe); the error state marks the exact refused cell. */
.lfw-cell { width: 4.6rem; padding: 2px 4px; }
.lfw-cell.ui-input-error { border-color: var(--ui-danger, #ef4444); background: color-mix(in srgb, var(--ui-danger, #ef4444) 8%, transparent); }

/* P3 — quality tint on grid cells: provisional amber edge · verified green ·
   flagged red (the tone rides the wrap, not the input, so ÷FTE pairs share it). */
.lfw-q-provisional { box-shadow: inset 2px 0 0 var(--ui-warning, #f59e0b); }
.lfw-q-verified    { box-shadow: inset 2px 0 0 var(--ui-success, #10b981); }
.lfw-q-flagged     { box-shadow: inset 2px 0 0 var(--ui-danger, #ef4444); opacity: .75; }

/* P4 — gap-row sparkline: a compact strip, never a full chart card */
.lfw-spark { height: 48px; max-width: 340px; margin-top: 2px; }
.lfw-spark .ui-chart, .lfw-spark .js-plotly-plot { height: 46px !important; min-height: 0 !important; }
