/* Ace Buttons: shared stepped cap geometry, 1.0.0.
   The face palette alone controls highlights; every rectangular cap uses the
   same top edge/radius and full-width clipped lower shadow as the ARC download. */
:root :is(.btn.btn-ghost,.btn[data-ace-key-ink="light"]):not(.arc-theme-circle):has(> .arc-recess-rim) {
  --arc-radius-color: var(--hi);
}
:root .btn.btn-ghost.btn-github:not(.arc-theme-circle):has(> .arc-recess-rim),
:root .ace-consent .btn.btn-ghost.ace-consent__key:not(.arc-theme-circle):has(> .arc-recess-rim) {
  --arc-radius-color: var(--hi);
}
:root .btn:not(.arc-theme-circle):has(> .arc-recess-rim):not(:active,.arc-key-down)::before,
:root .btn:not(.arc-theme-circle):has(> .arc-recess-rim):hover:not(:active,.arc-key-down)::before {
  --ace-cap-hi: var(--hi);
  --ace-cap-radius: color-mix(in srgb,var(--arc-radius-color,var(--hi)) 72%,transparent);
  --ace-cap-tail: color-mix(in srgb,var(--arc-radius-color,var(--hi)) 42%,transparent);
  background:
    linear-gradient(var(--ace-cap-hi) 0 0) center top / calc(100% - 6 * var(--u)) var(--u) no-repeat,
    linear-gradient(var(--ace-cap-radius) 0 0) left calc(2 * var(--u)) top var(--u) / var(--u) 1px no-repeat,
    linear-gradient(var(--ace-cap-radius) 0 0) right calc(2 * var(--u)) top var(--u) / var(--u) 1px no-repeat,
    linear-gradient(var(--ace-cap-radius) 0 0) left calc(2 * var(--u)) top var(--u) / 1px var(--u) no-repeat,
    linear-gradient(var(--ace-cap-radius) 0 0) right calc(2 * var(--u)) top var(--u) / 1px var(--u) no-repeat,
    linear-gradient(var(--ace-cap-tail) 0 0) left var(--u) top calc(2 * var(--u)) / var(--u) 1px no-repeat,
    linear-gradient(var(--ace-cap-tail) 0 0) right var(--u) top calc(2 * var(--u)) / var(--u) 1px no-repeat,
    linear-gradient(var(--lo) 0 0) center bottom / 100% calc(2 * var(--u)) no-repeat,
    var(--face) !important;
  box-shadow: none !important;
}
/* When pressed, retain the existing moving key and dithered upper shade.
   Only the palette correction above applies to that state. */
